Solution (source code)

= Solution

The <plane> through $a_i$ has the constant normal coordinate $r\cdot\widehat n=a_i\cdot\widehat n$. Since $\widehat n$ is a <unit vector>, the separation of these normal coordinates is a length. Every displacement joining the <planes> has this fixed normal component, so its length is at least its absolute value; a displacement parallel to $\widehat n$ attains that bound. Hence \b[the distance between parallel <planes> is]
$$
\boxed{d=|(a_1-a_2)\cdot\widehat n|.}
$$
The absolute value, present in the PDF, is necessary because distance is nonnegative.