 |
 |
Distance Formula
Name: Jeffrey A. H.
Status: student
Age: N/A
Location: N/A
Country: N/A
Date: N/A
Question:
If one knows the coordinates of one point and of two
points defining a line, is there a formula for finding the distance
between the line and the point? AND, can that formula be written as:
Distance =
I have been to several web pages and read several equations that define
lines and solve for distance, but I can't seem to figure out how they
relate to coordinates on a grid...
For example, the followig is given as the definition of a line:
Ax + By + C = 0
... If A and B are points, what is C?
Sorry if I am missing something obvious... Thank you very much for
your time.
Replies:
See http://forum.swarthmore.edu/dr.math/problems/albester4.10.98.html
Also, you might enjoy the following site:
http://www.netcomuk.co.uk/~jenolive/index.html
I found these by searching (www.google.com) for the phrase
"perpendicular distance".
Tim Mooney
Jeffrey,
There is such a formula, and I can derive it if you understand two things:
First, in Ax+By+C=0, A,B,C are NOT points. They are constant values, but
the points are combinations of x and y, usually written as (x,y).
Second, the shortest distance from a point to a line is along a straight
path toward the line: it will be perpendicular to the original line.
I will use a line formula called slope-intercept form: y=mx+b. It works
easier for this type of problem. Let y=Mx+B be the line through the two
points. Let (u,v) be the coordinates of the point. Any line perpendicular
to the original line will have a slope m=-1/M. y=(-1/M)x+b. It must pass
through the point (u,v), so the following must be true: v=(-1/M)u + b.
Therefore, b=v+u/M. We can say y=(-1/M)x+{v+u/M}. Another format is
(y-v)=-(1/M)(x-u).
Dr. Ken Mellendorf
Illinois Central College
Suppose you have two points (X1,Y1) and (X2,Y2) It is possible to
rearrange the line between the two points in the form: Y = m*X + b. Do this
by "plugging in" Y1=m*X1+b and Y2=m*X2+b and solving the two equations for
the two unknowns, 'm' and 'b'. One can show that a line perpendicular to Y =
m*X + b has a slope of (-1/m), which gives the perpendicular Y' = (-1/m)*X'
+ b' Since the coordinates of the the point C = (X', Y') substitution into
the the latter equation gives the value of 'b'.
Vince Calder
Click here to return to the Mathematics Archives
| |
Update: June 2012
|
|