= Solution
Substitution gives $R^TRx=R^TQ^Tb$. Since $R^T$ is invertible, cancel it on the left to obtain the nonsingular triangular system
$$
\boxed{Rx=Q^Tb.}
$$
This is the <reduced QR least-squares solution>. Its geometric justification is the orthogonal decomposition
$$
\|Ax-b\|_2^2=\|Rx-Q^Tb\|_2^2+\|(I-QQ^T)b\|_2^2.
$$
The second term is independent of $x$, while invertibility of $R$ lets the first term be zero at exactly one point. Although $Q^TQ=I_M$, one must not replace $QQ^T$ by $I_N$: $Q$ is tall and its product $QQ^T$ is the <orthogonal projection> onto its column space.
Back to article page