Point-Line Distance--2-Dimensional -- from Wolfram MathWorld
- ️Weisstein, Eric W.
The equation of a line in slope-intercept form is given by
(1) |
so the line has slope . Now consider the distance from a point
to the line. Points on the line have the vector
coordinates
(2) |
Therefore, the vector
(3) |
is parallel to the line, and the vector
(4) |
is perpendicular to it. Now, a vector from the point to the line is given by
(5) |
Projecting onto
,
If the line is specified by two points and
, then a vector perpendicular
to the line is given by
(12) |
Let
be a vector from the point
to the first point on the line
(13) |
then the distance from to the line is again given by projecting
onto
, giving
(14) |
As it must, this formula corresponds to the distance in the three-dimensional case
(15) |
with all vectors having zero -components, and can be written in the slightly more concise
form
(16) |
where
denotes a determinant.
The distance between a point with exact trilinear coordinates and a line
is
(17) |
(Kimberling 1998, p. 31).
See also
Collinear, Point-Line Distance--3-Dimensional
Explore with Wolfram|Alpha
References
Kimberling, C. "Triangle Centers and Central Triangles." Congr. Numer. 129, 1-295, 1998.
Cite this as:
Weisstein, Eric W. "Point-Line Distance--2-Dimensional." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html