The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

Perpendicular Distance

Date: 04/10/98 at 13:12:25
From: Andromeda Albester
Subject: Geometry Coordinates

Dear Dr. Maths:

Could you please prove the following formula:

The distance (d) from a 90 degree line dot (h,k) to ax + by + c = 0 is 
given by:


I can't prove it at all. When asked my teachers, they just said it's 
beyond my level. Please help. 


Date: 04/10/98 at 16:40:27
From: Doctor Rob
Subject: Re: Geometry Coordinates

I think you may be able to understand this proof.

The line through (h,k), which is perpendicular to a*x + b*y + c = 0, 
is given by b*(x-h) - a*(y-k) = 0, I claim. You can easily check that 
it passes through (h,k), and its slope is b/a, and the slope of the 
original line is -a/b. Now oblique lines are perpendicular if and only 
if their slopes are negative reciprocals of each other, so these lines 
are perpendicular.

See this by drawing the coordinate axes, and the line y = (b/a)*x, 
passing through the origin O and A(a,b). Then also draw the line
y = -(a/b)*x, passing through the origin and B(b,-a).  Let C = (a,0), 
D = (0,-a), and draw the triangles OAC and OBD. Show that they are 
congruent right triangles. Then angle AOC equals angle BOD. Last, show 
that the angle AOB equals angle COD, which is a right angle.

I have not dealt with the special case where one line is horizontal, 
the other vertical, that is, one of a or b is zero. In that case, one 
line has slope 0, and the other line has no slope, but my claim, that 
the equation of the perpendicular line is as stated, still holds.  
(Check it out!)

Now find the intersection of these two lines. When I did this, I 
found that the intersection was the point:

  (x0, y0) = 

Then find the distance from that intersection to (h,k) using the 
distance formula. The distance is:

   d = sqrt[(h-x0)^2+(k-y0)^2]

     = sqrt[(h-[b^2*h-a*b*k-a*c]/[a^2+b^2])^2+

     = sqrt[([a^2*h+a*b*k+a*c])^2+([a*b*h+b^2*k+b*c])^2]

     = sqrt[a^2*(a*h+b*k+c)^2+b^2*(a*h+b*k+c)^2]

     = sqrt[(a*h+b*k+c)^2]*sqrt[a^2+b^2]

     =  |a*h+b*k+c|

Can you follow this?

-Doctor Rob,  The Math Forum
Check out our web site!                 
Associated Topics:
High School Equations, Graphs, Translations

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.