Gram-Schmidt Process and QR Factorization
The Gram-Schmidt process systematically converts any basis into an orthonormal basis. This algorithm is foundational for numerical linear algebra and leads to the QR factorization.
Given a basis for inner product space , construct an orthonormal basis :
Step 1: Normalize the first vector:
Step k (for ): Subtract projections onto previous vectors, then normalize:
Orthonormalize where:
Step 1:
Step 2:
Then
Step 3: Compute similarly, then normalize.
The orthogonal projection of vector onto subspace with orthonormal basis is:
This is the closest point in to : it minimizes over all .
Any matrix with linearly independent columns can be factored as:
where is with orthonormal columns, and is upper triangular with positive diagonal entries.
The Gram-Schmidt process applied to the columns of produces , and records the coefficients.
For with columns :
Gram-Schmidt gives:
The Gram-Schmidt process, though conceptually simple, can be numerically unstable due to rounding errors. Modified Gram-Schmidt and Householder reflections are preferred for computation. The QR factorization is crucial for solving least squares problems and computing eigenvalues via the QR algorithm.