Lesson Distance of a point from a given line in Cartesian Coordinate System

Algebra ->  Coordinate-system -> Lesson Distance of a point from a given line in Cartesian Coordinate System      Log On


   


This Lesson (Distance of a point from a given line in Cartesian Coordinate System) was created by by hummingbird(0) About Me : View Source, Show
About hummingbird:

In this lesson we will learn about the method of finding the perpendicular distance
of a given point P%28x%5B0%5D%2Cy%5B0%5D%29 from a given line L1: Y = a.X + b


There are several ways of finding the distance of a point from a line. I.e. using
co-ordinate geometry, linear algebra and simple trigonometry. In this lesson, we
will use trigonometric approach.



In the above diagram, Given line is L%3A+Y=a%2AX%2Bb and the given point is P%28x%5Bo%5D%2Cy%5Bo%5D%29.
Now let us look at the construction of the triangle formation in order to obtain the
perpendicular distance PC.

Methodology
We will first find the vertices of the triangle in order to get the side lengths and
then by applying Sine Rule on triangle PAB and PBC we will calculate the
desired distance PC.

Step1
Draw a vertical line passing through the point P. This line L2: X=x%5Bo%5D will cut the
given line L1 at point A( x%5B1%5D,y%5B1%5D). Similarly, draw a horizontal line passing
through the point P. This line L3: Y=y%5Bo%5D will cut the given line L1 at point B(x%5B2%5D,y%5B2%5D).

Now we need to calculate the vertices of the triangle PAB


Step2
Now we have three lines with following equations:
L1%3A+Y=a%2AX%2Bb
L2%3A+X=x%5Bo%5D
L3%3A+Y=y%5Bo%5D
plugging X=x%5Bo%5D in L1 will give us the point A and similarly plugging Y=y%5Bo%5D
in L1 will give us the point B. Which can be calculated as:
A(x1=x%5Bo%5D , y1=+a%2Ax%5Bo%5D%2Bb%29)
B(x2=+%28y%5Bo%5D-b%29%2Fa , y2=y%5Bo%5D)

Step3
Calculate the length of the sides AP,PB and AB of a triangle by the simple distance formula
in two-dimensional geometry. Distance formula :d=sqrt%28%28%28x%5B1%5D-x%5B2%5D%29%5E2%29%2B%28%28y%5B1%5D-y%5B2%5D%29%5E2%29%29 By this
formula we can calculate the side lengths AP,PB and AB.

Step4
Apply Sine rule on common angle B in triangle PAB and triangle PBC.
Sin%28B%29=+AP%2FAB=PC%2FBP
PC=%28AP%2ABP%29%2FAB

Now, Lets plug the distance formula for AP,BP and AB in the above expression

This is the final formula in terms of the given parameters xo, yo, a and b.

Hence PC is the desired length of a point P from a line L1: Y = a.X + b

Alternate Method
This Method uses the concept of linear algebra and some advance results on co-ordinate geometry.
The perpendicular length of a point P%28x%5Bo%5D%2Cy%5Bo%5D%29 from a line a*X + b*Y + c=0
is given by the formula
PC=%28abs%28a%2Ax%5Bo%5D%2Bb%2Ay%5Bo%5D%2Bc%29%29%2Fsqrt%28a%5E2%2Bb%5E2%29
Note: Here the line is of the form of a*X + b*Y + c=0. We can always change the given
equation of line into this standard form and apply the above formula.

Also look at the solver based on the above concept.
Solver


This lesson has been accessed 21200 times.