Using the Gram–Schmidt process, how do you turn the columns of into an orthonormal basis, and how do you write the resulting factorisation?
Linear algebra and optimisation, Orthogonality and Gram–Schmidt
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can subtract orthogonal projections step by step and assemble and the upper-triangular matrix .
Key idea
Each new column is made orthogonal to all earlier orthonormal vectors by subtracting and then normalising; the projection coefficients and norms form the upper-triangular factor .
Steps
- Process column : set . Its norm is , so .
- Process column : compute , subtract to get . Since , normalise to .
- Process column : compute and . Subtracting both projections leaves .
- Normalise : , giving .
- Assemble with and , and check .
Common mistakes
- Forgetting to divide by if projecting onto unnormalised vectors instead of unit vectors .
- Using classical Gram–Schmidt in floating-point arithmetic on nearly collinear columns, which loses orthogonality due to cancellation error (use modified Gram–Schmidt or Householder reflections instead).
How long your answer should be
Two-thirds of a page; 5 minutes.
Last checked on 4 December 2026.
Read this
Previous in Linear algebra and optimisation: How do you solve subject to using the KKT conditions, and what does each condition mean?
Next in Linear algebra and optimisation: What is an idempotent matrix, what are its possible eigenvalues, and how do you construct the orthogonal projection matrix onto the column space of a full-column-rank matrix and show that ?