WTF is a Hilbert Space?
An unexpectedly useful notion
Last week, I wrote extensively about the foundations of functional analysis—why it arose, what sort of questions it could be used to answer, and the most core constructions.
We chased Fourier’s idea that you can decompose a function as an infinite linear combination of functions e2πint, although we ran into some snags:
For most functions f: [0,1]→ℂ, if the Fourier series can be defined at all, it won’t converge pointwise to f.
Even if the Fourier series converges pointwise, it need not converge uniformly (that is, in the L∞ sense). Moreover, there is no guarantee that it will behave nicely with respect to, say, differentiation.
Even though it is true that for any continuous, periodic function there is a sequence of finite linear combinations that will converge (in the L∞ sense) to it, it is not always true that the Fourier series will converge to it (in the L∞ sense). This is true even though the coefficients in those linear combinations will converge to the Fourier coefficients!
So, how do we resolve this? How do we get a theory of Fourier series that actually makes sense?
Easy: if you can’t get convergence with respect to one norm, redefine the problem and try to get convergence with respect to a different norm. Specifically, we are going to show that the natural setting in which to consider Fourier series isn’t L∞ at all—it is L2!
Remember that last time, we talked about how each of the Lp spaces has a dual: if p,q>1 and 1/p+1/q=1, then every continuous, linear map Lp([0,1]) can be obtained from integrating against a function in Lq([0,1]). This means that L2 is unique: it is the only Lp space that is self-dual (since 1/2+1/2=1).
So, if we take any two functions f, g in L2([0,1]) and integrate them against each other—
—then this operation is linear in both f and g, and it is continuous in both inputs as well.
This is almost the operation that we want to study, but not quite. Remember that the L2 norm is
So, to better match that, we are going to define
Then ⟨f,f⟩=||f||22, so it is always positive, unless f=0, in which case it is 0. This operation is now conjugate-linear in the first coordinate—that is,
—but this is a comparatively light sacrifice.
Let me now give the general construction, and then we will talk about how to use this.
Definition: Let V be a complex vector space. An inner product on V is a map ⟨∗,∗⟩: V×V→ℂ that is
complex linear in the second variable1 (that is, ⟨f,cg⟩=c⟨f,g⟩, and ⟨f,g+h⟩=⟨f,g⟩+⟨f,h⟩)
positive definite (that is, ⟨f,f⟩>0 unless f=0), and
swapping the inputs is equivalent to taking the conjugate—that is,
Observe that what we constructed above is precisely an inner product on L2. But we aren’t done. The Cauchy-Schwartz inequality states that for any inner product,
This, in turn, allows you to show that the triangle inequality holds:
What one deduces from this is that ||f||:=⟨f,f⟩1/2 is a norm. Therefore, if a vector space has an inner product defined on it, then it is naturally a normed space. And we already discussed last time that any norm can be turned into a distance function, so the notion of completeness makes total sense. Ergo, the following definition is sensible.
Definition: A Hilbert space is a complete inner product space.
What are some examples? Well, we’ve already discussed one: L2([0,1]) is a Hilbert space, if we define
But while that is the example that we will want to dig into more deeply, let’s back up and do something more down-to-earth first.
Specifically, let’s consider ℂn with the inner product
This is essentially just the dot product—we just need to add the complex conjugate to the first variable so that ⟨v,v⟩ will be the (square) of the Euclidean norm.
In the finite-dimensional setting, we know that the inner product has a rich geometric interpretation: we can use it to define orthogonality and the length of vectors, for instance. Specifically, two vectors are orthogonal to each other if ⟨v,w⟩=0, and the square of the length is ⟨v,v⟩.
We can also talk about orthogonal projection: take one vector w and project it onto a second vector v at a right angle.
Algebraically, this projection is
This is especially easy when v is a unit vector: in that case, the projection is just ⟨v,w⟩v. This makes orthonormal bases very attractive.
An orthonormal basis for ℂn is a collection of vectors v1, v2, v3,… vn such that:
It is a basis: every vector v in ℂn can be written in the form c1v1+c2v2+…cnvn for some unique complex numbers c1,… cn.
Every vector in the basis is a unit vector.
Any two vectors in the basis are orthogonal to each other.
The last two points can be summarized as saying that ⟨vi,vj⟩=1 if i=j and 0 otherwise.
Why is an orthonormal basis so nice? As anyone who has taken a course in linear algebra will tell you, bases are nice in general—they give you convenient ways to calculate things, they give you a simple way to define linear operations (just specify what it does to the basis), and so on. But it can be a little troublesome to take a vector and write it down in terms of an arbitrary basis—it’s pretty fast, but ugly to do by hand and awful for abstract calculations.
Not so for an orthonormal basis! Finding the coefficient ci is a one-step process: ci=⟨vi,v⟩, which follows immediately from linearity. So while an orthonormal basis isn’t always the right tool for the job, it is really convenient in many cases.
Now, here’s the really cool thing: although originally we defined the notions of length, orthogonality, and projection with finite-dimensional Euclidean space in mind, because everything is defined algebraically in terms of the inner product, there is absolutely no reason why we cannot take all of this theory and generalize it—without change—to any Hilbert space!
We can even lift the notion of an orthonormal basis, although there we have to do a little work. Not because the notion of orthonormality needs change—that is the same—but because the notion of basis needs to be tweaked.
The trouble is that what you might naively want to say is that a basis for a Hilbert space is a collection of vectors B such that for any vector v in our Hilbert space, there exists a unique set of complex numbers cB such that
But this is now an infinite sum! So we have to be ever so slightly careful and specify that v is the limit of the partial sums. We can do this because we know that the inner product induces a norm, which induces a distance function, which induces a notion of limits. This is almost the same as the finite-dimensional notion of basis that you are likely more familiar, but because limits are now in the mix, we actually have to worry about convergence.
Thankfully, that’s not too bad if we are working with an orthonormal basis. We want to determine when a sum like
converges in our Hilbert space, given that the vectors are orthonormal. Consider taking the inner product of this sum with itself, assuming it converges:
(Exchanging the infinite sum with the inner product is kosher because the inner product is continuous, as we had previously deduced.)
Ah ha! So, a necessary condition is that the corresponding sum of the coefficients must converge. Less obvious, but nevertheless true, is that this is also sufficient.
Okay, with all of that out of the way, how does this apply to L2([0,1])? What would be an example of an orthonormal basis for this kind of infinite-dimensional Hilbert space?
…That is precisely what the Fourier series gives us!
Observe that if we define un to be the function t↦e2πint, then
So, certainly, this collection of vectors is orthonormal. The only question is whether it is an orthonormal basis—is it true that any function in L2([0,1]) can be approximated arbitrarily closely by a linear combination of such vectors?
We’re actually most of the way to being able to prove that this is so, because we demonstrated last time that for any periodic, continuous function, there is a sequence of such linear combinations that will converge to it. That was in the L∞ sense, but we also showed that it would converge in Lp for any p.
So, all that is left is to prove that the collection of periodic, continuous functions is dense in L2—for any f in L2, there exists a sequence of periodic, continuous functions fn such that fn→f (in the L2 sense).
Periodicity is really not an issue: since functions in L2 are really equivalence classes, we can easily change the value at a point and force periodicity if we need to. Ergo, the crux of what we are asking is whether we can approximate functions in L2 by continuous functions.
I think that this is certainly believable, but the details of the proof are a little technical and require digging into how integrable functions are defined. As such, I am going to skip going into detail.
(Here’s a very abridged overview: by the definition of the Lebesgue integral, one defines the integral of a function by considering sequences of sums of indicator functions—functions that are 1 on some chosen measurable set X, and 0 outside of it. Ergo, it is sufficient to prove that you can approximate any indicator function by a continuous function. By the regularity of Lebesgue measure, for any measurable set X there exists a compact set K and an open set U such that K is contained in X is contained in U, such that the measure of X is as close to the measures of K and U as we like. By Urysohn’s Lemma, there is a continuous function that is 1 inside K, 0 outside of U, and is between those two values in the middle. Because of how we constructed it, this continuous function will be as close to our original indicator function as we like.)
(Look, I warned you it was technical!)
In any case, we now see that we have proved that the functions t↦e2πint form an orthonormal basis for L2([0,1]), from which we gather that for any function f in L2([0,1]), there exists a unique Fourier series decomposition:
where the convergence of the infinite sum must be understood to be in L2, rather than, say, pointwise. Furthermore, for any such function, it is always true that
and conversely, if you have a sequence of complex numbers cn that satisfy this condition, then the corresponding Fourier sum is a function in L2. Finally, we can extract these coefficients using the fact that this is an orthonormal basis:
And observe: all of this applies to all functions in L2, not just continuous ones!
This is pretty much everything that we could wish for concerning Fourier series… with the one teeny sacrifice that we had to give up on L∞ convergence and work with just L2 convergence.
I want to end with a historical note. There is a weirdly common misconception that Hilbert spaces—or even all of functional analysis—grew out of quantum mechanics. I remember once being asked whether Hilbert spaces were an ad hoc mathematical construction to make sense of the Copenhagen interpretation.

In reality, this is backwards. Frigyes Riesz introduced the general notion of an Lp space in 19102; David Hilbert and Erhard Schmidt were already working with L2 even before that, developing the idea of the orthonormal basis in that setting. In contrast, wave mechanics and matrix mechanics in quantum theory were only formulated in 1925—the abovementioned Copenhagen interpretation took form between 1925 and 1927.
While yes, functional analysis and Hilbert spaces are tremendously useful for quantum mechanics (and I will write about this in the future), you don’t need them to justify any of the theory—we saw above that Hilbert spaces are already very useful for entirely classical problems!
What is true is that in 1927, von Neumann showed that you could use Hilbert spaces to unify the disparate approaches of wave and matrix mechanics, giving a general theory of quantum mechanics. This revolutionary paper cemented the term “Hilbert space” and gave (with some small differences) the formal description I laid out above.3 So, certainly for physicists, this was the avenue through which Hilbert spaces entered their lexicon.
The two fields have grown together and have boosted one another. But they are, nevertheless, independent.
Many authors make it linear in the first variable. But I originally learned this in the context of quantum mechanics, and there it is always the second variable. That convention is the one that stuck with me.
Not under that name, though, if I am not mistaken.
Von Neumann required that Hilbert spaces be infinite-dimensional and separable—i.e., possessing a countably infinite orthonormal basis.




Great article!!