Geometry > Surfaces > Planes >

Point-Plane Distance

DOWNLOAD Mathematica Notebook 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.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.