Distance from a Point to a Line

Intro

When we get to a linear algebra course, we'll call this topic orthogonal projections. Until then, we'll call it distance from a point to a line.

Here's the picture: We have a line and a point that is disjoint from the line. (not on the line)

We're looking for d -- the measure of the shortest or perpendicular distance between the two.

So, we're trying to find the height of any triangle that uses a segment of the line for its base and the given point as a vertex.

| intro | distance from a point to a line | distance between parallels | practice | solutions |

Distance from a Point to a Line

There are many questions in mathematics in which its useful to find the perpendicular distance from a given point to a given line. In advanced courses, when we study orthogonal projections, we use this information to find component vectors, but in this case, we will use it to find heights of rectangular figures, the shortest distance between a point and a line and in a future lesson, we'll use it to find the equation of a tangent to a circle from an external point.

Though it is preferable to present full proofs for theorems, this case is an exception, since the proof is complicated. Instead, here is the "recipe" for finding the distance from a point to a line, and some illustrative examples. We have one formula to use when given the General Form of the equation of the line and another to use when given the Standard Form.

The perpendicular distance from point P1(x1, y1) to

the line with equation Ax + By + C = 0 is

If the line equation is y = ax + b, then

Notice we use the first formula when given the equation of the line in GENERAL FORM, and we use the second formula when the equation of the line is presented in STANDARD FORM.

Notice also that in both cases, the numerator of the fraction is the absolute value of the expression we get when we set the equation of the line equal to zero. Then we replace the x and y terms with the values for x1 and y1 from the coordinates of point P.

Examples

1. Find the lengths of the perpendiculars from

A(1, – 2), B(0, 0) and C(–2, 9) to the line with equation 3x + 4y – 10 = 0.

Solutions: Since the equation is in GENERAL FORM, we use the first formula.

2. Find the lengths of the perpendiculars from

A(1, – 2), B(0, 0) and C(–2, 9) to the line with equation y = 3x – 1.

Solutions: Since the equation is in STANDARD FORM, we use the second formula.

Now, we are able to develop a way to find the equation of the tangent to a circle from an external point, since we know that the radius to the point of contact is a perpendicular from the center of the circle to the tangent line.

We can also find the vertical height of any rectangular figure if we have the coordinates of at least one vertex and the equation of the base or diagonal line.

| intro | distance from a point to a line | distance between parallels | practice | solutions |

Distance Between Parallel Lines

Since we now have a way to find the perpendicular distance between any point and a given line, its very simple to adapt the technique to finding the perpendicular distance between a pair of parallel lines. All we need do is locate a point on one of the lines to act as P1(x1, y1), and then we find the distance from this point to the other line.

AB's equation is 3x – 4y – 6 = 0, CD's equation is 3x – 4y + 12 = 0

First, we'll use E(0, 3) -- the y-intercept of CD -- as our point and we'll use AB as the line.

The distance d between E and line AB =

Now, we'll use F(2, 0) -- the x-intercept of AB -- as our point and we'll use CD as the line.

The distance d between F and line CD =

As expected, the distances are the same.

To find the distance between parallel lines, locate a point on one of the lines, then find the perpendicular distance from that point to the other line. The easiest points to locate are the intercepts. Set x = 0 to find the y-intercept or Set y = 0 to find the x-intercept.

| intro | distance from a point to a line | distance between parallels | practice | solutions |

Practice

1) Triangle ABC has vertices at A(2, 7), B(0, 0) and C(5, 1):

a) Find the distance from A to C.

b) Find the mid point coordinates for AB.

c) Find the perpendicular distance from A to BC.

d) Write the equation of the line AC.

e) Find the point on AC that divides it internally in the ratio 1:2.

f) Find the x-intercept of AC.

2)Find the distance from the given point P to the given line:

a) P(2, 1); 4x 3y + 10 = 0 b) P(1, 6); 3x + 4y 1 = 0
c) P(5, 3); x = 6y + 23 d) P(0, 0); 2x y 15 = 0
e) P(1, 1) to the line joining A(4, 2) and B(3, 6)

3)Find the radius of the circle center (4, 5) that is tangent to the line 3x + 4y + 18 = 0

(hint: the radius is the perpendicular distance between the center and the tangent)

4)Find the distance to x = 3y + 5 from the intersection of 7x + 2y 7 = 0 and 2x 3y 27 = 0.

5)Find the perpendicular distance between the parallel lines:

a) 3x + 4y 12 = 0 and 3x + 4y 36 = 0

b) x 2y 5 = 0 and x 2y + 2 = 0

c) 12x 5y 6 = 0 and 24x 10y + 21 = 0

| intro | distance from a point to a line | distance between parallels | practice | solutions |

Solutions

1) Triangle ABC has vertices at A(2, 7), B(0, 0) and C(5, 1):

2)Find the distance from the given point to the given line:

a) P(2, 1); 4x 3y + 10 = 0

distance = 3 units

b) P(1, 6); 3x + 4y 1 = 0

distance = 4 units

c) P (5, 3); x = 6y + 23

distance = 0 units

d) P(0, 0); 2x y 15 = 0

distance = 3/5 units

e) P(1, 1) to the line joining A(4, 2) and B(3, 6)

distance = 19/65 units

3)Find the radius of the circle center (4, 5) that is tangent to the line 3x + 4y + 18 = 0

radius = 10

4)Find the distance to x = 3y + 5 from the intersection of 7x + 2y 7 = 0 and 2x 3y 27 = 0.

d = 19/10, (3, – 7) is point of intersection.

5)Find the perpendicular distance between the parallel lines:

a) 3x + 4y 12 = 0 and 3x + 4y 36 = 0

b) x 2y 5 = 0 and x 2y + 2 = 0

c) 12x 5y 6 = 0 and 24x 10y + 21 = 0

| intro | distance from a point to a line | distance between parallels | practice | solutions |

( Analytic Geometry MathRoom Index )

MathRoom Door

(all content © MathRoom Learning Service; 2004 - ).