Maths WorkshopMaths problems with full solutions
Exercise 2179Linear algebra › Matrices and linear systemsL1Added 3 Nov 2026

QR factorization by Gram-Schmidt

#QR factorization#Gram-Schmidt#orthogonalization

Statement

Find the QR factorization of
A=(111001).A = \begin{pmatrix} 1 & 1 \\ 1 & 0 \\ 0 & 1 \end{pmatrix}.

Hint

Apply Gram-Schmidt to the columns of AA.

Show solutionHide solution

Solution

Columns. a1=(1,1,0)a_1 = (1,1,0), a2=(1,0,1)a_2 = (1,0,1).

First vector. q1=a1/∥a1∥=(1,1,0)/2q_1 = a_1 / \|a_1\| = (1,1,0)/\sqrt2.

Projection. ⟨a2,q1⟩=(1⋅1+0⋅1+1⋅0)/2=1/2\langle a_2, q_1 \rangle = (1\cdot1 + 0\cdot1 + 1\cdot0)/\sqrt2 = 1/\sqrt2. The orthogonal part is
a2−⟨a2,q1⟩q1=(1,0,1)−12(1,1,0)=(1/2,−1/2,1).a_2 - \langle a_2, q_1 \rangle q_1 = (1,0,1) - \frac12(1,1,0) = (1/2, -1/2, 1).
Normalize: ∥a2−⟨a2,q1⟩q1∥=1/4+1/4+1=3/2\|a_2 - \langle a_2, q_1 \rangle q_1\| = \sqrt{1/4+1/4+1} = \sqrt{3/2}. So
q2=2/3 (1/2,−1/2,1)=(1/6,−1/6,2/3).q_2 = \sqrt{2/3}\,(1/2, -1/2, 1) = (1/\sqrt6, -1/\sqrt6, \sqrt{2/3}).

Matrices QQ and RR.
Q=(1/21/61/2−1/602/3),R=(21/203/2).Q = \begin{pmatrix} 1/\sqrt2 & 1/\sqrt6 \\ 1/\sqrt2 & -1/\sqrt6 \\ 0 & \sqrt{2/3} \end{pmatrix}, \qquad R = \begin{pmatrix} \sqrt2 & 1/\sqrt2 \\ 0 & \sqrt{3/2} \end{pmatrix}.

Conclusion. A=QRA = QR with QQ having orthonormal columns and RR upper triangular.