
In Euclidean space, the distance from a point to a plane is the distance between a given point and its orthogonal projection on the plane, the perpendicular distance to the nearest point on the plane.
It can be found starting with a change of variables that moves the origin to coincide with the given point then finding the point on the shifted plane that is closest to the origin. The resulting point has Cartesian coordinates :
- .
The distance between the origin and the point is .
Converting general problem to distance-from-origin problem
Suppose we wish to find the nearest point on a plane to the point (), where the plane is given by
. We define
,
,
, and
, to obtain
as the plane expressed in terms of the transformed variables. Now the problem has become one of finding the nearest point on this plane to the origin, and its distance from the origin. The point on the plane in terms of the original coordinates can be found from this point using the above relationships between
and
, between
and
, and between
and
; the distance in terms of the original coordinates is the same as the distance in terms of the revised coordinates.
Restatement using linear algebra
The formula for the closest point to the origin may be expressed more succinctly using notation from linear algebra. The expression in the definition of a plane is a dot product
, and the expression
appearing in the solution is the squared norm
. Thus, if
is a given vector, the plane may be described as the set of vectors
for which
and the closest point on this plane to the origin is the vector
.
The Euclidean distance from the origin to the plane is the norm of this point,
.
Why this is the closest point
In either the coordinate or vector formulations, one may verify that the given point lies on the given plane by plugging the point into the equation of the plane.
To see that it is the closest point to the origin on the plane, observe that is a scalar multiple of the vector
defining the plane, and is therefore orthogonal to the plane. Thus, if
is any point on the plane other than
itself, then the line segments from the origin to
and from
to
form a right triangle, and by the Pythagorean theorem the distance from the origin to
is
.
Since must be a positive number, this distance is greater than
, the distance from the origin to
.
Alternatively, it is possible to rewrite the equation of the plane using dot products with in place of the original dot product with
(because these two vectors are scalar multiples of each other) after which the fact that
is the closest point becomes an immediate consequence of the Cauchy–Schwarz inequality.
Closest point and distance for a hyperplane and arbitrary point
The vector equation for a hyperplane in -dimensional Euclidean space
through a point
with normal vector
is
or
where
. The corresponding Cartesian form is
where
.
The closest point on this hyperplane to an arbitrary point is
and the distance from to the hyperplane is
.
Written in Cartesian form, the closest point is given by for
where
,
and the distance from to the hyperplane is
.
Thus in the point on a plane
closest to an arbitrary point
is
given by
where
,
and the distance from the point to the plane is
.
See also
- Distance from a point to a line
- Hesse normal form
- Skew lines § Distance
References
- Strang, Gilbert; Borre, Kai (1997), Linear Algebra, Geodesy, and GPS, SIAM, pp. 22–23, ISBN 9780961408862.
- Shifrin, Ted; Adams, Malcolm (2010), Linear Algebra: A Geometric Approach (2nd ed.), Macmillan, p. 32, ISBN 9781429215213.
- Cheney, Ward; Kincaid, David (2010). Linear Algebra: Theory and Applications. Jones & Bartlett Publishers. pp. 450, 451. ISBN 9781449613525.
In Euclidean space the distance from a point to a plane is the distance between a given point and its orthogonal projection on the plane the perpendicular distance to the nearest point on the plane It can be found starting with a change of variables that moves the origin to coincide with the given point then finding the point on the shifted plane ax by cz d displaystyle ax by cz d that is closest to the origin The resulting point has Cartesian coordinates x y z displaystyle x y z x ada2 b2 c2 y bda2 b2 c2 z cda2 b2 c2 displaystyle displaystyle x frac ad a 2 b 2 c 2 quad quad displaystyle y frac bd a 2 b 2 c 2 quad quad displaystyle z frac cd a 2 b 2 c 2 The distance between the origin and the point x y z displaystyle x y z is x2 y2 z2 displaystyle sqrt x 2 y 2 z 2 Converting general problem to distance from origin problemSuppose we wish to find the nearest point on a plane to the point X0 Y0 Z0 displaystyle X 0 Y 0 Z 0 where the plane is given by aX bY cZ D displaystyle aX bY cZ D We define x X X0 displaystyle x X X 0 y Y Y0 displaystyle y Y Y 0 z Z Z0 displaystyle z Z Z 0 and d D aX0 bY0 cZ0 displaystyle d D aX 0 bY 0 cZ 0 to obtain ax by cz d displaystyle ax by cz d as the plane expressed in terms of the transformed variables Now the problem has become one of finding the nearest point on this plane to the origin and its distance from the origin The point on the plane in terms of the original coordinates can be found from this point using the above relationships between x displaystyle x and X displaystyle X between y displaystyle y and Y displaystyle Y and between z displaystyle z and Z displaystyle Z the distance in terms of the original coordinates is the same as the distance in terms of the revised coordinates Restatement using linear algebraThe formula for the closest point to the origin may be expressed more succinctly using notation from linear algebra The expression ax by cz displaystyle ax by cz in the definition of a plane is a dot product a b c x y z displaystyle a b c cdot x y z and the expression a2 b2 c2 displaystyle a 2 b 2 c 2 appearing in the solution is the squared norm a b c 2 displaystyle a b c 2 Thus if v a b c displaystyle mathbf v a b c is a given vector the plane may be described as the set of vectors w displaystyle mathbf w for which v w d displaystyle mathbf v cdot mathbf w d and the closest point on this plane to the origin is the vector p vd v 2 displaystyle mathbf p frac mathbf v d mathbf v 2 The Euclidean distance from the origin to the plane is the norm of this point d v d a2 b2 c2 displaystyle frac d mathbf v frac d sqrt a 2 b 2 c 2 Why this is the closest pointIn either the coordinate or vector formulations one may verify that the given point lies on the given plane by plugging the point into the equation of the plane To see that it is the closest point to the origin on the plane observe that p displaystyle mathbf p is a scalar multiple of the vector v displaystyle mathbf v defining the plane and is therefore orthogonal to the plane Thus if q displaystyle mathbf q is any point on the plane other than p displaystyle mathbf p itself then the line segments from the origin to p displaystyle mathbf p and from p displaystyle mathbf p to q displaystyle mathbf q form a right triangle and by the Pythagorean theorem the distance from the origin to q displaystyle q is p 2 p q 2 displaystyle sqrt mathbf p 2 mathbf p mathbf q 2 Since p q 2 displaystyle mathbf p mathbf q 2 must be a positive number this distance is greater than p displaystyle mathbf p the distance from the origin to p displaystyle mathbf p Alternatively it is possible to rewrite the equation of the plane using dot products with p displaystyle mathbf p in place of the original dot product with v displaystyle mathbf v because these two vectors are scalar multiples of each other after which the fact that p displaystyle mathbf p is the closest point becomes an immediate consequence of the Cauchy Schwarz inequality Closest point and distance for a hyperplane and arbitrary pointThe vector equation for a hyperplane in n displaystyle n dimensional Euclidean space Rn displaystyle mathbb R n through a point p displaystyle mathbf p with normal vector a 0 displaystyle mathbf a neq mathbf 0 is x p a 0 displaystyle mathbf x mathbf p cdot mathbf a 0 or x a d displaystyle mathbf x cdot mathbf a d where d p a displaystyle d mathbf p cdot mathbf a The corresponding Cartesian form is a1x1 a2x2 anxn d displaystyle a 1 x 1 a 2 x 2 cdots a n x n d where d p a a1p1 a2p2 anpn displaystyle d mathbf p cdot mathbf a a 1 p 1 a 2 p 2 cdots a n p n The closest point on this hyperplane to an arbitrary point y displaystyle mathbf y is x y y p aa a a y y a da a a displaystyle mathbf x mathbf y left dfrac mathbf y mathbf p cdot mathbf a mathbf a cdot mathbf a right mathbf a mathbf y left dfrac mathbf y cdot mathbf a d mathbf a cdot mathbf a right mathbf a and the distance from y displaystyle mathbf y to the hyperplane is x y y p aa a a y p a a y a d a displaystyle left mathbf x mathbf y right left left dfrac mathbf y mathbf p cdot mathbf a mathbf a cdot mathbf a right mathbf a right dfrac left mathbf y mathbf p cdot mathbf a right left mathbf a right dfrac left mathbf y cdot mathbf a d right left mathbf a right Written in Cartesian form the closest point is given by xi yi kai displaystyle x i y i ka i for 1 i n displaystyle 1 leq i leq n where k y a da a a1y1 a2y2 anyn da12 a22 an2 displaystyle k dfrac mathbf y cdot mathbf a d mathbf a cdot mathbf a dfrac a 1 y 1 a 2 y 2 cdots a n y n d a 1 2 a 2 2 cdots a n 2 and the distance from y displaystyle mathbf y to the hyperplane is a1y1 a2y2 anyn d a12 a22 an2 displaystyle dfrac left a 1 y 1 a 2 y 2 cdots a n y n d right sqrt a 1 2 a 2 2 cdots a n 2 Thus in R3 displaystyle mathbb R 3 the point on a plane ax by cz d displaystyle ax by cz d closest to an arbitrary point x1 y1 z1 displaystyle x 1 y 1 z 1 is x y z displaystyle x y z given by x x1 kay y1 kbz z1 kc displaystyle left begin array l x x 1 ka y y 1 kb z z 1 kc end array right where k ax1 by1 cz1 da2 b2 c2 displaystyle k dfrac ax 1 by 1 cz 1 d a 2 b 2 c 2 and the distance from the point to the plane is ax1 by1 cz1 d a2 b2 c2 displaystyle dfrac left ax 1 by 1 cz 1 d right sqrt a 2 b 2 c 2 See alsoDistance from a point to a line Hesse normal form Skew lines DistanceReferencesStrang Gilbert Borre Kai 1997 Linear Algebra Geodesy and GPS SIAM pp 22 23 ISBN 9780961408862 Shifrin Ted Adams Malcolm 2010 Linear Algebra A Geometric Approach 2nd ed Macmillan p 32 ISBN 9781429215213 Cheney Ward Kincaid David 2010 Linear Algebra Theory and Applications Jones amp Bartlett Publishers pp 450 451 ISBN 9781449613525