← Exercise library← All exercises for this theme
Theme 2 — Hilbert Spaces and Dirac Notation

The Gram—Schmidt procedure in C3

Keywords: Gram--Schmidt · orthonormal basis · orthogonal projection · decomposition · Parseval's identity

Exercise 1 : The Gram—Schmidt procedure in C3

Consider in C3\C^3, equipped with the usual Hermitian inner product, the three vectors

∣a1⟩=(110),∣a2⟩=(10i),∣a3⟩=(011).\ket{a_1}=\begin{pmatrix}1\\1\\0\end{pmatrix},\qquad \ket{a_2}=\begin{pmatrix}1\\0\\ i\end{pmatrix},\qquad \ket{a_3}=\begin{pmatrix}0\\1\\1\end{pmatrix}.

Recall the principle of the Gram—Schmidt procedure: the first vector is normalised, then the projections of each subsequent vector onto the vectors already constructed are subtracted before it is normalised.

Question 1
Construct the first vector ∣e1⟩\ket{e_1}, then the second vector ∣e2⟩\ket{e_2} of the orthonormal basis.

Solution
We normalise ∣a1⟩\ket{a_1}, whose norm is 2\sqrt2: ∣e1⟩=12(1,1,0)\ket{e_1}=\frac{1}{\sqrt2}(1,1,0).

We then subtract from ∣a2⟩\ket{a_2} its projection onto ∣e1⟩\ket{e_1}. Since ⟨e1|a2⟩=12(1⋅1+1⋅0+0⋅i)=12\braket{e_1}{a_2}=\frac{1}{\sqrt2}(1\cdot1+1\cdot0+0\cdot i)=\frac{1}{\sqrt2},

∣f2⟩=∣a2⟩−⟨e1|a2⟩∣e1⟩=(10i)−12(110)=(1/2−1/2i).\ket{f_2}=\ket{a_2}-\braket{e_1}{a_2}\ket{e_1}=\begin{pmatrix}1\\0\\ i\end{pmatrix}-\frac12\begin{pmatrix}1\\1\\0\end{pmatrix}=\begin{pmatrix}1/2\\-1/2\\ i\end{pmatrix}.

We verify that ⟨e1|f2⟩=12(12−12)=0\braket{e_1}{f_2}=\frac{1}{\sqrt2}\bigl(\frac12-\frac12\bigr)=0. Its norm is 14+14+1=32\sqrt{\frac14+\frac14+1}=\sqrt{\frac32}, hence

∣e2⟩=16(1−12i).\ket{e_2}=\frac{1}{\sqrt6}\begin{pmatrix}1\\-1\\2i\end{pmatrix}.

Question 2
Construct the third vector ∣e3⟩\ket{e_3} and verify that the resulting family is orthonormal.

Hint
The bra associated with ∣e2⟩\ket{e_2} is 16(1, −1, −2i)\frac{1}{\sqrt6}(1,\,-1,\,-2i): do not forget complex conjugation.

Solution
We calculate the two projections of ∣a3⟩\ket{a_3}:

⟨e1|a3⟩=12(0+1+0)=12,⟨e2|a3⟩=16(1⋅0+(−1)⋅1+(−2i)⋅1)=−1−2i6.\braket{e_1}{a_3}=\frac{1}{\sqrt2}(0+1+0)=\frac{1}{\sqrt2}, \qquad \braket{e_2}{a_3}=\frac{1}{\sqrt6}\bigl(1\cdot0+(-1)\cdot1+(-2i)\cdot1\bigr)=\frac{-1-2i}{\sqrt6}.

We subtract these projections:

∣f3⟩=∣a3⟩−12∣e1⟩+1+2i6∣e2⟩=(011)−12(110)+1+2i6(1−12i).\ket{f_3}=\ket{a_3}-\frac{1}{\sqrt2}\ket{e_1}+\frac{1+2i}{\sqrt6}\ket{e_2} =\begin{pmatrix}0\\1\\1\end{pmatrix}-\frac12\begin{pmatrix}1\\1\\0\end{pmatrix}+\frac{1+2i}{6}\begin{pmatrix}1\\-1\\2i\end{pmatrix}.

Component by component, using (1+2i)⋅2i=2i−4(1+2i)\cdot2i=2i-4:

∣f3⟩=(−12+1+2i61−12−1+2i61+2i−46)=13(−1+i1−i1+i).\ket{f_3}=\begin{pmatrix}-\frac12+\frac{1+2i}{6}\\[2pt] 1-\frac12-\frac{1+2i}{6}\\[2pt] 1+\frac{2i-4}{6}\end{pmatrix}=\frac13\begin{pmatrix}-1+i\\1-i\\1+i\end{pmatrix}.

Its norm is 132+2+2=23\frac13\sqrt{2+2+2}=\sqrt{\frac23}, and we obtain

∣e3⟩=16(−1+i1−i1+i).\ket{e_3}=\frac{1}{\sqrt6}\begin{pmatrix}-1+i\\1-i\\1+i\end{pmatrix}.

Let us verify orthogonality. First, ⟨e1|e3⟩=112((−1+i)+(1−i))=0\braket{e_1}{e_3}=\frac{1}{\sqrt{12}}\bigl((-1+i)+(1-i)\bigr)=0. Moreover,

⟨e2|e3⟩=16(1⋅(−1+i)+(−1)(1−i)+(−2i)(1+i))=16(−1+i−1+i−2i+2)=0.\braket{e_2}{e_3}=\frac16\Bigl(1\cdot(-1+i)+(-1)(1-i)+(-2i)(1+i)\Bigr)=\frac16\bigl(-1+i-1+i-2i+2\bigr)=0 .

The three vectors are normalised by construction: they form an orthonormal basis of C3\C^3.

Question 3
Decompose the vector ∣x⟩=(1,0,0)\ket x=(1,0,0) in the basis (∣e1⟩,∣e2⟩,∣e3⟩)(\ket{e_1},\ket{e_2},\ket{e_3}) and verify Parseval's identity.

Solution
In an orthonormal basis, the components are obtained by projection: ∣x⟩=∑k⟨ek|x⟩∣ek⟩\ket x=\sum_k\braket{e_k}{x}\ket{e_k}. The inner product ⟨ek|x⟩\braket{e_k}{x} is simply the complex conjugate of the first component of ∣ek⟩\ket{e_k}:

⟨e1|x⟩=12,⟨e2|x⟩=16,⟨e3|x⟩=−1−i6.\braket{e_1}{x}=\frac{1}{\sqrt2},\qquad \braket{e_2}{x}=\frac{1}{\sqrt6},\qquad \braket{e_3}{x}=\frac{-1-i}{\sqrt6}.

Parseval's identity gives ∑k∣⟨ek|x⟩∣2=12+16+26=1=∥x∥2\sum_k|\braket{e_k}{x}|^2=\frac12+\frac16+\frac26=1=\norm x^2. We may also verify the decomposition using the second component: 12⋅12+16⋅−16+−1−i6⋅1−i6=12−16−26=0\frac{1}{\sqrt2}\cdot\frac{1}{\sqrt2}+\frac{1}{\sqrt6}\cdot\frac{-1}{\sqrt6}+\frac{-1-i}{\sqrt6}\cdot\frac{1-i}{\sqrt6}=\frac12-\frac16-\frac26=0, as required.

Question 4
Does the result depend on the order in which the vectors ∣ai⟩\ket{a_i} are processed? What would happen if the three vectors were linearly dependent?

Solution
Yes: processing the vectors in a different order generally produces a different orthonormal basis. The procedure guarantees only that, at each stage kk, the vectors ∣e1⟩,...,∣ek⟩\ket{e_1},...,\ket{e_k} span the same subspace as ∣a1⟩,...,∣ak⟩\ket{a_1},...,\ket{a_k}. If the vectors were linearly dependent, one of the vectors ∣fk⟩\ket{f_k} would be zero, because ∣ak⟩\ket{a_k} would already belong to the subspace spanned by the preceding vectors, and it could not be normalised: the procedure thus detects linear dependence.