Using the Gram–Schmidt process, how do you turn the columns of A=(110101011) into an orthonormal basis, and how do you write the resulting QR 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 Q and the upper-triangular matrix R.

Key idea

Each new column aj is made orthogonal to all earlier orthonormal vectors q1,…,qj−1 by subtracting (qi⊤aj)qi and then normalising; the projection coefficients Rij=qi⊤aj and norms Rjj=∥uj∥2 form the upper-triangular factor R.

Steps

  1. Process column a1=(1,1,0)⊤: set u1=a1. Its norm is R11=∥u1∥2=2, so q1=12(1,1,0)⊤.
  2. Process column a2=(1,0,1)⊤: compute R12=q1⊤a2=12, subtract R12q1=(12,12,0)⊤ to get u2=(12,−12,1)⊤. Since R22=∥u2∥2=32=62, normalise to q2=16(1,−1,2)⊤.
  3. Process column a3=(0,1,1)⊤: compute R13=q1⊤a3=12 and R23=q2⊤a3=16. Subtracting both projections leaves u3=(0,1,1)⊤−(12,12,0)⊤−(16,−16,26)⊤=(−23,23,23)⊤.
  4. Normalise u3: R33=∥u3∥2=23, giving q3=13(−1,1,1)⊤.
  5. Assemble A=QR with Q=[q1 q2 q3] and R=(21/21/206/21/6002/3), and check Q⊤Q=I.

Common mistakes

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 min⁡x,y (x−2)2+(y−2)2 subject to x+y≤2 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 P onto the column space of a full-column-rank matrix X∈Rn×d and show that tr⁡(P)=d?