# Two Points Form Equation of a Line

The equation of a non-vertical line passing through two points $A\left( {{x_1},{y_1}} \right)$ and $B\left( {{x_2},{y_2}} \right)$ is given by

To prove this equation let $P\left( {x,y} \right)$ be any point on the given line $l$. Also this passing thorough $A\left( {{x_1},{y_1}} \right)$ and $B\left( {{x_2},{y_2}} \right)$ as shown in the given diagram.
Form $A$ and $B$ draw $AL$ and $BN$ perpendicular on X-axis and from point $P$ draw $PM$ also perpendicular on X-axis. Also from $A$ draw perpendicular $AD$ on $BN$.

Now from the given diagram, consider the similar triangles $ADB$ and $ACP$, by the definition of slope we take

Also from the given diagram we have

Putting these all values in above equation (i) we have

Which is the equation of line through two points $A\left( {{x_1},{y_1}} \right)$ and $B\left( {{x_2},{y_2}} \right)$. This equation can also have the from

In determinant from, the given equation of a line through two points is

NOTE: There is an alternate way to prove two points form of equation of a straight line.
Consider the slope point form of equation of a line, we have

Since the line passing through the point $\left( {{x_1},{y_1}} \right)$, above equation and we have slope of line is $m = \frac{{{y_2} - {y_1}}}{{{x_2} - {x_1}}}$ so equation (i) becomes