Distance between a plane and a point


 * A student asks,
 * "What is the distance, d, from plane Ax+By+Cz+D=0 to the point (h, k, m)?"


 * MathHelp replies
 * The shortest distance is along the line normal, i.e. perpendicular, to the plane, that passes through the given point. A normal vector to the given plane is (A, B, C).  So the parametric equation of the line in question is


 * x = h+tA
 * y = k+tB
 * z = m+tC

Then, the intersection of the given plane and this line is the point correstponding to the value of t that solves


 * A(h+tA)+B(k+tB)+C(m+tC)+D=0

which is


 * t = -(Ah+Bk+Cm+D)/(A^2+B^2+C^2)

plugging this expression for t into the equations of x, y, and z,


 * x = h-A(Ah+Bk+Cm+D)/(A^2+B^2+C^2)
 * y = k-B(Ah+Bk+Cm+D)/(A^2+B^2+C^2)
 * z = m-C(Ah+Bk+Cm+D)/(A^2+B^2+C^2)

Now, d^2 = (x-h)^2+(y-k)^2+(z-m)^2, or


 * d^2 = (A(Ah+Bk+Cm+D)/(A^2+B^2+C^2))^2+
 * (B(Ah+Bk+Cm+D)/(A^2+B^2+C^2))^2+
 * (C(Ah+Bk+Cm+D)/(A^2+B^2+C^2))^2,

which, amazingly, simplifies to


 * (Ah+Bk+Cm+D)^2/(A^2+B^2+C^2)

So the d=|Ah+Bk+Cm+D|/sqrt(A^2+B^2+C^2)