MathorynMathematical Formula Database

Vectors

Distance from a Point to a Plane

The shortest distance from a point to the plane ax+by+cz=dax+by+cz=d is measured along the normal and given by this formula. It is used in 3D geometry, collision detection and to find heights of pyramids and tetrahedra.

D=∣ax0+by0+cz0−d∣a2+b2+c2D=\frac{|ax_0+by_0+cz_0-d|}{\sqrt{a^2+b^2+c^2}}
LaTeXD=\frac{|ax_0+by_0+cz_0-d|}{\sqrt{a^2+b^2+c^2}}

Variables

(x0,y0,z0)(x_0,y_0,z_0)
the point
a, b, c, da,\ b,\ c,\ d
coefficients of the plane
DD
distance

Example

Find the distance from (1,2,4)(1,2,4) to 2x−y+2z=32x-y+2z=3.

  1. ∣2−2+8−3∣=5|2-2+8-3|=5.
  2. 4+1+4=3\sqrt{4+1+4}=3.

Answer: D=53≈1.6667D=\frac53\approx1.6667.

Related formulas