Geometry – How to Calculate Distance Between a Point and a Line

analytic geometrygeometry

Any Hint on proving that the distance between the point $(x_{1},y_{1})$ and the line $Ax + By + C = 0$ is,

$$\text{Distance} = \frac{\left | Ax_{1} + By_{1} + C\right |}{\sqrt{A^2 + B^2} }$$

What do I use to get started? All I know is the distance formula $\sqrt{(x_{2}-x_{1})^2+(y_{2}-y_{1})^2}$.

Kindly Help

Best Answer

Here is an elementary geometric derivation of the formula:

Any (st.)line perpendicular to the line $$Ax+By+C=0\qquad\text{(1)}$$ is given by $$Bx-Ay+C'=0\qquad\text{(2)}$$ Since (2) has to pass through the point $(x_1,y_1)$ (WHY?), we have $C'=Ay_1-Bx_1$. So, (2) becomes $$Bx-Ay+Ay_1-Bx_1=0\Rightarrow \frac{x-x_1}{A}=\frac{y-y_1}{B}=t\text{ (say)}\qquad(3)$$ From (3), $x=At+x_1$ and $y=Bt+y_1$. This is (called) the parametric equation of the line (2). Each $t$ correspond a point in it and vice-verse. Our next task is to determine the value of $t$ such that (1) and (2) meet at that point. To do so, substituting the value of $x$ and $y$ in (1), we get $t=-\frac{Ax_1+By_1+C}{A^2+B^2}$. Hence the required distance is $$\sqrt{(x-x_1)^2+(y-y_1)^2}=\sqrt{A^2t^2+B^2t^2}=|t|\sqrt{A^2+B^2}=\frac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}.$$