[Math] General method to find the perpendicular distance between a plane and a point.

3dvector-spacesvectors

Here's the question I'm puzzling over:

$\textbf{Find the perpendicular distance of the point } (p, q, r) \textbf{ from the plane } \\ax + by + cz = d.$

I tried bringing in the idea of a dot product and attempted to get going with solving the problem, but I'm heading nowhere. That is:

$\text{The direction vector of the normal of the plane } = (a\textbf{i}+b\textbf{j}+c\textbf{k}) \text{, where } \\\textbf{i}, \textbf{ j},\textbf{ k } \text{ are unit vectors.}$

This dotted with the direction vector of the point (position vector, precisely) should equal 0. Am I right? And will this method work even?

Best Answer

Let $$\bbox { \vec{n} = ( a , b , c ) = \left [ \begin{matrix} a \\ b \\ c \end{matrix} \right ] }, \quad \bbox { \vec{v} = ( p , q , r ) = \left [ \begin{matrix} p \\ q \\ r \end{matrix} \right ] }, \quad \bbox { \vec{w} = ( x , y , z ) = \left [ \begin{matrix} x \\ y \\ z \end{matrix} \right ] }$$ where $\vec{n}$ is the plane normal vector, $\vec{v}$ is the point those distance $L$ to the plane we want to find out, and $\vec{w}$ is just an example point. The equation of the plane is then $$\bbox{ \vec{n} \cdot \vec{w} = d }$$

The signed distance $l$ between the plane and point $\vec{v}$, in units of plane normal length, is $$\bbox{ l = \vec{n} \cdot \vec{v} - d }$$ because both $d$ (the signed distance between origin and the plane) and $l$ (the signed distance between the point and the plane) are measured in the same direction, $\vec{n}$.

To find the actual distance $L$ between the point $\vec{v}$ and the plane, we must divide the absolute value of $l$ by the length of the normal vector $\vec{n}$: $$\bbox[#fffff7, 1em] { L = \frac{\left\lvert \vec{n} \cdot \vec{v} - d \right\rvert }{\left\lVert \vec{n} \right\rVert} = \frac{ \left\lvert a p + b q + c r - d \right\rvert}{\sqrt{a^2 + b^2 + c^2}} }$$

For a more detailed derivation, look at the Wolfram Mathworld Point-Plane Distance article.