Gram–Schmidt and QR Factorization

Gram–Schmidt constructs orthonormal coordinates by subtracting components in the span already built. For independent columns it yields a QR factorization.

Source
Anbloq
Language
English
Created
Updated
Chapters
1
Reading time
1 min

Start with independent vectors \(v_1,\ldots,v_n\) in an inner product space. At step \(j\), subtract the components along the earlier unit vectors. The remainder is orthogonal to their span and is nonzero by independence.

\[u_j=v_j-\sum_{i<j}q_i\langle q_i,v_j\rangle,\qquad q_j=u_j/\|u_j\|.\]

A two-column calculation

For \(v_1=(2,0)\) and \(v_2=(3,4)\), one gets \(q_1=(1,0)\), then \(u_2=(0,4)\) and \(q_2=(0,1)\). The triangular matrix \(R\) stores the coefficients \(r_{11}=2\), \(r_{12}=3\), \(r_{22}=4\). With the positive diagonal convention this factorization is unique for independent columns. QR reduces least squares to triangular substitution.[1]

References

  1. Gilbert Strang, 18.06 Linear Algebra lectures ↩