# The Two Points Form of the 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 line passes through $A\left( {{x_1},{y_1}} \right)$ and $B\left( {{x_2},{y_2}} \right)$, as shown in the given diagram.

From $A$ and $B$ draw $AL$ and $BN$ perpendicular to the X-axis and from point $P$ draw $PM$ also perpendicular to the X-axis. Also from $A$ draw perpendicular to $AD$ on $BN$.

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

Also from the given diagram we have

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

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

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

NOTE: There is an alternate way to prove the two points form of the equation of a straight line.

Consider the slope point form of the equation of a line, we have

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