QR Decomposition for Square vs Rectangular Matrices
What You'll Learn
You'll learn the difference between full QR and reduced (or thin) QR factorizations and when each applies to square versus rectangular matrices.
The Core Idea
So far, you've learned how to compute QR decomposition using Gram-Schmidt. But there's a subtle distinction based on matrix dimensions:
For a square m × m matrix A, QR decomposition gives you:
- Q: an m × m orthogonal matrix
- R: an m × m upper triangular matrix
This is called full QR decomposition.
For a tall rectangular m × n matrix A (where m > n, more rows than columns), you have two options:
- Full QR: Q is m × m orthogonal, R is m × n (upper triangular in the top n rows, zeros below)
- Reduced (Thin) QR: Q is m × n with orthonormal columns, R is n × n upper triangular
Why the Distinction Matters
Think of it like this: when you have more rows than columns, Gram-Schmidt produces only n orthonormal vectors (one per column of A). You could extend this to a full orthonormal basis of ℝᵐ (full QR), but often you only need the n vectors that span the column space of A (reduced QR).
Reduced QR is more computationally efficient and commonly used in applications like least squares, since the extra columns in full Q multiply zeros in R anyway.
For short rectangular matrices (m < n), QR is less common, but when used, R becomes trapezoidal rather than triangular.
Key Takeaway: Square matrices have one natural QR form; rectangular matrices offer a choice between full QR (complete orthonormal basis) and reduced QR (only the essential orthonormal columns), with reduced QR being more practical for most applications.