Q:

Find out if point is touching line

So, let's assume I have a line that made up of point one (x1, y1) and point two (x2, y2). Then I have a third point somewhere in two dimensional space (x3, y3). I would like to find out if this point is 'touching' the line. 
Picture
How could I go about doing this? I guess I could go about fiding whether the point is between the line's X and Y values, then if it aligns with the angle of the line. Not sure if that is at all a good way to approach the problem, though.

A:

Given the points $(x_1, y_1)$ and $(x_2, y_2)$ we can find the equation of the line passing through them using point slope form. The equation is given by $y-y_1 = \frac{y_2-y_1}{x_2-x_1} (x-x_1)$. Now all points which lie on this line must satisfy this equation. That is, you can plug in $y_3$ for y and $x_3$ for x and see if the equation holds true for that point (to be more concrete, see if you can reduce the equation using algebra to 0=0). 

