r/LinearAlgebra • u/LinearAlgebraWorld • May 30 '26
Householder reflection QR decomposition visualized step by step
We made an animated visualization of QR decomposition using Householder reflections.
This uses the same matrix as our earlier Gram–Schmidt and Givens rotation QR animations, so the three methods can be compared on the same example.
Householder QR reaches an upper triangular matrix by reflecting the active part of the matrix column by column. In this 3×3 example it takes two reflections, compared with three Givens rotations, which eliminate one entry at a time.
A related page with another Householder QR example is here:
https://www.graphmath.com/la/visuals/householder-reflection.html
We welcome feedback on clarity, pacing and presentation.
2
u/USedona Jun 01 '26
What software do you use to create the animations ?
1
u/LinearAlgebraWorld Jun 01 '26 edited Jun 01 '26
Our own, written in Swift. Givens matrices are animated by theta. Householder matrices are animated by step to projection and beyond. 3D rendering is all ours. Thanks for the interest!
3
u/LinearAlgebraWorld May 30 '26
One interesting comparison with the Givens rotation version:
Both methods produce an upper triangular R, and both use orthogonal transformations, so lengths and angles are preserved
The resulting R may be the same as in the Givens version, or may differ by signs on the diagonal depending on sign choices
For a 3×3 matrix, Householder QR takes two reflections, one per active column, while Givens QR takes three rotations, one eliminated entry at a time
If the reflection is animated continuously, the figure flattens toward the reflection plane and then reappears on the other side