Distance between parallel planes (source code)

= Distance between parallel planes
{title2=$|(a_1-a_2)\cdot n|$}

Planes with common unit normal $n$ have distance $|(a_1-a_2)\cdot n|$. Every joining displacement has this normal component, giving a lower bound by its absolute value; a displacement parallel to the normal attains the bound.

For a common nonzero <normal vector> $\mathbf n$, not necessarily of unit <Euclidean norm>, the <planes> $\mathbf n\cdot\mathbf x=d_1$ and $\mathbf n\cdot\mathbf x=d_2$ have distance $|d_2-d_1|/\|\mathbf n\|$. Thus $2x-y+2z=3$ and $2x-y+2z=9$ are distance $6/3=2$ apart. First put both <plane equations> into the same normal-vector scale: subtracting offsets from independently rescaled equations need not give a geometric distance.