QR Decomposition — Geometric Interpretation in 2D and 3D
QR decomposition writes a matrix as A = Q R, where R is upper triangular and Q is orthogonal. Geometrically, this separates two different effects: R performs a shear-and-scale type transformation in a fixed coordinate frame, while Q applies a rigid rotation or reflection that preserves lengths and angles.
Visual 1 — 2D
Visual 2 — 3D
Concept
For a square matrix with independent columns, QR decomposition factors the matrix into A = Q R, where the columns of Q form an orthonormal basis and R is upper triangular.
This means the action of A can be understood as a composition: first apply R, then apply Q. Because matrix products act right to left, A = Q R means that R happens first and Q happens second.
Structure
The factor R is upper triangular, so it encodes a hierarchical deformation in the chosen coordinate system. The factor Q is orthogonal, so it preserves inner products, lengths and angles.
This decomposition separates shape-changing behavior from rigid motion explicitly.
Key equations
Since Q is orthogonal, it does not distort geometry. The geometric distortion is carried by R, while Q reorients the result.
Query phrases
- QR decomposition geometric interpretation
- what does A = Q R mean geometrically
- upper triangular transformation followed by orthogonal transformation
- QR decomposition visualization in 2D and 3D
- why Q is orthogonal and R is upper triangular
References
2D reference: Wikipedia — QR decomposition, square matrix section
3D reference: Wikipedia — QR decomposition, example section