Orthogonality and Gram–Schmidt
~7 min read · Tier toggle changes depth (T1 plain · T2 standard · T3 rigour)
You should be comfortable with the definition of an inner product space, the concept of linear independence, and the Cauchy–Schwarz inequality as established in the previous lecture.
Why this matters
Orthogonality transforms a messy basis into a clean coordinate system.
In physics, we rarely work with arbitrary bases. Whether we are decomposing a wavefunction into energy eigenstates, analyzing normal modes of a vibrating string, or simply projecting a force onto an axis, we rely on the ability to separate components that do not interfere with one another. Orthogonality provides this separation. The Gram–Schmidt process is the algorithmic bridge that takes a set of independent vectors—perhaps derived from a physical model—and converts them into an orthonormal basis, ensuring that the coefficients in any expansion are simply inner products. This is the mathematical foundation for the spectral theorem, which guarantees that self-adjoint operators (like the Hamiltonian) have orthogonal eigenvectors.
The Geometric Intuition
Imagine you have a set of vectors that span a space, but they are "tilted" relative to each other. If you want to find how much of a new vector lies in the direction of the first basis vector, the tilt complicates the calculation because the projection onto the first vector also has a component along the second. Orthogonality removes this coupling. When vectors are orthogonal, the projection of a vector onto one basis element is completely independent of the others. Gram–Schmidt is a sequential "straightening" process. We take the first vector and normalize it. Then we take the second vector, subtract its shadow (projection) onto the first, and normalize the remainder. This remainder is now perpendicular to the first. We repeat this for the third vector, subtracting its shadows onto both previous orthogonal vectors. The result is a set of vectors that are mutually perpendicular and of unit length, yet they span exactly the same subspace as the original set. No information is lost; only the coordinate axes are rotated and scaled to be convenient.
The Projection Formula
The core operation in Gram–Schmidt is the projection of a vector \(v\) onto a subspace spanned by an orthonormal set \(\{e_1, \dots, e_{k-1}\}\). Because the basis is orthonormal, the projection is simply the sum of the projections onto each individual basis vector. For a single orthonormal vector \(e_j\), the projection of \(v\) onto \(e_j\) is given by \(\langle e_j, v \rangle e_j\). Note the order of the inner product: in the complex case, the scalar is on the left if we follow the physics convention where the inner product is linear in the second argument, or we must be careful with conjugation. Assuming the standard physics convention \(\langle u, v \rangle\) is linear in \(v\) and conjugate-linear in \(u\), the projection of \(v\) onto \(e_j\) is \(\langle e_j, v \rangle e_j\).
However, during the Gram–Schmidt process, we are constructing the orthonormal set. At step \(k\), we have already constructed \(e_1, \dots, e_{k-1}\). We have the original vector \(v_k\). We want to remove the components of \(v_k\) that lie in the span of the previous vectors. The component of \(v_k\) in the direction of \(e_j\) is \(\langle e_j, v_k \rangle e_j\). Therefore, the orthogonal part \(u_k\) is:
Once we have this orthogonal vector \(u_k\), we normalize it to get \(e_k = u_k / \lVert u_k \rVert\). This ensures \(\langle e_k, e_k \rangle = 1\).
The Gram–Schmidt Algorithm
Let \(\{v_1, \dots, v_n\}\) be a linearly independent set. We construct \(\{e_1, \dots, e_n\}\) as follows:
1. Set \(u_1 = v_1\). Define \(e_1 = u_1 / \lVert u_1 \rVert\).
2. For \(k = 2\) to \(n\):
a. Compute \(u_k = v_k - \sum_{j=1}^{k-1} \langle e_j, v_k \rangle e_j\).
b. If \(\lVert u_k \rVert = 0\), the vectors are linearly dependent (contradiction to premise), so we stop. Otherwise, define \(e_k = u_k / \lVert u_k \rVert\).
This process guarantees that \(\langle e_i, e_j \rangle = \delta_{ij}\). The key property is that \(\operatorname{span}\{e_1, \dots, e_k\} = \operatorname{span}\{v_1, \dots, v_k\}\). This means we have not changed the subspace we are working in, only the basis. In quantum mechanics, this is crucial when we want to express a state in a basis of eigenstates of a Hermitian operator. If the eigenvectors are not initially orthogonal (which they must be for distinct eigenvalues of a Hermitian operator, but numerical errors or degenerate subspaces may require explicit orthogonalization), Gram–Schmidt provides the rigorous method to enforce this orthogonality.
Connection to Self-Adjoint Operators
The spectral theorem states that for a self-adjoint operator \(A\) on a finite-dimensional inner product space, there exists an orthonormal basis of eigenvectors. The Gram–Schmidt process is the constructive tool that allows us to find such a basis within degenerate eigenspaces. If \(A v = \lambda v\) and \(A w = \lambda w\) for the same \(\lambda\), then \(v\) and \(w\) are not necessarily orthogonal. However, any linear combination \(a v + b w\) is also an eigenvector with eigenvalue \(\lambda\). We can apply Gram–Schmidt to the basis of the eigenspace to produce an orthonormal basis of eigenvectors. This is why the spectral theorem is so powerful: it guarantees that the "geometry" of the operator is compatible with the "geometry" of the space. The operator does not twist the space in a way that breaks orthogonality; it preserves the angles between eigenvectors of distinct eigenvalues and allows us to orthogonalize those of the same eigenvalue.
The derivation
Gram–Schmidt Orthonormalization
Let \((V,\langle\cdot,\cdot\rangle)\) be an inner-product space over \(F=\mathbb{R}\) or \(\mathbb{C}\), and let \(\{v_1,\dots,v_n\}\subset V\) be linearly independent. Then there exists an orthonormal set \(\{e_1,\dots,e_n\}\) — meaning \(\langle e_i,e_j\rangle=\delta_{ij}\) — such that for every \(k\le n\), \(\operatorname{span}\{e_1,\dots,e_k\}=\operatorname{span}\{v_1,\dots,v_k\}\). The set is produced constructively, and is unique up to the phase (sign, in the real case) of each \(e_k\).
In the complex case, the order of arguments in the inner product matters for the projection formula. If your convention is \(\langle u, v \rangle\) linear in \(u\), the projection of \(v\) onto \(e_j\) is \(\langle v, e_j \rangle e_j\). Mixing up the conjugate-linear slot leads to incorrect signs in the subtraction step, resulting in vectors that are not orthogonal. Always verify your convention: in physics, \(\langle \psi | \phi \rangle\) is typically linear in \(|\phi\rangle\) and conjugate-linear in \(\langle \psi |\), so the coefficient for projecting \(|\phi\rangle\) onto \(|\psi\rangle\) is \(\langle \psi | \phi \rangle\). C
Worked example
Problem. Let \(V = \mathbb{R}^3\) with the standard dot product. Given the linearly independent vectors \(v_1 = (1, 1, 0)\) and \(v_2 = (1, 0, 1)\), apply the Gram–Schmidt process to find an orthonormal basis \(\{e_1, e_2\}\) for the subspace spanned by \(v_1\) and \(v_2\).
- Normalize \(v_1\). \(\lVert v_1 \rVert = \sqrt{1^2 + 1^2 + 0^2} = \sqrt{2}\). Thus, \(e_1 = \frac{1}{\sqrt{2}}(1, 1, 0)\).
- Compute the projection of \(v_2\) onto \(e_1\). \(\langle e_1, v_2 \rangle = \frac{1}{\sqrt{2}}(1 \cdot 1 + 1 \cdot 0 + 0 \cdot 1) = \frac{1}{\sqrt{2}}\). The projection vector is \(\frac{1}{\sqrt{2}} e_1 = \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}}(1, 1, 0) = \frac{1}{2}(1, 1, 0)\).
- Subtract the projection from \(v_2\) to get \(u_2\). \(u_2 = v_2 - \frac{1}{2}(1, 1, 0) = (1, 0, 1) - (0.5, 0.5, 0) = (0.5, -0.5, 1)\).
- Normalize \(u_2\). \(\lVert u_2 \rVert = \sqrt{0.5^2 + (-0.5)^2 + 1^2} = \sqrt{0.25 + 0.25 + 1} = \sqrt{1.5} = \sqrt{\frac{3}{2}}\). Thus, \(e_2 = \frac{1}{\sqrt{3/2}}(0.5, -0.5, 1) = \sqrt{\frac{2}{3}}(0.5, -0.5, 1) = \left( \frac{1}{\sqrt{6}}, -\frac{1}{\sqrt{6}}, \sqrt{\frac{2}{3}} \right)\).
Units check. The vectors are dimensionless coordinates in \(\mathbb{R}^3\). The norms are dimensionless and equal to 1. The dot product \(e_1 \cdot e_2 = \frac{1}{\sqrt{12}} - \frac{1}{\sqrt{12}} + 0 = 0\), confirming orthogonality.
Three quick tests
- Why must the vectors \(v_1, \dots, v_n\) be linearly independent for Gram–Schmidt to produce a basis?
Answer
If they are dependent, some \(u_k\) will be the zero vector, which cannot be normalized, and the resulting set will not span the original space. - Does the Gram–Schmidt process change the subspace spanned by the vectors?
Answer
No. At each step \(k\), \(\operatorname{span}\{e_1, \dots, e_k\} = \operatorname{span}\{v_1, \dots, v_k\}\). The subspace is preserved. - In the complex case, if \(\langle u, v \rangle\) is linear in \(v\), what is the projection of \(v\) onto a unit vector \(u\)?
Answer
\(\langle u, v \rangle u\) (for a non-unit \(u\), divide by \(\langle u, u \rangle\)). The scalar coefficient is the inner product with the basis vector on the left.
Problem set for PU-104 →
Each derivation in this unit ends with five graded problems with full solutions.
Lecture notes drafted with a local model and checked line by line by the editor; every number in the worked example was recomputed.