Hilbert Spaces: Inner Products, Orthonormal Bases & Riesz Representation
Hilbert spaces add an inner product to the Banach structure, giving geometry — angles, orthogonality, and projection — that is absent from general Banach spaces. The Riesz representation theorem identifies every continuous linear functional with a vector via the inner product, making Hilbert spaces "self-dual" and enabling a geometric theory of approximation that underlies kernel methods and Gaussian processes.
Concepts
Orthogonal Projection — drag the vector tip
Rotate subspace W
angle = 30°
The residual v − P(v) is always perpendicular to W (right-angle box). This is the Best Approximation Theorem: P(v) is the closest point in W to v.
In ordinary , you can measure angles between vectors, project one vector onto another, and decompose any vector into a component "in the direction of " and a component perpendicular to it. Hilbert spaces generalize this geometric structure to function spaces and infinite dimensions. The core fact is the projection theorem: for any closed subspace and any point outside it, there is a unique closest point in , and the error vector is perpendicular to . This single geometric fact is the foundation of Fourier series, least-squares regression, and the kernel trick.
Inner Product Spaces
An inner product space is a vector space equipped with a map satisfying:
- Positive definiteness: with equality iff
- Linearity in first argument:
- Conjugate symmetry: (reduces to over )
The inner product induces a norm , so every inner product space is a normed space. The parallelogram law characterizes norms arising from inner products — it holds in but fails in and .
Hilbert Spaces
A Hilbert space is a complete inner product space. Examples:
- with the dot product:
- : square-summable sequences with
- : square-integrable functions with
Every Hilbert space is a Banach space, but not conversely ( is Banach but not Hilbert since norms do not satisfy the parallelogram law).
Orthogonality and the Projection Theorem
Two elements are orthogonal, written , if . For a subset , the orthogonal complement is .
Projection theorem. Let be a closed subspace of a Hilbert space and let . Then there exists a unique such that
and . The element is the orthogonal projection of onto , and we have the orthogonal decomposition with and .
The perpendicularity of the error is not a design choice — it is a logical consequence of optimality. If the error had any component inside , you could move in that direction and get a closer point, contradicting minimality. The inner product is the language that makes "perpendicular" meaningful in infinite dimensions; without it, Banach spaces have no notion of angle, and the projection theorem fails for general norms.
Riesz Representation Theorem
Theorem. Let be a Hilbert space and a bounded linear functional. Then there exists a unique such that
and .
This establishes an isometric isomorphism : every bounded functional on is "represented" by an element of itself via the inner product. Hilbert spaces are therefore reflexive ().
Orthonormal Bases and Fourier Series
A sequence in is orthonormal if . It is a complete orthonormal basis (ONB) if the only element orthogonal to all is , equivalently if .
Gram-Schmidt process. Given a linearly independent sequence , produce an ONB by and
Bessel's inequality. For any ONB and : .
Parseval's identity. If is a complete ONB: and .
Fourier series are the canonical ONB expansion in : the functions form a complete ONB.
Worked Example
Gram-Schmidt on in
The inner product is .
Step 1. , , so (normalized).
Step 2. . Since by symmetry, and , so (normalized). The unnormalized polynomial is .
Step 3. . Project out the component: . The component vanishes by symmetry. So , giving (after normalization) the second Legendre polynomial . The standard normalization is .
Best Approximation of by Degree-1 Polynomials
Let in . The best approximation is .
So . The best constant approximation to on in is the constant .
Parseval's Identity for a Simple Fourier Series
Consider on . The Fourier sine coefficients are . Parseval's identity gives:
This recovers the identity , showing Parseval's identity is a non-trivial result even when evaluated on a single function.
Connections
Where Your Intuition Breaks
In finite dimensions, any subspace of is closed, so the projection theorem always applies. In infinite-dimensional Hilbert spaces, subspaces can fail to be closed, and the projection theorem fails for non-closed subspaces. The polynomial subspace of is dense but not closed: every function in can be approximated by polynomials (Weierstrass), but most functions are not polynomials. The projection onto polynomials is not a well-defined map. Closedness is not a technicality — it is the condition that "best approximation" is achievable, not merely approachable. In practice, kernel methods and regularization work precisely because they optimize over closed subspaces (RKHS balls).
Hilbert spaces are special among Banach spaces precisely because the inner product gives a canonical identification of with via the Riesz theorem. In a general Banach space, and are different objects related by duality; in a Hilbert space they coincide isometrically. This "self-duality" enables geometric intuition: optimizing a linear functional over a Hilbert space is the same as finding the closest element to the representing vector, turning optimization into projection.
The kernel trick in machine learning is exactly the projection theorem applied implicitly. A kernel defines a Hilbert space of functions. Training an SVM or fitting a Gaussian process finds the element of a closed subspace (the hypothesis class) closest to the "signal" in — the algorithm never forms explicitly but computes inner products via , making infinite-dimensional optimization computationally tractable.
In infinite-dimensional Hilbert spaces, the closed unit ball is not compact in the norm topology. Sequences on the unit sphere can have no convergent subsequence — for example, in the sequence of standard basis vectors satisfies for , so no subsequence is Cauchy. This breaks finite-dimensional optimization intuition: existence of minimizers over the unit ball cannot be argued by sequential compactness in the norm topology. Instead, one uses weak compactness (the unit ball is weakly compact in a Hilbert space by reflexivity).
| Property | ||||
|---|---|---|---|---|
| Inner product | Yes | Yes | No | No |
| Hilbert space | Yes | Yes | No | No |
| Banach space | Yes | Yes | Yes | Yes |
| Reflexive | Yes | Yes | No | No |
| Separable | Yes | Yes | Yes | Yes |
Enjoying these notes?
Get new lessons delivered to your inbox. No spam.