9
Part Zero · Foundations

Linear algebra II: inner products and Hilbert spaces

An arrow in the plane is two numbers. An arrow in space is three. Now imagine an arrow with a number for every point along a line: infinitely many components, one for each place. That object is a function, and treating functions as arrows is half of quantum mechanics.

Everything you can do with ordinary arrows, measuring lengths, finding angles, projecting one onto another, choosing perpendicular axes, works for functions too. The space where these function-arrows live is called a Hilbert space, and the state of every quantum system is an arrow in one.

Lengths, angles and shadows

The inner product ⟨u,v⟩\langle u, v\rangle multiplies two arrows component by component and adds up. It gives lengths, ∥u∥=⟨u,u⟩\|u\| = \sqrt{\langle u,u\rangle}, and angles, because ⟨u,v⟩=∥u∥ ∥v∥cos⁡θ\langle u,v\rangle = \|u\|\,\|v\|\cos\theta. Set the angle between the arrows to 50 °. The amber shadow is the projection of one onto the other.

Since a cosine never exceeds one, ∣⟨u,v⟩∣≤∥u∥ ∥v∥|\langle u,v\rangle| \le \|u\|\,\|v\|. That is the Cauchy–Schwarz inequality, and it holds in every inner-product space, including spaces of functions. In Part One it will turn into Heisenberg’s uncertainty relation.

DeeperProof without angles: for any real tt, 0≤∥u−tv∥2=∥u∥2−2t Re⟨u,v⟩+t2∥v∥20 \le \|u - t v\|^2 = \|u\|^2 - 2t\,\mathrm{Re}\langle u,v\rangle + t^2\|v\|^2. A quadratic in tt that is never negative has a discriminant of at most zero, which gives the inequality (for complex spaces, first rotate vv by a phase so that ⟨u,v⟩\langle u,v\rangle is real).

A function is an arrow

Sample a function at 8 points and you have an ordinary arrow with that many components. Take more and more samples, weight each by the spacing, and the sum in the inner product becomes an integral:

⟨f,g⟩=∫f(x)‾ g(x) dx\langle f, g\rangle = \int \overline{f(x)}\,g(x)\,dx

The bar over ff means complex conjugate; it makes ⟨f,f⟩\langle f,f\rangle a positive length even when ff is complex. Functions whose squared length is finite form the space called L2L^2.

Projecting onto perpendicular axes

The sine waves sin⁡nπx\sin n\pi x on the interval from 0 to 1 are perpendicular to each other in this sense: their inner products are zero. So they are a set of axes, and the shadow of a function on each axis is a Fourier coefficient.

Project the parabola x(1−x)x(1-x) onto the first 1 axes. The first coefficient is 8/π3≈0.2588/\pi^3 \approx 0.258, the even ones are exactly zero by symmetry, and the leftover error only ever shrinks. Projecting onto more axes always gives the best approximation from those axes, which is why expanding in perpendicular functions is so powerful.

Making axes perpendicular

The simple functions 1,x,x2,x31, x, x^2, x^3 are not perpendicular on the interval from −1 to 1. The Gram–Schmidt process fixes that: take each one in turn and subtract its shadows on the axes you already have. .

Out come 11, xx, x2−13x^2 - \tfrac13, x3−35xx^3 - \tfrac35 x. Up to scaling these are the Legendre polynomials, which will describe the shapes of atomic orbitals. They were not invented; they fell out of making the axes perpendicular.

The two kinds of matrix that matter

A Hermitian matrix equals its own conjugate transpose, H=H†H = H^\dagger. Its eigenvalues are always real, and its eigenvectors are perpendicular. That is the spectral theorem, and it is why measurable quantities in quantum mechanics are Hermitian: real outcomes, with states that cleanly exclude one another.

A unitary matrix keeps every length and angle the same, U†U=IU^\dagger U = I. It is a rotation of Hilbert space, and it is how quantum states change in time: probabilities, which are squared lengths, always add up to one.

DeeperIf Hv=λvH\mathbf v = \lambda\mathbf v with ∥v∥=1\|\mathbf v\| = 1, then λ=⟨v,Hv⟩=⟨Hv,v⟩=λˉ\lambda = \langle \mathbf v, H\mathbf v\rangle = \langle H\mathbf v, \mathbf v\rangle = \bar\lambda, so λ\lambda is real. For two eigenvalues λ≠μ\lambda \ne \mu: λ⟨v,w⟩=⟨Hv,w⟩=⟨v,Hw⟩=μ⟨v,w⟩\lambda\langle \mathbf v,\mathbf w\rangle = \langle H\mathbf v,\mathbf w\rangle = \langle \mathbf v, H\mathbf w\rangle = \mu\langle \mathbf v,\mathbf w\rangle, forcing ⟨v,w⟩=0\langle\mathbf v,\mathbf w\rangle = 0. Two Hermitian matrices that commute can be diagonalized by the same set of eigenvectors.

Combining systems multiplies dimensions

One qubit lives in a two-dimensional space. Two qubits do not live in 2 + 2 dimensions but in 2 × 2 = 4, because every pair of possibilities gets its own axis. This product of spaces is the tensor product, written ⊗\otimes.

With 3 qubits the state needs 8 complex numbers. At 300 qubits that is about 2×10902\times10^{90}, more than the roughly 108010^{80} atoms in the observable universe. This growth is the whole reason quantum computers are interesting, and why simulating them on ordinary computers fails.

States you cannot normalize

A particle with exactly one momentum is described by the wave eikxe^{ikx}, which stretches forever with the same size everywhere. Its squared length, ∫∣eikx∣2dx\int |e^{ikx}|^2 dx, is infinite, so it is not really in L2L^2. Physicists use such states anyway, normalized with the Dirac delta, ⟨k∣k′⟩=2π δ(k−k′)\langle k|k'\rangle = 2\pi\,\delta(k-k'), as an idealization. Real particles are wave packets, sums of many such waves, like the bell-shaped pulse on the plate, and those have finite length.

What you now have

Functions as vectors, inner products, projections, Gram–Schmidt, Hermitian and unitary operators, the spectral theorem, and tensor products. This is the stage on which quantum mechanics is played.

· · ·

Three questions to carry with you.

Why must observables be Hermitian?tap
Hermitian operators have real eigenvalues and perpendicular eigenvectors, so measurements give real numbers and distinct outcomes exclude each other.
What does the Gram–Schmidt process turn 1, x, x², … into?tap
Perpendicular polynomials: on [−1, 1] these are, up to scale, the Legendre polynomials.
Why does the state of n qubits need 2ⁿ numbers?tap
Combining systems takes the tensor product, which multiplies dimensions: 2 × 2 × … × 2.

And one to work out. How many complex numbers describe the state of 10 qubits?

count =

Sources: S. Axler, Linear Algebra Done Right. N. Young, An Introduction to Hilbert Space. Checked by code: Gram–Schmidt of 1, x, x², x³ on [−1, 1]; sine coefficients of x(1−x) = 8/(n³π³) for odd n; 2³⁰⁰ ≈ 2.0×10⁹⁰.

Next · Chapter 10
Probability and statistics

How sure must physicists be to announce a new particle? 5σ is about 1 in 3.5 million (computed: p = 2.87×10⁻⁷ ✓).

Turn the page