Lesson 247: Gram-Schmidt Orthogonalization

Introduction: Building Orthonormal Bases

Given any linearly independent set of vectors, the Gram-Schmidt process constructs an orthonormal set that spans the same space. This algorithmic procedure is essential when you have a "messy" basis and need a clean one.

The Algorithm

Given linearly independent vectors \(\{\vec{v}_1, \vec{v}_2, \ldots, \vec{v}_n\}\):

Step 1: Normalize the first vector:

\[\vec{e}_1 = \frac{\vec{v}_1}{\|\vec{v}_1\|}\]

Step 2: Subtract the projection onto \(\vec{e}_1\) from \(\vec{v}_2\), then normalize:

\[\vec{u}_2 = \vec{v}_2 - \langle \vec{e}_1, \vec{v}_2 \rangle \vec{e}_1, \quad \vec{e}_2 = \frac{\vec{u}_2}{\|\vec{u}_2\|}\]

Step k: Remove all previous projections, then normalize:

\[\vec{u}_k = \vec{v}_k - \sum_{j=1}^{k-1} \langle \vec{e}_j, \vec{v}_k \rangle \vec{e}_j, \quad \vec{e}_k = \frac{\vec{u}_k}{\|\vec{u}_k\|}\]

Worked Examples

Example 1: Orthonormalizing in \(\mathbb{R}^2\)

Given \(\vec{v}_1 = (1, 1)\) and \(\vec{v}_2 = (1, 2)\):

Step 1:

\[\|\vec{v}_1\| = \sqrt{1^2 + 1^2} = \sqrt{2}\] \[\vec{e}_1 = \frac{1}{\sqrt{2}}(1, 1)\]

Step 2:

\[\langle \vec{e}_1, \vec{v}_2 \rangle = \frac{1}{\sqrt{2}}(1 \cdot 1 + 1 \cdot 2) = \frac{3}{\sqrt{2}}\] \[\vec{u}_2 = (1, 2) - \frac{3}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}}(1, 1) = (1, 2) - \frac{3}{2}(1, 1) = (-\frac{1}{2}, \frac{1}{2})\] \[\|\vec{u}_2\| = \sqrt{\frac{1}{4} + \frac{1}{4}} = \frac{1}{\sqrt{2}}\] \[\vec{e}_2 = \sqrt{2} \cdot (-\frac{1}{2}, \frac{1}{2}) = \frac{1}{\sqrt{2}}(-1, 1)\]

Result: Orthonormal basis: \(\{\frac{1}{\sqrt{2}}(1, 1), \frac{1}{\sqrt{2}}(-1, 1)\}\)

Example 2: Verification

Check: \(\langle \vec{e}_1, \vec{e}_2 \rangle = \frac{1}{2}(-1 + 1) = 0\) ✓

Both have norm 1 ✓

The Quantum Connection

When solving quantum problems, we often encounter non-orthogonal states. The Gram-Schmidt process constructs orthonormal bases for degenerate subspaces (states with the same energy). It's also used in perturbation theory to build proper basis states when the unperturbed Hamiltonian has degeneracies.