Gram–Schmidt, QR and singular values
Gram–Schmidt removes the part of each new column already explained by earlier orthonormal columns. The remaining direction is normalized. QR stores those directions and coefficients; singular values are studied separately in Chapter 7.
What you will learn
- Subtract projections and normalize
- Verify QᵀQ=I and QR=A
- Detect dependence before division
Work through one complete example
- Let a₁=(1,0,0), a₂=(2,3,0), and a₃=(1,1,2), the columns of a 3×3 matrix A. Then q₁=a₁.
- Subtract q₁(q₁ᵀa₂)=(2,0,0), leaving (0,3,0); normalize to q₂=(0,1,0).
- For a₃, subtract its projections onto q₁ and q₂ to leave (0,0,2), so q₃=(0,0,1). Q=I₃ and R=[[1,2,1],[0,3,1],[0,0,2]]. Check QᵀQ=I₃ and QR=A.
- The diagonal entries 1,3,2 are the orthogonal lengths. A zero remaining length would signal a dependent column; the rectangular case is an extension of this 3×3 model.
Objective 1: Subtract projections and normalize
- Find q₂ from a₂=(2,3,0), q₁=(1,0,0).
- Remove 2q₁, then divide (0,3,0) by 3.
Objective 2: Verify QᵀQ=I and QR=A
- Verify the displayed QR when Q=I₃.
- QᵀQ=I₃ and QR=R=A, with the original three columns.
Objective 3: Detect dependence before division
- Can (2,0,0) produce a new orthonormal direction?
- No. Removing its projection leaves zero; do not divide by zero length.
A common mistake
Do not normalize a zero residual. QR and SVD are different factorizations.
Review first
Continue learning
Orthogonality and least squares
Interactive diagnosis and practice load in the learning app. You can read these lesson notes without JavaScript.