Maths WorkshopMaths problems with full solutions
Exercise 1021Linear algebra › Inner product spacesL1Added 3 Nov 2026

Gram-Schmidt orthonormalization

#Gram-Schmidt#orthonormal basis#algorithm

Statement

Apply Gram-Schmidt to the vectors v1=(1,1,0)v_1=(1,1,0), v2=(1,0,1)v_2=(1,0,1), v3=(0,1,1)v_3=(0,1,1) in R3\mathbb{R}^3 with the standard inner product.

Hint

At each step kk, subtract from vkv_k its projection onto the previously constructed orthonormal vectors.

Show solutionHide solution

Solution

Step 1. u1=v1/∥v1∥=(1,1,0)/2u_1=v_1/\|v_1\|=(1,1,0)/\sqrt2.

Step 2. Projection of v2v_2 onto u1u_1: ⟨v2,u1⟩=1/2\langle v_2,u_1\rangle=1/\sqrt2. Orthogonal part:
w2=v2−12u1=(1,0,1)−(1/2)(1,1,0)=(1/2,−1/2,1).w_2=v_2-\frac{1}{\sqrt2}u_1=(1,0,1)-(1/2)(1,1,0)=(1/2,-1/2,1).
Norm: 1/4+1/4+1=3/2\sqrt{1/4+1/4+1}=\sqrt{3/2}, so u2=w2/∥w2∥=(1,−1,2)/6u_2=w_2/\|w_2\|=(1,-1,2)/\sqrt6.

Step 3. Projections of v3v_3:
⟨v3,u1⟩=1/2,⟨v3,u2⟩=2/6.\langle v_3,u_1\rangle=1/\sqrt2,\qquad \langle v_3,u_2\rangle=2/\sqrt6.
Orthogonal part:
w3=v3−12u1−26u2.w_3=v_3-\frac{1}{\sqrt2}u_1-\frac{2}{\sqrt6}u_2.
Compute: 12u1=(1/2,1/2,0)\frac{1}{\sqrt2}u_1=(1/2,1/2,0) and 26u2=(1/3,−1/3,2/3)\frac{2}{\sqrt6}u_2=(1/3,-1/3,2/3). So
w3=(0,1,1)−(1/2,1/2,0)−(1/3,−1/3,2/3)=(−5/6,5/6,1/3).w_3=(0,1,1)-(1/2,1/2,0)-(1/3,-1/3,2/3)=(-5/6,5/6,1/3).
Norm: 25/36+25/36+4/36=54/6\sqrt{25/36+25/36+4/36}=\sqrt{54}/6. Simplify: 54=36\sqrt{54}=3\sqrt6, so ∥w3∥=6/2\|w_3\|=\sqrt6/2. Hence u3=w3/∥w3∥=(−5,5,2)/54u_3=w_3/\|w_3\|=(-5,5,2)/\sqrt{54}.

Conclusion. The orthonormal basis is
u1=12(1,1,0),u2=16(1,−1,2),u3=154(−5,5,2).u_1=\frac{1}{\sqrt2}(1,1,0),\quad u_2=\frac{1}{\sqrt6}(1,-1,2),\quad u_3=\frac{1}{\sqrt{54}}(-5,5,2).