= Solution
The first two columns are already orthogonal and have norms 15 and 5. Their normalized versions are $q_1=(3,4,0,0)^T/5$ and $q_2=(0,0,4,-3)^T/5$. Their <inner products> with the third column are 10 and 5. Subtracting these projections leaves $(20,-15,0,0)^T$, whose norm is 25. Thus an economy-size <QR factorization> is
$$
\boxed{Q=\frac15\begin{pmatrix}3&0&4\\4&0&-3\\0&4&0\\0&-3&0\end{pmatrix},\qquad R=\begin{pmatrix}15&0&10\\0&5&5\\0&0&25\end{pmatrix}.}
$$
Direct multiplication gives $Q^TQ=I_3$ and $QR=A$. If a full square $Q$ is required, append $q_4=(0,0,3,4)^T/5$ and append a zero fourth row to $R$; the product is unchanged and the completed $Q$ is an <orthogonal matrix>.
Back to article page