Tuesday, October 28, 2014

Perpendicular Distance from a Poiint to a Line

Perpendicular Distance from a Point to a Line

(BTW - we don't really need to say 'perpendicular' because the distance from a point to a line always means the shortest distance.)
This is a great problem because it uses all these things that we have learned so far:

The distance from a point (m, n) to the line Ax + By + C = 0 is given by:

d=​√​A​2​​+B​2​​​​​​​∣Am+Bn+C∣​​
There are some examples using this formula following the proof.

Proof of the Perpendicular Distance Formula

Let's start with the line Ax + By + C = 0 and label it DE. It has slope −​B​​A​​.
straight line graph
We have a point P with coordinates (m, n). We wish to find the perpendicular distance from the point P to the line (that is, distance PQ).
perpendicular to straight line
We now do a trick to make things easier for ourselves (the algebra is really horrible otherwise). We construct a line parallel to DE through (m, n). This line will also have slope −​B​​A​​, since it is parallel to DE. We will call this line FG.
perpendicular and parallel constructions
Now we construct another line parallel to PQ passing through the origin.
This line will have slope ​A​​B​​, because it is perpendicular to DE.
Let's call it line RS. We extend it to the origin (0,0).
We will find the distance RS, which I hope you agree is equal to the distance PQ that we wanted at the start.
perpendicular through origin
Since FG passes through (m, n) and has slope −​B​​A​​, its equation is y−n=−​B​​A​​(x−m) or y=​B​​−Ax+Am+Bn​​.
Line RS has equation y=​A​​B​​x.
Line FG intersects with line RS when
​A​​B​​x=​B​​−Ax+Am+Bn​​
Solving this gives us
x=​A​2​​+B​2​​​​A(Am+Bn)​​
So after substituting this back into y=​A​​B​​x, we find that point R is
(​A​2​​+B​2​​​​A(Am+Bn)​​,​A​2​​+B​2​​​​B(Am+Bn)​​)
Point S is the intersection of the lines y=​A​​B​​x and Ax + By + C = 0,which can be written y=−​B​​Ax+C​​.This occurs when (that is, we are solving them simultaneously)
−​B​​Ax+C​​=​A​​B​​x
Solving for x gives
x=​A​2​​+B​2​​​​−AC​​
Finding y by substituting back into
y=​A​​B​​x
gives
y=​A​​B​​(​A​2​​+B​2​​​​−AC​​)=​A​2​​+B​2​​​​−BC​​
So S is the point
(​A​2​​+B​2​​​​−AC​​,​A​2​​+B​2​​​​−BC​​)
The distance RS, using the distance formula, d=√​(x​2​​−x​1​​)​2​​+(y​2​​−y​1​​)​2​​​​​ is
d=√​(​A​2​​+B​2​​​​−AC​​−​A​2​​+B​2​​​​A(Am+Bn)​​)​2​​+(​A​2​​+B​2​​​​−BC​​−​A​2​​+B​2​​​​B(Am+Bn)​​)​2​​​​​
=√​​(A​2​​+B​2​​)​2​​​​{−A(Am+Bn+C)}​2​​+{−B(Am+Bn+C)}​2​​​​​​​
=√​​(A​2​​+B​2​​)​2​​​​(A​2​​+B​2​​)(Am+Bn+C)​2​​​​​​​
=√​​A​2​​+B​2​​​​(Am+Bn+C)​2​​​​​​​
=​√​A​2​​+B​2​​​​​​​∣Am+Bn+C∣​​
The absolute value sign is necessary since distance must be a positive value, and certain combinations of A, m , B, n and C can produce a negative number in the numerator.
So the distance from the point (m, n) to the line Ax + By + C = 0 is given by:
d=​√​A​2​​+B​2​​​​​​​∣Am+Bn+C∣​​

No comments:

Post a Comment