# Perpendicular Distance from a Point to a Line

### Later, on this page...

(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:

- distance formula
- slope of parallel and perpendicular lines
- rectangular coordinates
- different forms of the straight line
- solving simultaneous equations

### Need Graph Paper?

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

`d=(|Am+Bn+C|)/(sqrt(A^2+B^2`

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 `-A/B`.

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`).

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 `-A/B`, since it is parallel to DE. We will call this line FG.

Now we construct another line parallel to PQ passing through the origin.

This line will have slope `B/A`, 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.

Since FG passes through (*m*, *n*) and has slope `-A/B`, its equation is `y-n=-A/B(x-m)` or `y=(-Ax+Am+Bn)/B`.

Line RS has equation `y=B/Ax.`

Line FG intersects with line RS when

`B/Ax=(-Ax+Am+Bn)/B`

Solving this gives us

`x=(A(Am+Bn))/(A^2+B^2`

So after substituting this back into `y=B/Ax,` we find that point R is

`((A(Am+Bn))/(A^2+B^2),(B(Am+Bn))/(A^2+B^2))`

### Phone users

**NOTE:** If you're on a phone, you can scroll any **wide equations** on this page to the right or left to see the whole expression.

Point S is the intersection of the lines `y=B/Ax` and *Ax *+* By *+* C* = 0,
which can be written `y=-(Ax+C)/B`.

This occurs when (that is, we are solving them simultaneously)

`-(Ax+C)/B=B/Ax`

Solving for *x* gives

`x=(-AC)/(A^2+B^2)`

Finding *y* by substituting back into

`y=B/Ax`

gives

`y=B/A((-AC)/(A^2+B^2))=(-BC)/(A^2+B^2`

So S is the point

`((-AC)/(A^2+B^2),(-BC)/(A^2+B^2))`

The distance RS, using the distance formula,

`d=sqrt((x_2-x_1)^2+(y_2-y_1)^2`

is

`d=sqrt(((-AC)/(A^2+B^2)-(A(Am+Bn))/(A^2+B^2))^2+((-BC)/(A^2+B^2)-(B(Am+Bn))/(A^2+B^2))^2)`

`=sqrt(({-A(Am+Bn+C)}^2+{-B(Am+Bn+C)}^2)/(A^2+B^2)^2)`

`=sqrt( ((A^2+B^2)(Am+Bn+C)^2)/(A^2+B^2)^2)`

`=sqrt( ((Am+Bn+C)^2)/(A^2+B^2))`

`=(|Am+Bn+C|)/(sqrt(A^2+B^2))`

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=(|Am+Bn+C|)/(sqrt(A^2+B^2`

### Example 1

Find the perpendicular distance from the point (5, 6) to the line −2*x* + 3*y* + 4 = 0, using the formula we just found.

Answer

`d=(|Am+Bn+C|)/(sqrt(A^2+B^2`

`=(|(-2)(5)+(3)(6)+4|)/(sqrt(4+9)`

`=3.328`

Here is the graph of the situation. We can see that our answer of just over 3 units is reasonable.

So the required distance is `3.3` units, correct to 1 decimal place.

### Example 2

Find the distance from the point `(-3, 7)` to the line

`y=6/5x+2`

Answer

We first need to express the given line in standard form.

`y=6/5x+2`

`5y = 6x + 10`

`6x - 5y + 10 = 0`

Using the formula for the distance from a point to a line, we have:

`d=(|Am+Bn+C|)/(sqrt(A^2+B^2`

`=(|(6)(-3)+(-5)(7)+10|)/sqrt(36+25)`

`=|-5.506|`

`=5.506`

So the required distance is `5.506` units, correct to 3 decimal places.

Easy to understand math videos:

MathTutorDVD.com

### Search IntMath, blog and Forum

### Online Algebra Solver

This algebra solver can solve a wide range of math problems.

Go to: Online algebra solver

### Math Lessons on DVD

Math videos by MathTutorDVD.com

Easy to understand math lessons on DVD. See samples before you commit.

More info: Math videos

### The IntMath Newsletter

Sign up for the free **IntMath Newsletter**. Get math study tips, information, news and updates each fortnight. Join thousands of satisfied students, teachers and parents!