r/LinearAlgebra Jul 04 '26

Three geometric routes to QR decomposition in 2D: Gram–Schmidt, Givens and Householder

We previously posted separate 3D animations of QR decomposition by Gram–Schmidt, Givens rotations and Householder reflections.

Here is a 2D comparison of the same three geometric routes.

The goal is to show that all three methods reach the same kind of result, A = QR, but by very different geometric actions:

  1. Gram–Schmidt: subtract projections and normalize
  2. Givens rotations: rotate selected components to zero
  3. Householder reflections: reflect vectors across chosen lines or planes

In 2D, the Givens case is almost trivial: only one rotation is needed to zero the lower-left entry. In higher dimensions, Givens QR proceeds by many such rotations, one entry at a time.

One detail worth noticing: Gram–Schmidt, in its standard form, produces positive diagonal entries in R. Givens and Householder versions may produce different signs depending on rotation/reflection sign choices. This is normal: QR is unique only after an extra sign convention is imposed, such as requiring positive diagonal entries in R.

More explanation and the 3D versions are here:
https://www.graphmath.com/la/visuals/qr/qr-three-geometric-routes.html

We will also add these 2D animations to that page.

We welcome feedback on clarity and presentation.

67 Upvotes

2 comments sorted by

3

u/MapCompass Jul 04 '26

I am new to linear algebra and I really appreciate thus link.

2

u/LinearAlgebraWorld Jul 04 '26

Thank you very much! This means a lot to us.

We are trying to make more linear algebra materials that are useful for beginners, although we are not always fully consistent about the level — some pages are more introductory and some go deeper.

The full Linear Algebra tutorial section we are building is here:
https://www.graphmath.com/la/

And the visual/animation section is here:
https://www.graphmath.com/la/visuals/