6 The Hilbert Space

A mathematical detour, in which we start viewing wave functions as vectors in an infinite-dimensional complex vector space: Hilbert space.

We now begin to develop the mathematical structures underlying quantum mechanics more systematically. In this lecture, we introduce the idea of wave functions as elements of a complex vector space with Hermitian inner product. With a few additional assumptions, this is known as a ‘Hilbert space’.

6.1 Linear Algebra

Consider a finite-dimensional complex vector space \(V \cong \mathbb{C}^N\). The most important property is that of taking linear combinations: \(a_1v_1 +a_2v_2 \in V\) for any \(v_1,v_2 \in V\) and complex numbers \(a_1,a_2 \in \mathbb{C}\).

A Hermitian inner product on \(V\) is a map \[\begin{aligned} \langle \, \cdot \, , \, \cdot \, \rangle & : V \times V \to \mathbb{C} \\ \nonumber & : ( v_1, v_2 ) \mapsto \langle v_1,v_2\rangle \end{aligned}\]

that obeys

It is often convenient to introduce an orthonormal basis \(\{ e_j\}\) such that \[\langle e_i,e_j\rangle = \delta_{ij}\] and any vector can be expressed \[v = \sum_{j=1}^N v_j e_j \, .\] Computing the inner product with \(e_j\), the components of the vector are \(v_j = \langle v,e_j\rangle\). The Hermitian inner product can then be expressed in component form as \[\begin{aligned} \langle v,w\rangle %& = \sum_{i,j} \langle v_ie_i , w_je_j \rangle \\ \nonumber %& = \sum_{i,j} \bar v_i w_j \langle e_i,e_j\rangle \\ %& = \sum_{i,j} \bar v_i w_j \delta_{ij} \\ & = \sum_j \bar v_j w_j \, . \end{aligned}\] In particular, the squared norm of a vector is \(|v|^2 : = \langle v , v\rangle = \displaystyle\sum_j |v_j|^2\).

6.2 Wave functions Revisited

At a fixed time \(t\), a wave function is a continuous function \[\begin{aligned} \psi & : \mathbb{R} \to \mathbb{C} \\ \nonumber & : x \mapsto \psi(x) \, . \end{aligned}\] In order for the wave function to have a probabilistic interpretation, we require it to be square-normalisable, \[\int^\infty_{-\infty} |\psi(x)|^2 {\rm d}x < \infty \, . \label{eq:sq-int}\] This means that by multiplying by a constant, we can ensure that the probability to find the particle anywhere is \(1\).

The set of continuous square-integrable wave functions forms a complex vector space. That is to say, for any square-integrable \(\psi_1\), \(\psi_2\) and complex numbers \(a_1, a_2 \in \mathbb{C}\), the wave function \(a_1\psi_1+a_2\psi_2\) is square-integrable. This can be shown as follows. It is immediate that if \(\psi\) is square-integrable then \(a\psi\) is square integrable for any complex number \(a \in \mathbb{C}\). We can therefore focus on the sum \(\psi_1+\psi_2\). At each point \(x \in \mathbb{R}\) we have \[\begin{aligned} |\psi_1+\psi_2|^2 & = |\psi_1|^2+|\psi_2|^2 + 2 \text{Re} (\bar \psi_1 \psi_2) \\ & \leq |\psi_1|^2+|\psi_2|^2 + 2|\bar \psi_1 \psi_2| \\ & \leq |\psi_1|^2+|\psi_2|^2 + 2| \psi_1 ||\psi_2| \, , \end{aligned}\] where we used the properties of complex numbers, \(\text{Re}(z) \leq |z|\) and \(|z_1z_2|=|z_1|z_2|\). We also have the elementary inequality \[\begin{aligned} 2 |\psi_1||\psi_2| & = |\psi_1|^2+|\psi_2|^2 - ( |\psi_1|-|\psi_2|)^2 \\ & \leq |\psi_1|^2+|\psi_2|^2 \, . \end{aligned}\] This implies \[|\psi_1+\psi_2|^2 \leq 2 |\psi_1|^2 + 2 |\psi_2|^2\, .\] and therefore \[\int^\infty_{-\infty} {\rm d}x \, |\psi_1+\psi_2|^2 \leq 2 \int^\infty_{-\infty} {\rm d}x \, |\psi_1|^2 + 2 \int^\infty_{-\infty} {\rm d}x \, |\psi_2|^2\, .\] This makes it clear that if the wave functions \(\psi_1\) and \(\psi_2\) are square-integrable then the sum \(\psi_1+\psi_2\) is square-integrable.

6.3 Inner Product

Let us define \[\langle \psi_1,\psi_2\rangle := \int^\infty_{-\infty} {\rm d}x \, \overline{\psi_1(x)} \psi_2(x) \, .\] We claim this is a Hermitian inner product:

The first three properties follow immediately from the definition. To prove the final property, note that \[\langle \psi,\psi\rangle := \int^\infty_{-\infty} {\rm d}x \, |\psi(x)|^2\] and that the integrand is everywhere non-negative, \(|\psi(x)|^2 \geq 0\). This immediately implies \(\langle \psi , \psi \rangle \geq 0\). Now suppose \(\langle \psi, \psi \rangle = 0\). Then \(|\psi(x)|^2\) vanishes everywhere except a set of measure zero. However, since \(|\psi(x)|^2\) is a continuous function, we must have \(|\psi(x)|^2 = 0\) everywhere and therefore \(\psi(x) = 0\).

The Hermitian inner product obeys another property known as ‘completeness’. We will not need the definition in this course. Including this property, the vector space of wave functions together with the Hermitian inner product form a ‘Hilbert space’.

6.4 Orthonormal Bases

It is frequently useful to introduce an orthonormal basis of wave functions. In a later lecture, we will explain that there are natural orthonormal bases that are ‘continuous’ or ‘discrete’ in nature and arise from eigenfunctions of operators associated to observables such as position, momentum and energy.

For now we define an orthonormal basis to be a discrete set of wave functions \(\{ \phi_n(x) \}\) such that \[\langle \phi_m , \phi_n \rangle = \delta_{mn}\] and any continuous square-integrable wave function can be uniquely expressed \[\psi(x) = \sum_n c_n \phi_n(x) \, ,\] where \[c_m = \langle \phi_m , \psi \rangle = \int^\infty_{-\infty} {\rm d}x \, \overline{\phi_m(x)} \, \psi(x) \, .\] The Hermitian inner product can be expressed in terms of the coefficients, \[\displaystyle \langle \psi_1 , \psi_2 \rangle = \int^\infty_{-\infty} {\rm d}x \, \overline{\psi_1(x)} \psi_2(x) = \sum_n \bar c_{1,n} c_{2,n} \,\] while the the squared norm becomes \(\displaystyle \langle \psi,\psi\rangle = \int^\infty_{-\infty} {\rm d}x \, |\psi(x)|^2 = \displaystyle\sum_n |c_n|^2\).

6.5 Example: Particle in a Box

Let us consider an infinite potential well in the region \(0 < x < L\). We therefore restrict to continuous square-integrable wave functions that vanish for \(x \leq 0\) and \(x\geq L\). In this case, we may replace everywhere \[\int^\infty_{-\infty} {\rm d}x \to \int_0^L {\rm d}x \, .\]

The first three basis functions for a particle in a box.

Let us define \[\phi_n(x) = \sqrt{\frac{2}{L}} \sin\left(\frac{n \pi x}{L}\right) \qquad n \in \mathbb{Z}_{>0} \, .\] These wave functions are orthogonal with respect to the inner product \[\begin{aligned} \langle \phi_m , \phi_n\rangle & = \int^L_0 \bar \phi_m(x) \phi_n(x) \\ \nonumber & = \frac{2}{L}\int^L_0 {\rm d}x \sin\left(\frac{m \pi x}{L}\right)\sin\left(\frac{n \pi x}{L}\right) \\ & = \frac{1}{L}\int^L_0 {\rm d}x \left( \cos\left(\frac{(m-n)\pi x}{L}\right) - \cos\left(\frac{(m+n) \pi x}{L}\right) \right) \\ & = \delta_{m,n} - \delta_{m,-n} \\ & = \delta_{m,n} \end{aligned}\] where in passing to the final line, we dropped the second contribution because \(n+m = 0\) is impossible for \(n,m\in\mathbb{Z}_{>0}\).

The fact that any continuous square-integrable wave function has a unique expansion of the form \[\begin{aligned} \psi(x) & = \sum_{n = 0}^\infty c_n \phi_n(x) = \sqrt{\frac{2}{L}} \sum_{n = 1}^\infty c_n \sin\left(\frac{n \pi x}{L}\right) \, , \end{aligned}\] is the content of Fourier’s theorem. The Fourier coefficients are found by taking the Hermitian inner product with \(\phi_n(x)\), \[c_n = \langle \phi_n , \psi \rangle = \sqrt{\frac{2}{L}} \int^L_0{\rm d}x \, \sin\left(\frac{n \pi x}{L}\right)\psi(x) \, .\] The norm squared of the wave function is \[\langle \psi,\psi\rangle = \int^L_0 {\rm d}x \, |\psi(x)|^2 = \sum_{n=1}^\infty |c_n|^2 \, ,\] which is precisely the statement of Parseval’s theorem.

The ‘pyramid’ wave function for a particle in a box.

As an example, consider the ‘pyramid’ wave function displayed above. With the correct normalisation, this wave function is \[\psi(x) = \sqrt{\frac{12}{L}} \begin{cases} \; \dfrac{x}{L} & \quad 0 \leq x \leq \dfrac{L}{2} \\[10pt] \; \dfrac{L-x}{L} & \quad \dfrac{L}{2} \leq x \leq L \end{cases}\] The Fourier coefficients \(c_n\) are computed as follows, \[\begin{aligned} c_n & =\sqrt{\frac{2}{L}} \int^L_0 \sin\left(\frac{n \pi x}{L}\right)\psi(x) {\rm d}x \\ \nonumber & = \sqrt{\frac{24}{L^2}} \left( \int^{L/2}_0 \frac{x}{L} \sin\left(\frac{n \pi x}{L}\right) {\rm d}x+ \int_{L/2}^L \left( 1-\frac{x}{L} \right) \sin\left(\frac{n \pi x}{L}\right) {\rm d}x \right) \\ & = \sqrt{\frac{24}{L^2}}(1-(-1)^n) \int^{L/2}_0\frac{x}{L} \sin\left(\frac{n \pi x}{L}\right) {\rm d}x \\ & = \sqrt{24}(1-(-1)^n) \frac{(-1)^{\frac{n+1}{2}}}{n^2\pi^2} \\ & = \begin{cases} \displaystyle \frac{\sqrt{96}(-1)^{m+1}}{(2m+1)^2\pi^2} & \text{if} \quad n =2m+1 \\ 0 & \text{otherwise} \end{cases} \, . \end{aligned}\] In passing to the final line, the summands are non-zero only when \(n\) is odd, so we introduced \(n = 2m+1\). As a consistency check, \[\langle \psi,\psi\rangle = \sum_{n=1}^\infty |c_n|^2 = \frac{96}{\pi^4} \sum_{m=0}^\infty \frac{1}{(2m+1)^4} = 1 \, ,\] so the wave function is indeed correctly normalised.

6.6 Problems

  1. TUTORIAL 1
    Properties of the inner product The inner product on continuous square-integrable functions is \[\langle \psi_1,\psi_2 \rangle = \int_{-\infty}^\infty \overline{\psi_1(x)} \psi_2(x) dx \, .\] Show that

    1. \(\langle \psi_1 , \psi_2 \rangle = \overline{ \langle \psi_2, \psi_1\rangle}\)

    2. \(\langle \psi_3,a_1\psi_1+a_2\psi_2 \rangle = a_1 \langle \psi_3 , \psi_1\rangle + a_2 \langle \psi_3,\psi_2\rangle\)

    3. \(\langle a_1\psi_1+a_2\psi_2, \psi_3 \rangle = \bar a_1 \langle \psi_1, \psi_3 \rangle + \bar a_2 \langle \psi_2,\psi_3\rangle\)

    4. \(\langle \psi,\psi \rangle \geq 0\)

    5. \(\langle \psi,\psi \rangle = 0\) implies \(\psi(x) = 0\)

    for any constants \(a_1,a_2 \in \mathbb{C}\).

    Solution

    1. We have \[\begin{aligned} \langle \psi_1,\psi_2\rangle & = \displaystyle \int^\infty_{-\infty} \overline{ \psi_1(x) } \psi_2(x) \, dx \\ \nonumber & = \overline{\int^\infty_{-\infty} \overline{ \psi_2(x)} \psi_1(x) \, dx} \\ & = \overline{\langle \psi_2,\psi_1\rangle} \, . \end{aligned}\]

    2. We have \[\begin{aligned} \langle \psi_3,a_1\psi_1+a_2\psi_2\rangle & = \displaystyle \int^\infty_{-\infty} \overline{ \psi_3(x) } \left( a_1\psi_1(x)+a_2\psi_2(x) \right) dx \\ \nonumber & = a_1 \displaystyle \int^\infty_{-\infty} \overline{\psi_3(x)} \psi_1(x) dx + a_2 \displaystyle \int^\infty_{-\infty} \overline{\psi_3(x)} \psi_2(x) dx \\ & = a_1\langle \psi_3,\psi_1\rangle + a_2 \langle \psi_3,\psi_2\rangle \, . \end{aligned}\]

    3. This follows from parts (a) and (b).

    4. We have \(\langle \psi,\psi \rangle = \displaystyle \int^\infty_{-\infty} |\psi(x)|^2 dx \geq 0\) since \(|\psi(x)|^2\geq 0\) for all \(x\in \mathbb{R}\).

    5. Suppose \(\langle \psi,\psi\rangle = \displaystyle \int^\infty_{-\infty} |\psi(x)|^2 dx =0\). Then \(|\psi(x)|^2\) can be non-zero at most on a set of measure zero in \(\mathbb{R}\). But since the wavefunction is continuous, \(|\psi(x)|^2 = 0\) everywhere and therefore \(\psi(x) = 0\).

  2. PROBLEMS CLASS 2
    Inconsistent? Consider the canonical commutation relation \[{}[\hat{x}, \hat{p}] = i\hbar\,.\] We have argued that wave functions are vectors in Hilbert space, and operators are ‘matrices’ acting on those vectors. In this case, the operators \(\hat{x}\) and \(\hat{p}\) are then both matrices, and the right hand side should be read as ‘\(i\hbar\) times the unit matrix’. All fine so far.

    Now let use take the trace of the above equation, \[{\rm Tr}\Big( [\hat{x}, \hat{p}] \Big) = {\rm Tr}\Big(i\hbar\Big)\,.\] The left-hand side vanishes by virtue of cyclicity of the trace. The right-hand side clearly does not vanish, as it is the trace over the unit operator. How can this be consistent?

    Solution This argument shows that Hilbert space cannot be finite-dimensional, as the trace of a commutator of finite-dimensional matrices definitely vanishes, and the trace of a finite-dimensional unit matrix does not.

    If you write this in terms of wave functions, you can see the kind of trouble we get into. The left-hand side would be an integral or infinite sum over all normalisable wave functions, \[{\rm Tr}\Big( [\hat{x}, \hat{p}] \Big) \text{‘‘$=$''} -i\hbar\sum_{\text{all normalisable $\phi(x)$}} \int_{-\infty}^{\infty} \overline{\phi(x)} \left( x \frac{\partial}{\partial x} - \frac{\partial}{\partial x} x \right)\phi(x)\,{\rm d}x\,,\] where the derivatives act on everything to the right, and the ‘sum’ of course needs careful definition. However, the key point is that e.g. in the second term, the derivative acts on \(x \phi(x)\), which may not be a normalisable function!

    For more details on this and related tricky points, see e.g. F. Gieres. Dirac's formalism and mathematical surprises in quantum mechanics. Rept. Prog. Phys., 63:1893, 2000. arXiv:quant-ph/9907069, doi:10.1088/0034-4885/63/12/201..