PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: Very low Entry average rating: No information on entry rating
[parent] distance from point to a line (Result)

The distance from a point P with coordinates $(x_p, y_p) \in \mathbb{R}^2$ to the line with equation $ax + by + c = 0$ is given by $|ax_p + by_p+c|/\sqrt{a^2+b^2}$ .

Proof Every point $x,y$ on the line is at some distance $\sqrt{(x-x_p)^2+(y-y_p)^2}$ from P. What we need to find is the minimum such distance. Our problem is $$ \min (x-x_p)^2+(y-y_p)^2 $$ subject to $$ ax + by +c = 0 $$ This problem is solvable using the Lagrange multiplier method. We minimize $$ (x-x_p)^2+(y-y_p)^2 + \lambda(ax + by +c) $$ Calculating the derivatives with respect to $x,y$ and $\lambda$ and setting them to zero we get three equations: \begin{eqnarray} 2x - 2x_p + \lambda a = 0\\ 2y - 2y_p + \lambda b = 0\\ 2ax + 2by +2c =0 \end{eqnarray}Solving these leads to $x_p-x = a\frac{ax_p + by_p+c}{a^2+b^2}$ and $y_p-y = b\frac{ax_p + by_p+c}{a^2+b^2}$ . We can now substitute these expressions into $\sqrt{(x-x_p)^2+(y-y_p)^2}$ and we get (after some simplification) the desired result.




"distance from point to a line" is owned by acastaldo.
(view preamble | get metadata)

View style:

See Also: distance of non-parallel lines, envelope, angle bisector as locus


This object's parent.
Log in to rate this entry.
(view current ratings)

Cross-references: expressions, derivatives, Lagrange multiplier method, solvable, proof, equation, line, coordinates, point, distance

This is version 4 of distance from point to a line, born on 2005-07-20, modified 2005-08-03.
Object id is 7248, canonical name is DistanceFromPointToALine.
Accessed 3460 times total.

Classification:
AMS MSC51N20 (Geometry :: Analytic and descriptive geometry :: Euclidean analytic geometry)

Pending Errata and Addenda
None.
[ View all 3 ]
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add example | add (any)