# Countable Matrix Representation

In my quantum mechanics class, my professor explained that the Hamiltonian along with position and momentum operators can be represented by matrices of countable dimension. This is especially usefull in harmonic oscillator problems. My professor explained that the eigenvalues of the Hamiltonian are (of course) the discrete allowed energies of the system, while the eigenvalues of the position operator are all possible positions, a continuum. How can a countable matrix have an uncountable number of eigenvalues? Why do the Hamiltonian and the position operator have the same dimension but different numbers of eigenvalues?

The countable and uncountable infinities are "different cardinals" according to set theory but in physics, the bases of that size produce equally large Hilbert spaces: the Hilbert-space is infinite-dimensional and all infinite-dimensional Hilbert spaces are isomorphic to each other (in other words, there is only "one unified kind of infinity" when it comes to the dimension of a Hilbert space). Quantum mechanics offers you infinitely many examples.

Perhaps the simplest example are Fourier expansions. Consider a particle in an infinite well so that the wave function $\psi(x)$ is only nonzero for $0\lt x \lt +\pi$. The operator $x$ has a continuous spectrum i.e. an uncountable number of eigenvalues and eigenstates (the basis of $x$-eigenstates is uncountable).

On the other hand, the operator $p^2 = -\hbar^2 \partial^2 / \partial x^2$ has a discrete spectrum and a countable set of eigenvalues and eigenstates. The eigenstates are standing waves $\sin (nx)$ for positive integer $n$ and the eigenvalues are $n^2$.

Nevertheless, every ("smooth enough" and/or $L^2$-normalizable etc.) function $\psi(x)$ that is nonzero in that interval – every combination of uncountably many wave functions $\psi(x) = \delta(x-x_0)$ – may also be written as a linear combination of the standing waves, $\sin(nx)$. This fact is what makes the Fourier series possible. (Normally, I would talk about periodic functions and complex exponentials but the sines in a well may be more beginner-friendly.)

There is really no contradiction with the different cardinality of the sets because the two sets, the uncountable basis of $x$ eigenstates and the countable basis of $p^2$ eigenstates, are not being identified via a one-to-one map. Instead, the map between one basis and the other is a general linear transformation that mixes them, and the different cardinality places no restrictions on such linear transformations of infinite-dimensional vector spaces.

Quite generally, cardinal numbers (the science about distinguishing many types) as well as most other related results in set theory (I mean especially Gödel's theorems) are completely inconsequential in physics. They're just some "recreational subtleties" in mathematical logic and physics doesn't find any of these operations relevant. So a physicist may do state-of-the-art string theory and interpret it in all corners of physics without even "knowing" that the real numbers are uncountable. The uncountability is unphysical. A physicist is generally agnostic about the existence of real numbers that cannot be constructed, about the validity of the axiom of choice, and other problems that cannot be operationally performed by an experiment. A physicist's typical reaction is that these questions are "philosophy" – they are empirically undecidable (we know that the axiom of choice is undecidable even in major axiomatic systems of set theory) so he doesn't care about the answers.

• -1: Your first sentence is misleading and non-standard, even in physics. The dimension theorem for vector spaces demands that any two bases of a vector space have the same cardinality; physicists don't deviate from this definition. They do sometimes abuse terminology and, for example, use the term "basis" for e.g. the set of position eigenstates, but if pressed they will qualify by saying that these states are not actually in the Hilbert space. Also, in modern terminology, a Hilbert space is not automatically assumed separable, so not all infinite-dimensional Hilbert spaces are isomorphic. – joshphysics Jan 25 '14 at 17:16
• – joshphysics Jan 25 '14 at 17:18
• Dear @joshphysics, when physicists are pressed (e.g. with guns or a very unpleasant dialog), they may "okay" any proposition. After some pressure, I would okay your claims, too. ;-) It's still true that physicists use the term "continuous basis" and this notion may be given a completely rigorous description in terms of rigged Hilbert spaces. The main implication is true: the same linear space may be described both with a continuous basis and a discrete one. - Otherwise the physically relevant Hilbert spaces are always separable! – Luboš Motl Jan 25 '14 at 17:49
• @LubošMotl If you're saying that it would be unproductive to impose the culture of mathematics on physics, then I completely agree. However, I think that this particular concept, that of bases and dimension in Hilbert spaces, is not so mathematically esoteric/difficult that being more precise adversely effects physical intuition. At the very least, I think it would be appropriate to qualify your statements by pointing to modern, mathematical concepts. I understand your view on math in physics; I simply don't completely share your sentiments. – joshphysics Jan 25 '14 at 18:05
• @LubošMotl While I'm not going to read the substantive debate in the comments above - nor do I have much appetite for having one - I would indeed ask you to qualify the statement "all infinite-dimensional Hilbert spaces are isomorphic to each other" to apply only to separable Hilbert spaces. I know it's an extra word, but it's got the advantage of being correct. – Emilio Pisanty Jan 25 '14 at 21:09

Luboš Motl's answer has morally correct physics, though it may be instructive to make an illustration in terms of the basic mathematics in introductory quantum mechanics. As an example, take a spinless particle in one dimension.

The position eigenstates in the position-space representation formally allow you to build any function: $$f(x) = \int c_{x'} \delta(x-x')\,\mathrm{d}x'\text{,}$$ and you have uncountable freedom in specifying the uncountably many coefficients $c_{x'}$. However, most of this freedom is illusory, because the $L^2$ inner product $$\langle f|g\rangle = \int f^*(x)g(x)\,\mathrm{d}x$$ is unable to distinguish functions whose difference has vanishing norm-squared: $$||f-g||^2 = \langle f-g|f-g\rangle = 0\text{.}$$ Any two functions differing only on a finite or countable set will do, but this is also possible even for functions differing on an uncountable set--as long as that set has zero measure.

Using the Cauchy-Schwarz inequality, one can easily prove that for such a pair of functions, given any $h\in L^2$, $\langle f-g|h\rangle = 0$. In other words, such a difference cannot possibly have any physical significance, since both of them will predict exactly the same probabilities in every situation conceivable in quantum mechanics.

If one insists on the mathematics, we're trimming down the space of functions into the space of equivalence classes of functions. In general we want only "smooth enough" functions, but actually mere continuity (with at most countably many exceptions) will do: a continuous functions is determined by its values on the rationals, or on any other countable set that's dense in the reals.

There is, however, an additional mathematical reason for why we shouldn't expect a contradiction in the first place: fundamentally, the "continuous basis" made by Dirac is a different beast from the countable "Schauder basis" that builds vectors as a series, and both of them are different from the "Hamel basis" one first learns in linear algebra class that builds vectors out of finitely many elements of the basis. There's no problem in them having different cardinalities per se, because they're very different things.

In particular, quantum mechanics requires the complex Hilbert space to be separable, meaning there will be a countable orthonormal Schauder basis for an infinite-dimensional space. This is what Mr. Motl means when he says that "all infinitely-dimensional spaces are isomorphic to each other", because we can just make an isometric isomorphism by just re-mapping the vectors in their respective bases.

On this, he's physically completely correct, although in mathematics there are complex Hilbert spaces that are not separable.

So these operators have an uncountable number of eigenfunctions which fall into a countable number of equivalence classes?

Well... not quite. Say you take the position and momentum operators. In the position-space representation, they look like $\delta(x-a)$ and $e^{ipx}$. There's obviously something mathematically strange about the latter in the context of our Hilbert space, though physically it's just an ordinary plane wave--it's not normalizable, and hence cannot be part of the Hilbert space proper. Though using them as a basis is just applying a Fourier transform, so it must make sense to use it. As for the former, since you are worried about formal mathematical issues, you have to believe the mathematicians when they tell you that the Dirac delta is not strictly speaking even a function.

I want to emphasize that they are perfectly good eigenstates, though, and that using them makes sense. We just have to be more mathematically precise if we want to untangle formal mathematical issues like cardinalities.

So let's peek down the rabbit hole of functional analysis. A(n anti-) linear functional is a(n anti- )linear mapping between the vectors in the Hilbert space to its field, here the complex numbers. A trivial example of either: pick a fixed $v\in\mathcal{H}$. Then the map $w\mapsto\langle w|v\rangle$ is an antilinear functional and the map $w\mapsto\langle v|w\rangle$ is a linear functional. Another trivial example is $\delta[f] = f(0)$, which is obviously linear ($\delta[\alpha f+\beta g] = \alpha\delta[f]+\beta\delta[g]$) and gives a scalar.

So all vectors in the Hilbert space generate (anti)linear functionals. The converse is only partially true: all continuous (anti)linear functionals correspond to vectors, by the Riesz representation theorem. So if we want to be formal, bras are linear functionals over our Hilbert space and kets are antilinear functionals, and only some of them actually correspond to a vector in the Hilbert space. This is covered as part of the "rigged Hilbert space" formalism I mentioned in the comments.

Therefore, there is no mathematical problem at all with having an uncountable continuous basis while simultaneously having a countable Schauder basis. They serve the same kind of physical purpose, but mathematically, they're simply different things: the Schauder basis "lives" directly in the Hilbert space, but the continuous basis "lives" in the algebraic dual of our Hilbert space--it's a basis of states that are not required to be vectors, but rather just functionals.

This question is somewhat related to research I used to do so I thought I would put my two cents in.

When you construct a matrix representation of the Hamiltonian operator you have to pick a basis. Usually this would be a countable basis the elements of which are square integrable. What you need to realize is that when you have done this you have restricted the effectiveness of the given matrix representation.

As a concrete example you could think about what happens when you use the solutions to the 1-D harmonic oscillator as a basis (e.g. Hermite polynomials times a gaussian). You basis functions would then be of the form,

$$f_n(\xi) = H_n(\xi) e^{-\xi^2/2}.$$

Now you can construct matrix elements for a given Hamiltonian in the usual way,

$$H_{n,m}=\langle{f_n \mid Hf_m}\rangle,$$

but these matrix elements only encode what the Hamiltonian will do to functions that can be represented by your chosen basis. In our particular case the span of our basis functions only contains square integrable functions. This means we can't use these particular matrix elements to understand how the Hamiltonian determines the dynamics of free particle states (at least not without some sort of further modification).

The eigenvalues you get from these kinds of matrix representations will only be the energies for the bound states. If you try to diagonalize the kinetic energy matrix in this basis you will get garbage. Frequently numerical methods based on this sort of approach have issues near the boundary of the continuum states and the discrete states.