Solution (source code)

= Solution

The pairwise <dot products> of the normalized vectors are
$$
\frac{1-1}{2\sqrt2}=0,\qquad
\frac{1-2+1}{4}=0,\qquad
\frac{1-1}{2\sqrt2}=0.
$$
Their squared norms are respectively $(1+2+1)/4$, $(1+1)/2$, and $(1+2+1)/4$, all one. Hence they form an \b[<orthonormal basis>]. This also follows from the <spectral theorem for real symmetric matrices>, because $D$ is symmetric and its three <eigenvalues> are distinct.