TOPICS
Search

Point-Plane Distance


PointPlaneDistance

Given a plane

 ax+by+cz+d=0
(1)

and a point x_0=(x_0,y_0,z_0), the normal vector to the plane is given by

 v=[a; b; c],
(2)

and a vector from the plane to the point is given by

 w=-[x-x_0; y-y_0; z-z_0].
(3)

Projecting w onto v gives the distance D from the point to the plane as

D=|proj_(v)w|
(4)
=(|v·w|)/(|v|)
(5)
=(|a(x-x_0)+b(y-y_0)+c(z-z_0)|)/(sqrt(a^2+b^2+c^2))
(6)
=(|ax+by+cz-ax_0-by_0-cz_0|)/(sqrt(a^2+b^2+c^2))
(7)
=(|-d-ax_0-by_0-cz_0|)/(sqrt(a^2+b^2+c^2))
(8)
=(|ax_0+by_0+cz_0+d|)/(sqrt(a^2+b^2+c^2)).
(9)

Dropping the absolute value signs gives the signed distance,

 D=(ax_0+by_0+cz_0+d)/(sqrt(a^2+b^2+c^2)),
(10)

which is positive if x_0 is on the same side of the plane as the normal vector v and negative if it is on the opposite side.

This can be expressed particularly conveniently for a plane specified in Hessian normal form by the simple equation

 D=n^^·x_0+p,
(11)

where n^^=v/|v| is the unit normal vector. Therefore, the distance of the plane from the origin is simply given by p (Gellert et al. 1989, p. 541).

Given three points x_i for i=1, 2, 3, compute the unit normal

 n^^=((x_2-x_1)x(x_3-x_1))/(|(x_2-x_1)x(x_3-x_1)|).
(12)

Then the (signed) distance from a point x_0 to the plane containing the three points is given by

 D_i=n^^·(x_0-x_i),
(13)

where x_i is any of the three points. Expanding out the coordinates shows that

 D=D_1=D_2=D_3,
(14)

as it must since all points are in the same plane, although this is far from obvious based on the above vector equation.

When the point lies in the plane determined by the other three points, it is said to be coplanar with them, and the distance given by the formulas above collapses to 0.


See also

Coplanar, Hessian Normal Form, Plane, Point, Projection Theorem

Explore with Wolfram|Alpha

References

Gellert, W.; Gottwald, S.; Hellwich, M.; Kästner, H.; and Künstner, H. (Eds.). VNR Concise Encyclopedia of Mathematics, 2nd ed. New York: Van Nostrand Reinhold, 1989.

Referenced on Wolfram|Alpha

Point-Plane Distance

Cite this as:

Weisstein, Eric W. "Point-Plane Distance." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Point-PlaneDistance.html

Subject classifications