Solution (source code)

= Solution

Collect the orthonormal vectors as columns and compute $R=Q^TA$. This gives the thin <QR decomposition>
$$
\boxed{Q=\frac12\begin{pmatrix}1&1&1\\1&-1&-1\\1&-1&1\\1&1&-1\end{pmatrix},\qquad
R=\begin{pmatrix}2&4&2\\0&2&2\\0&0&2\end{pmatrix}.}
$$
The <inner products> in part (e) prove $Q^TQ=I_3$; the column identities $a_1=2q_1$, $a_2=4q_1+2q_2$, $a_3=2q_1+2q_2+2q_3$ prove $A=QR$.