How far is a point from a plane? "Distance" always means the shortest distance, and the shortest path to a plane runs straight along its normal. So the question becomes a projection problem: how long is the part of a connecting vector that points along $\mathbf{n}$? The same idea, with a cross product, handles distances to lines.
Key idea
Why it works
For a line, the parallelogram on $\overrightarrow{P_0X}$ and $\mathbf{v}$ has area $|\overrightarrow{P_0X} \times \mathbf{v}|$ and base $|\mathbf{v}|$; its height is the distance from $X$ to the line.
Worked examples
Worked example: Point to plane
- Numerator: $|2(1) - 2 + 2(3) - 1| = |5| = 5$.
- Denominator: $\sqrt{4 + 1 + 4} = 3$.
- $D = \frac{5}{3}$.
Answer: $\frac{5}{3}$
Worked example: Parallel planes
- Divide the second by 2 so the normals match: $x + 2y - 2z = 9$.
- The planes $\mathbf{n} \cdot X = 3$ and $\mathbf{n} \cdot X = 9$ are $\frac{|9 - 3|}{|\mathbf{n}|}$ apart.
- $|\mathbf{n}| = \sqrt{1 + 4 + 4} = 3$, so $D = 2$.
Answer: ${}2$
Worked example: Point to line
- $P_0 = (0, 0, 0)$ is on the line, so $\overrightarrow{P_0X} = \langle 1, 1, 1 \rangle$.
- $\langle 1, 1, 1 \rangle \times \langle 1, 2, 2 \rangle = \langle 0, -1, 1 \rangle$, length $\sqrt{2}$.
- $|\mathbf{v}| = 3$, so $D = \frac{\sqrt{2}}{3}$.
Answer: $\frac{\sqrt{2}}{3}$
For two skew lines, the shortest connection is perpendicular to both, so it runs along $\mathbf{n} = \mathbf{v}_1 \times \mathbf{v}_2$. Project the vector between any two base points onto $\mathbf{n}$: $D = \frac{|\overrightarrow{P_1P_2} \cdot \mathbf{n}|}{|\mathbf{n}|}$.
Common mistake