Solution (source code)

= Solution

For a real <orthogonal matrix>, $P^TP=I$. Consequently
$$
\boxed{(P\mathbf u)\cdot(P\mathbf v)=\mathbf u^TP^TP\mathbf v=\mathbf u^T\mathbf v=\mathbf u\cdot\mathbf v.}
$$
Thus it preserves every real <inner product>, and in particular lengths and angles.