Skip to content
The Lumenary
First-year graduateGraduate 150 min

Functional analysis

Linear algebra in infinite dimensions — where continuity is no longer free, unit balls stop being compact, and completeness plus the Baire category theorem give back an astonishing amount.

Formally verified · 12 LeanComputationally tested · 1 PythonAI-drafted · awaiting human reviewMathematically reviewed: Awaiting human review
MotivationH

Solving equations whose unknowns are functions

Around 1900 Ivar Fredholm in Stockholm studied integral equations u(x)−λ∫01K(x,y)u(y) dy=f(x)u(x) - \lambda \int_0^1 K(x, y) u(y) \, dy = f(x), which arise from boundary value problems and potential theory. He noticed that they behave like systems of linear equations: either the homogeneous equation has a non-zero solution, or the inhomogeneous equation has exactly one solution for every ff. David Hilbert and his students in Göttingen then built a theory of "infinitely many unknowns", expanding functions in orthogonal series and diagonalising symmetric kernels — the infinite-dimensional version of diagonalising a symmetric matrix. Stefan Banach and the Lwów school in the 1920s abstracted the setting into complete normed spaces.

The same structures run through modern mathematics: the state space of quantum mechanics is a Hilbert space, the natural home of a weak solution of a PDE is a Sobolev space, the space L1L^1 of probability densities is a Banach space, and optimisation in infinite dimensions needs duality. Functional analysis is linear algebra plus topology, and its lesson is double: much of finite-dimensional linear algebra survives, provided one insists on completeness and continuity, and some of it fails in instructive ways.

IntuitionH

What survives and what breaks

In Rn\R^n every linear map is continuous, all norms are equivalent, the closed unit ball is compact, and a symmetric matrix has an orthonormal basis of eigenvectors. In infinite dimensions:

  • Continuity is no longer automatic. Differentiation f↦f′f \mapsto f' is linear, but sin⁡(nx)\sin(nx) has sup norm 11 while its derivative has sup norm nn. So we must restrict attention to bounded operators, those satisfying ∥Tx∥≤C∥x∥\|Tx\| \le C\|x\|.
  • Norms can be inequivalent. On C[0,1]C[0, 1], ∥xn∥∞=1\|x^n\|_\infty = 1 but ∥xn∥1=1/(n+1)\|x^n\|_1 = 1/(n+1); the two norms give different notions of convergence, and only the first makes C[0,1]C[0, 1] complete.
  • The unit ball is not compact. In ℓ2\ell^2 the unit vectors ene_n satisfy ∥en−em∥=2\|e_n - e_m\| = \sqrt 2 for n≠mn \ne m, so no subsequence converges. Compactness arguments must use weaker topologies.
  • Eigenvalues can vanish. The right shift S(x1,x2,…)=(0,x1,x2,…)S(x_1, x_2, \ldots) = (0, x_1, x_2, \ldots) on ℓ2\ell^2 has no eigenvalues at all.

What survives is carried by completeness. Through the Baire category theorem, completeness yields three "automatic" theorems: pointwise bounded families of operators are uniformly bounded, bijective bounded operators have bounded inverses, and operators with closed graphs are bounded. Through the axiom of choice, the Hahn–Banach theorem supplies enough continuous linear functionals to separate points. In a Hilbert space, the inner product adds geometry — orthogonal projection, Pythagoras — and the Riesz representation theorem identifies the space with its dual. And for compact self-adjoint operators the finite-dimensional spectral theorem survives almost unchanged.

DefinitionsH

Banach spaces, Hilbert spaces and operators

Definition— Banach and Hilbert spaces

A normed space is a vector space XX over K=R\mathbb K = \R or C\C with a norm ∥⋅∥\|\cdot\|; it is a Banach space if it is complete for the metric ∥x−y∥\|x - y\|. An inner product space has an inner product ⟨x,y⟩\langle x, y \rangle, linear in xx and conjugate-symmetric, with ⟨x,x⟩>0\langle x, x \rangle > 0 for x≠0x \ne 0; it is a normed space with ∥x∥=⟨x,x⟩1/2\|x\| = \langle x, x \rangle^{1/2}, by the Cauchy–Schwarz inequality ∣⟨x,y⟩∣≤∥x∥∥y∥|\langle x, y \rangle| \le \|x\| \|y\|. A complete inner product space is a Hilbert space.

Definition— bounded operator, dual space, adjoint

A linear map T:X→YT : X \to Y between normed spaces is bounded if there is a constant CC with ∥Tx∥≤C∥x∥\|Tx\| \le C \|x\| for all xx; the least such CC is the operator norm ∥T∥=sup⁡∥x∥≤1∥Tx∥\|T\| = \sup_{\|x\| \le 1} \|Tx\|. The bounded operators form a normed space B(X,Y)\mathcal B(X, Y), which is a Banach space when YY is. The dual space X∗=B(X,K)X^* = \mathcal B(X, \mathbb K) consists of the bounded linear functionals. On a Hilbert space HH, the adjoint T∗T^* of T∈B(H)T \in \mathcal B(H) is defined by ⟨Tx,y⟩=⟨x,T∗y⟩\langle Tx, y \rangle = \langle x, T^* y \rangle, and TT is self-adjoint if T=T∗T = T^*.

Definition— compact operator

A bounded operator T:X→YT : X \to Y is compact if it maps bounded sets to sets with compact closure; equivalently (for Banach spaces), every bounded sequence (xn)(x_n) has a subsequence along which (Txn)(Tx_n) converges.

Definition— orthonormal basis

An orthonormal set (ei)i∈I(e_i)_{i \in I} in a Hilbert space satisfies ⟨ei,ej⟩=δij\langle e_i, e_j \rangle = \delta_{ij}. It is an orthonormal basis (Hilbert basis) if its closed linear span is the whole space. This is not a basis in the algebraic sense: elements are infinite sums x=∑i⟨x,ei⟩eix = \sum_i \langle x, e_i \rangle e_i converging in norm.

Definition— weak and weak-* topologies

The weak topology on XX is the coarsest topology making every ℓ∈X∗\ell \in X^* continuous: xn⇀xx_n \rightharpoonup x means ℓ(xn)→ℓ(x)\ell(x_n) \to \ell(x) for every ℓ∈X∗\ell \in X^*. The weak-* topology on X∗X^* is the coarsest making every evaluation ℓ↦ℓ(x)\ell \mapsto \ell(x) continuous.

Worked examplesH

Examples, non-examples and pathologies

Example— The basic spaces

  • ℓp\ell^p (1≤p≤∞1 \le p \le \infty), Lp(μ)L^p(\mu) (Riesz–Fischer, from measure theory), and C(K)C(K) with the sup norm for compact KK are Banach spaces. ℓ2\ell^2 and L2(μ)L^2(\mu) are Hilbert spaces with ⟨f,g⟩=∫fgˉ dμ\langle f, g \rangle = \int f \bar g \, d\mu; for p≠2p \ne 2, ℓp\ell^p is not, because its norm fails the parallelogram law ∥x+y∥2+∥x−y∥2=2∥x∥2+2∥y∥2\|x + y\|^2 + \|x - y\|^2 = 2\|x\|^2 + 2\|y\|^2 (try x=e1x = e_1, y=e2y = e_2).
  • C[0,1]C[0, 1] with the norm ∥f∥1=∫01∣f∣\|f\|_1 = \int_0^1 |f| is not complete: continuous functions rising ever more steeply from 00 to 11 near x=12x = \frac12 form a Cauchy sequence whose L1L^1-limit is a step function. Its completion is L1[0,1]L^1[0, 1]. Likewise the polynomials are a dense, incomplete subspace of C[0,1]C[0, 1] (Weierstrass).
  • The trigonometric system en(x)=einx/2πe_n(x) = e^{inx}/\sqrt{2\pi}, n∈Zn \in \Z, is an orthonormal basis of L2(−π,π)L^2(-\pi, \pi); the coefficients ⟨f,en⟩\langle f, e_n \rangle are, up to normalisation, the Fourier coefficients of harmonic analysis.

Example— Unbounded and discontinuous linear maps

Df=f′D f = f' from C1[0,1]C^1[0, 1] to C[0,1]C[0, 1], both with the sup norm, is linear and unbounded: ∥Dsin⁡(n⋅)∥∞=n\|D \sin(n \cdot)\|_\infty = n. (With the norm ∥f∥∞+∥f′∥∞\|f\|_\infty + \|f'\|_\infty on C1[0,1]C^1[0, 1] it becomes bounded: the choice of norm matters.) Worse, on every infinite-dimensional normed space there is a linear functional that is discontinuous everywhere: extend a linearly independent sequence (xn)(x_n) of unit vectors to a Hamel basis (this uses the axiom of choice), set ℓ(xn)=n\ell(x_n) = n and ℓ=0\ell = 0 on the remaining basis vectors.

Example— Compact and non-compact operators

  • A diagonal operator T(xn)=(λnxn)T(x_n) = (\lambda_n x_n) on ℓ2\ell^2 is bounded with ∥T∥=sup⁡∣λn∣\|T\| = \sup |\lambda_n|, and compact exactly when λn→0\lambda_n \to 0: then TT is a norm limit of the finite-rank truncations, and norm limits of finite-rank operators are compact.
  • An integral operator (Kf)(x)=∫K(x,y)f(y) dy(Kf)(x) = \int K(x, y) f(y) \, dy with K∈L2([0,1]2)K \in L^2([0, 1]^2) is compact (a Hilbert–Schmidt operator), and self-adjoint when K(x,y)=K(y,x)‾K(x, y) = \overline{K(y, x)}. Example: G(x,y)=min⁡(x,y)(1−max⁡(x,y))G(x, y) = \min(x, y)\big(1 - \max(x, y)\big), for which u=Gfu = Gf solves −u′′=f-u'' = f, u(0)=u(1)=0u(0) = u(1) = 0. Its eigenfunctions are 2sin⁡(kπx)\sqrt 2 \sin(k\pi x) with eigenvalues 1/(kπ)21/(k\pi)^2.
  • The identity of an infinite-dimensional space is not compact (the unit ball is not compact), and neither is the shift SS: (Sen)=(en+1)(S e_n) = (e_{n+1}) has no convergent subsequence. The left shift S∗(x1,x2,…)=(x2,x3,…)S^*(x_1, x_2, \ldots) = (x_2, x_3, \ldots) has every λ\lambda with ∣λ∣<1|\lambda| < 1 as an eigenvalue, with eigenvector (1,λ,λ2,…)(1, \lambda, \lambda^2, \ldots).
ProofH

Hilbert spaces: projection and representation

Theorem— Proposition (bounded = continuous)

For a linear map T:X→YT : X \to Y between normed spaces, the following are equivalent: (i) TT is bounded; (ii) TT is continuous; (iii) TT is continuous at 00.

Proof

(i) ⇒ (ii): ∥Tx−Ty∥=∥T(x−y)∥≤C∥x−y∥\|Tx - Ty\| = \|T(x - y)\| \le C \|x - y\|, so TT is Lipschitz. (ii) ⇒ (iii) is trivial. (iii) ⇒ (i): there is δ>0\delta > 0 with ∥Tz∥≤1\|Tz\| \le 1 whenever ∥z∥≤δ\|z\| \le \delta. For x≠0x \ne 0 put z=δx/∥x∥z = \delta x / \|x\|; then ∥Tx∥=∥x∥δ∥Tz∥≤1δ∥x∥\|Tx\| = \frac{\|x\|}{\delta} \|Tz\| \le \frac1\delta \|x\|.

∎

Theorem— Projection theorem

Let KK be a non-empty closed convex subset of a Hilbert space HH and x∈Hx \in H. There is a unique y∈Ky \in K with ∥x−y∥=dist⁡(x,K)\|x - y\| = \operatorname{dist}(x, K). If K=MK = M is a closed subspace, yy is characterised by x−y⊥Mx - y \perp M, and H=M⊕M⊥H = M \oplus M^\perp.

Proof

Let d=dist⁡(x,K)d = \operatorname{dist}(x, K) and choose yn∈Ky_n \in K with ∥x−yn∥→d\|x - y_n\| \to d. The parallelogram law applied to x−ynx - y_n and x−ymx - y_m gives

∥yn−ym∥2=2∥x−yn∥2+2∥x−ym∥2−4∥x−yn+ym2∥2≤2∥x−yn∥2+2∥x−ym∥2−4d2,\|y_n - y_m\|^2 = 2\|x - y_n\|^2 + 2\|x - y_m\|^2 - 4\Big\|x - \tfrac{y_n + y_m}{2}\Big\|^2 \le 2\|x - y_n\|^2 + 2\|x - y_m\|^2 - 4d^2,

since yn+ym2∈K\frac{y_n + y_m}2 \in K by convexity. The right side tends to 00, so (yn)(y_n) is Cauchy; by completeness it converges to some yy, which lies in KK because KK is closed, and ∥x−y∥=d\|x - y\| = d. Applying the same inequality to two minimisers shows that they coincide.

If K=MK = M is a subspace and z∈Mz \in M, then t↦∥x−(y+tz)∥2=∥x−y∥2−2tRe⁡⟨x−y,z⟩+t2∥z∥2t \mapsto \|x - (y + tz)\|^2 = \|x - y\|^2 - 2t \operatorname{Re}\langle x - y, z \rangle + t^2 \|z\|^2 is minimal at t=0t = 0 (also for complex multiples), forcing ⟨x−y,z⟩=0\langle x - y, z \rangle = 0. Conversely, if x−y⊥Mx - y \perp M, Pythagoras gives ∥x−z∥2=∥x−y∥2+∥y−z∥2\|x - z\|^2 = \|x - y\|^2 + \|y - z\|^2 for z∈Mz \in M, so yy is the minimiser. Writing x=y+(x−y)x = y + (x - y) gives H=M+M⊥H = M + M^\perp, and M∩M⊥={0}M \cap M^\perp = \{0\}.

∎

Theorem— Riesz representation theorem (Fréchet, Riesz 1907)

Let HH be a Hilbert space. For every ℓ∈H∗\ell \in H^* there is a unique y∈Hy \in H with ℓ(x)=⟨x,y⟩\ell(x) = \langle x, y \rangle for all x∈Hx \in H, and ∥ℓ∥=∥y∥\|\ell\| = \|y\|. The map ℓ↦y\ell \mapsto y is a conjugate-linear isometric bijection H∗→HH^* \to H.

Proof

Uniqueness: if ⟨x,y1⟩=⟨x,y2⟩\langle x, y_1 \rangle = \langle x, y_2 \rangle for all xx, take x=y1−y2x = y_1 - y_2 to get ∥y1−y2∥2=0\|y_1 - y_2\|^2 = 0.

Existence: if ℓ=0\ell = 0 take y=0y = 0. Otherwise M=ker⁡ℓM = \ker \ell is a closed subspace (as ℓ\ell is continuous) and M≠HM \ne H, so by the projection theorem there is a unit vector z⊥Mz \perp M. For any xx, the vector ℓ(x)z−ℓ(z)x\ell(x) z - \ell(z) x lies in MM, hence is orthogonal to zz:

0=⟨ℓ(x)z−ℓ(z)x,z⟩=ℓ(x)−ℓ(z)⟨x,z⟩,0 = \langle \ell(x) z - \ell(z) x, z \rangle = \ell(x) - \ell(z) \langle x, z \rangle,

so ℓ(x)=⟨x,ℓ(z)‾z⟩\ell(x) = \langle x, \overline{\ell(z)} z \rangle and y=ℓ(z)‾zy = \overline{\ell(z)} z works. Finally Cauchy–Schwarz gives ∣ℓ(x)∣≤∥x∥∥y∥|\ell(x)| \le \|x\| \|y\|, with equality at x=yx = y, so ∥ℓ∥=∥y∥\|\ell\| = \|y\|.

∎

Theorem— Theorem (orthonormal bases)

Let (en)n≥1(e_n)_{n \ge 1} be an orthonormal sequence in a Hilbert space HH. Then Bessel's inequality ∑n∣⟨x,en⟩∣2≤∥x∥2\sum_n |\langle x, e_n \rangle|^2 \le \|x\|^2 holds, the series ∑n⟨x,en⟩en\sum_n \langle x, e_n \rangle e_n converges for every xx, and the following are equivalent: (a) (en)(e_n) is an orthonormal basis; (b) ⟨x,en⟩=0\langle x, e_n \rangle = 0 for all nn implies x=0x = 0; (c) x=∑n⟨x,en⟩enx = \sum_n \langle x, e_n \rangle e_n for all xx; (d) Parseval: ∥x∥2=∑n∣⟨x,en⟩∣2\|x\|^2 = \sum_n |\langle x, e_n \rangle|^2 for all xx.

Proof

With sN=∑n≤N⟨x,en⟩ens_N = \sum_{n \le N} \langle x, e_n \rangle e_n, the vector x−sNx - s_N is orthogonal to e1,…,eNe_1, \ldots, e_N, so Pythagoras gives ∥x∥2=∥x−sN∥2+∑n≤N∣⟨x,en⟩∣2\|x\|^2 = \|x - s_N\|^2 + \sum_{n \le N} |\langle x, e_n \rangle|^2, which is Bessel's inequality. Hence ∥sM−sN∥2=∑N<n≤M∣⟨x,en⟩∣2→0\|s_M - s_N\|^2 = \sum_{N < n \le M} |\langle x, e_n \rangle|^2 \to 0, and by completeness sN→ss_N \to s for some ss, with x−s⊥enx - s \perp e_n for all nn. (a) ⇒ (b): if x⊥enx \perp e_n for all nn, then xx is orthogonal to their closed span HH, so x⊥xx \perp x. (b) ⇒ (c): apply (b) to x−sx - s. (c) ⇒ (d): let N→∞N \to \infty in the Pythagoras identity. (d) ⇒ (a): (d) says ∥x−sN∥→0\|x - s_N\| \to 0, so xx lies in the closed span.

∎

Every separable Hilbert space has a countable orthonormal basis (Gram–Schmidt applied to a dense sequence), so every infinite-dimensional separable Hilbert space is isometrically isomorphic to ℓ2\ell^2 by x↦(⟨x,en⟩)nx \mapsto (\langle x, e_n \rangle)_n. In particular L2(−π,π)≅ℓ2(Z)L^2(-\pi, \pi) \cong \ell^2(\Z) by Fourier coefficients: Parseval's identity for Fourier series is (d).

ProofH

Banach spaces: Baire, uniform boundedness, open mapping, Hahn–Banach

The engine of the next three theorems is the Baire category theorem: in a complete metric space, a countable intersection of dense open sets is dense; equivalently, a complete metric space is not a countable union of nowhere dense closed sets. (Proof: given a ball B0B_0 and dense open U1,U2,…U_1, U_2, \ldots, choose closed balls Bn‾⊆Bn−1∩Un\overline{B_n} \subseteq B_{n-1} \cap U_n with radii →0\to 0; their centres form a Cauchy sequence whose limit lies in B0∩⋂UnB_0 \cap \bigcap U_n. See point-set topology.)

Theorem— Uniform boundedness principle (Banach–Steinhaus 1927)

Let XX be a Banach space, YY a normed space, and F⊆B(X,Y)\mathcal F \subseteq \mathcal B(X, Y) a family with sup⁡T∈F∥Tx∥<∞\sup_{T \in \mathcal F} \|Tx\| < \infty for every x∈Xx \in X. Then sup⁡T∈F∥T∥<∞\sup_{T \in \mathcal F} \|T\| < \infty.

Proof

The sets Fn={x:∥Tx∥≤n for all T∈F}F_n = \{x : \|Tx\| \le n \text{ for all } T \in \mathcal F\} are closed (intersections of closed sets, by continuity of each TT), and by hypothesis X=⋃nFnX = \bigcup_n F_n. By the Baire category theorem some FNF_N contains a closed ball B‾(x0,r)\overline B(x_0, r) with r>0r > 0. For ∥z∥≤r\|z\| \le r, both x0x_0 and x0+zx_0 + z lie in FNF_N, so ∥Tz∥≤∥T(x0+z)∥+∥Tx0∥≤2N\|Tz\| \le \|T(x_0 + z)\| + \|T x_0\| \le 2N for every T∈FT \in \mathcal F. Scaling, ∥T∥≤2N/r\|T\| \le 2N/r for all T∈FT \in \mathcal F.

∎

Completeness is essential. On the space c00c_{00} of finitely supported sequences with the sup norm, Tn(x)=nxnT_n(x) = n x_n satisfies sup⁡n∣Tnx∣<∞\sup_n |T_n x| < \infty for each xx (only finitely many xn≠0x_n \ne 0), but ∥Tn∥=n\|T_n\| = n. A famous application: there is a continuous 2π2\pi-periodic function whose Fourier series diverges at 00, because the partial-sum functionals f↦SNf(0)f \mapsto S_N f(0) on C(T)C(\mathbb T) have norms equal to the Lebesgue constants ∥DN∥L1∼4π2log⁡N→∞\|D_N\|_{L^1} \sim \frac{4}{\pi^2} \log N \to \infty.

Theorem— Open mapping and closed graph theorems (Banach 1929–1932, Schauder 1930)

Let X,YX, Y be Banach spaces and T∈B(X,Y)T \in \mathcal B(X, Y).

  1. (Open mapping) If TT is surjective, then TT maps open sets to open sets. In particular a bijective bounded operator has a bounded inverse.
  2. (Closed graph) A linear map T:X→YT : X \to Y whose graph {(x,Tx)}\{(x, Tx)\} is closed in X×YX \times Y is bounded.

About the proof. For (1), Y=⋃nT(B(0,n))‾Y = \bigcup_n \overline{T(B(0, n))}, so by Baire some T(B(0,n))‾\overline{T(B(0, n))} has interior, and by linearity T(B(0,1))‾⊇B(0,δ)\overline{T(B(0, 1))} \supseteq B(0, \delta) for some δ>0\delta > 0. A successive approximation argument, summing a series that converges by completeness of XX, removes the closure: T(B(0,2))⊇B(0,δ)T(B(0, 2)) \supseteq B(0, \delta). See Brezis, Theorem 2.6. (2) follows from (1): the graph Γ\Gamma is a closed subspace of X×YX \times Y, hence Banach, and the projection Γ→X\Gamma \to X, (x,Tx)↦x(x, Tx) \mapsto x, is a bounded bijection; its inverse x↦(x,Tx)x \mapsto (x, Tx) is therefore bounded, and so is TT.

In practice the closed graph theorem says: to prove that TT is bounded, it suffices to show that xn→xx_n \to x and Txn→yTx_n \to y imply y=Txy = Tx. For example, a symmetric operator defined on all of a Hilbert space (⟨Tx,y⟩=⟨x,Ty⟩\langle Tx, y \rangle = \langle x, Ty \rangle) is automatically bounded (Hellinger–Toeplitz). This is why the unbounded operators of quantum mechanics, such as momentum −i d/dx-i \, d/dx, are only defined on dense subspaces.

Theorem— Hahn–Banach theorem (Hahn 1927, Banach 1929)

Let XX be a real vector space, p:X→Rp : X \to \R sublinear (p(x+y)≤p(x)+p(y)p(x + y) \le p(x) + p(y) and p(tx)=tp(x)p(tx) = t p(x) for t≥0t \ge 0), M⊆XM \subseteq X a subspace and f:M→Rf : M \to \R linear with f≤pf \le p on MM. Then ff extends to a linear F:X→RF : X \to \R with F≤pF \le p on XX. In particular, every bounded linear functional on a subspace of a normed space (real or complex) extends to the whole space with the same norm.

About the proof. One extends ff by one dimension at a time — the inequality f≤pf \le p leaves an interval of admissible values for F(x0)F(x_0) — and Zorn's lemma, applied to the partially ordered set of dominated extensions, produces a maximal one, which must be defined everywhere. The complex case follows by applying the real case to Re⁡f\operatorname{Re} f. Consequences: X∗X^* separates points; ∥x∥=max⁡∥ℓ∥≤1∣ℓ(x)∣\|x\| = \max_{\|\ell\| \le 1} |\ell(x)|, so XX embeds isometrically in its bidual X∗∗X^{**}; and (in its geometric form) disjoint convex sets, one open, can be separated by a closed hyperplane — the foundation of convex optimisation and duality.

ProofH

Compactness lost and regained

Theorem— Theorem (the unit ball is not compact)

The closed unit ball of an infinite-dimensional Hilbert space is not compact in the norm topology. More generally (F. Riesz, 1918), a normed space has a compact closed unit ball if and only if it is finite-dimensional.

Proof

An infinite-dimensional Hilbert space contains an orthonormal sequence (en)(e_n): apply Gram–Schmidt to any linearly independent sequence. For n≠mn \ne m, ∥en−em∥2=∥en∥2−2Re⁡⟨en,em⟩+∥em∥2=2\|e_n - e_m\|^2 = \|e_n\|^2 - 2 \operatorname{Re}\langle e_n, e_m \rangle + \|e_m\|^2 = 2. So no subsequence of (en)(e_n) is Cauchy, let alone convergent, although every ene_n lies in the closed unit ball. In a compact metric space every sequence has a convergent subsequence; hence the ball is not compact. For a general normed space, Riesz's lemma replaces orthonormality: if M⊊XM \subsetneq X is a closed subspace, there are unit vectors xx with dist⁡(x,M)>12\operatorname{dist}(x, M) > \frac12, which yields a sequence of unit vectors at mutual distance >12> \frac12.

∎

Compactness returns in a weaker topology. Banach–Alaoglu: the closed unit ball of X∗X^* is weak-* compact. In a Hilbert space (indeed in any reflexive space) every bounded sequence has a weakly convergent subsequence. The orthonormal sequence above converges weakly to 00: ⟨en,y⟩→0\langle e_n, y \rangle \to 0 for every yy, by Bessel's inequality. Weak compactness is the standard tool for producing solutions of variational problems and PDEs: minimise, extract a weakly convergent minimising sequence, and use lower semicontinuity of the norm, ∥x∥≤lim inf⁡∥xn∥\|x\| \le \liminf \|x_n\| when xn⇀xx_n \rightharpoonup x.

ProofH

The spectral theorem for compact self-adjoint operators

Let HH be a Hilbert space and T∈B(H)T \in \mathcal B(H) self-adjoint. Then ⟨Tx,x⟩=⟨x,Tx⟩=⟨Tx,x⟩‾\langle Tx, x \rangle = \langle x, Tx \rangle = \overline{\langle Tx, x \rangle} is real, eigenvalues are real, and eigenvectors for different eigenvalues are orthogonal: λ⟨x,y⟩=⟨Tx,y⟩=⟨x,Ty⟩=μ⟨x,y⟩\lambda \langle x, y \rangle = \langle Tx, y \rangle = \langle x, Ty \rangle = \mu \langle x, y \rangle. If TT leaves a subspace MM invariant, it also leaves M⊥M^\perp invariant: for y∈M⊥y \in M^\perp and x∈Mx \in M, ⟨Ty,x⟩=⟨y,Tx⟩=0\langle Ty, x \rangle = \langle y, Tx \rangle = 0.

Theorem— Lemma (norm of a self-adjoint operator)

If TT is self-adjoint, then ∥T∥=sup⁡∥x∥=1∣⟨Tx,x⟩∣\|T\| = \sup_{\|x\| = 1} |\langle Tx, x \rangle|.

Proof

Let mm be the supremum; Cauchy–Schwarz gives m≤∥T∥m \le \|T\|. For unit vectors x,yx, y, expanding and using self-adjointness,

4Re⁡⟨Tx,y⟩=⟨T(x+y),x+y⟩−⟨T(x−y),x−y⟩≤m(∥x+y∥2+∥x−y∥2)=4m4 \operatorname{Re}\langle Tx, y \rangle = \langle T(x + y), x + y \rangle - \langle T(x - y), x - y \rangle \le m\big(\|x + y\|^2 + \|x - y\|^2\big) = 4m

by the parallelogram law. If Tx≠0Tx \ne 0, take y=Tx/∥Tx∥y = Tx / \|Tx\| to get ∥Tx∥≤m\|Tx\| \le m.

∎

Theorem— Lemma (an extremal eigenvalue)

If T≠0T \ne 0 is compact and self-adjoint, then ∥T∥\|T\| or −∥T∥-\|T\| is an eigenvalue of TT.

Proof

By the previous lemma there are unit vectors xnx_n with ⟨Txn,xn⟩→λ\langle Tx_n, x_n \rangle \to \lambda, where λ=±∥T∥≠0\lambda = \pm\|T\| \ne 0. Then

∥Txn−λxn∥2=∥Txn∥2−2λ⟨Txn,xn⟩+λ2≤2λ2−2λ⟨Txn,xn⟩→0.\|Tx_n - \lambda x_n\|^2 = \|Tx_n\|^2 - 2\lambda \langle Tx_n, x_n \rangle + \lambda^2 \le 2\lambda^2 - 2\lambda \langle Tx_n, x_n \rangle \to 0.

By compactness, a subsequence satisfies Txnk→yTx_{n_k} \to y. Then λxnk=Txnk−(Txnk−λxnk)→y\lambda x_{n_k} = Tx_{n_k} - (Tx_{n_k} - \lambda x_{n_k}) \to y, so xnk→x:=y/λx_{n_k} \to x := y/\lambda, a unit vector, and by continuity Tx=lim⁡Txnk=y=λxTx = \lim Tx_{n_k} = y = \lambda x.

∎

Theorem— Spectral theorem for compact self-adjoint operators (Hilbert, Schmidt)

Let TT be a compact self-adjoint operator on a Hilbert space HH. There is a finite or countably infinite orthonormal sequence (ek)(e_k) of eigenvectors, Tek=λkekT e_k = \lambda_k e_k, with real λk≠0\lambda_k \ne 0, ∣λ1∣≥∣λ2∣≥⋯|\lambda_1| \ge |\lambda_2| \ge \cdots and λk→0\lambda_k \to 0 if the sequence is infinite, such that

Tx=∑kλk⟨x,ek⟩ekfor all x∈H.Tx = \sum_k \lambda_k \langle x, e_k \rangle e_k \quad \text{for all } x \in H.

The (ek)(e_k) form an orthonormal basis of ran⁡T‾\overline{\operatorname{ran} T}, and H=ker⁡T⊕ran⁡T‾H = \ker T \oplus \overline{\operatorname{ran} T}. Each non-zero eigenvalue has finite multiplicity, and the non-zero eigenvalues can accumulate only at 00.

Proof

Put H1=HH_1 = H. If T∣H1≠0T|_{H_1} \ne 0, the lemma gives a unit eigenvector e1e_1 with ∣λ1∣=∥T∥|\lambda_1| = \|T\|. Let H2={e1}⊥H_2 = \{e_1\}^\perp; it is invariant under TT, and T∣H2T|_{H_2} is compact and self-adjoint. If T∣H2≠0T|_{H_2} \ne 0 we find e2∈H2e_2 \in H_2 with ∣λ2∣=∥T∣H2∥≤∣λ1∣|\lambda_2| = \|T|_{H_2}\| \le |\lambda_1|, and so on, with Hn+1={e1,…,en}⊥H_{n+1} = \{e_1, \ldots, e_n\}^\perp. Either T∣Hn+1=0T|_{H_{n+1}} = 0 for some nn, or we obtain an infinite orthonormal sequence.

In the infinite case λk→0\lambda_k \to 0: otherwise ∣λk∣≥δ>0|\lambda_k| \ge \delta > 0 for all kk, and ∥Tej−Tek∥2=λj2+λk2≥2δ2\|Te_j - Te_k\|^2 = \lambda_j^2 + \lambda_k^2 \ge 2\delta^2 for j≠kj \ne k, so the bounded sequence (ek)(e_k) has no subsequence along which (Tek)(Te_k) converges, contradicting compactness.

For x∈Hx \in H, the vector yn=x−∑k≤n⟨x,ek⟩eky_n = x - \sum_{k \le n} \langle x, e_k \rangle e_k lies in Hn+1H_{n+1} and ∥yn∥≤∥x∥\|y_n\| \le \|x\| (Bessel), so

∥Tx−∑k≤nλk⟨x,ek⟩ek∥=∥Tyn∥≤∥T∣Hn+1∥ ∥x∥=∣λn+1∣ ∥x∥→0\Big\| Tx - \sum_{k \le n} \lambda_k \langle x, e_k \rangle e_k \Big\| = \|T y_n\| \le \|T|_{H_{n+1}}\| \, \|x\| = |\lambda_{n+1}| \, \|x\| \to 0

(or =0= 0 in the finite case once T∣Hn+1=0T|_{H_{n+1}} = 0). This proves the expansion. It shows ran⁡T⊆span⁡‾{ek}\operatorname{ran} T \subseteq \overline{\operatorname{span}}\{e_k\}, while ek=T(ek/λk)∈ran⁡Te_k = T(e_k / \lambda_k) \in \operatorname{ran} T; so (ek)(e_k) is an orthonormal basis of ran⁡T‾\overline{\operatorname{ran} T}. By the expansion, Tx=0Tx = 0 iff ⟨x,ek⟩=0\langle x, e_k \rangle = 0 for all kk, so ker⁡T={ek}⊥=(ran⁡T‾)⊥\ker T = \{e_k\}^\perp = (\overline{\operatorname{ran} T})^\perp. If μ≠0\mu \ne 0 is an eigenvalue with eigenvector xx, then μx=Tx\mu x = Tx forces xx into the closed span of the eke_k with λk=μ\lambda_k = \mu; as λk→0\lambda_k \to 0 there are finitely many such kk, so the eigenspace is finite-dimensional, and every non-zero eigenvalue is some λk\lambda_k.

∎

Applied to the Green's operator GG of −u′′=f-u'' = f on (0,1)(0, 1), the theorem produces the sine basis 2sin⁡(kπx)\sqrt 2 \sin(k\pi x) of L2(0,1)L^2(0, 1) — Fourier series as a spectral theorem. Applied to I−λKI - \lambda K with KK compact and self-adjoint, it gives the Fredholm alternative: for λ≠0\lambda \ne 0, either λ−1\lambda^{-1} is an eigenvalue of KK or I−λKI - \lambda K is invertible (the Riesz–Schauder theory extends this to every compact KK). For bounded self-adjoint operators that are not compact (multiplication by xx on L2(0,1)L^2(0, 1), which has no eigenvalues at all), the spectral theorem needs projection-valued measures: von Neumann (1929) and Stone (1932), extending it to unbounded operators for quantum mechanics.

Formal mathematicsF

Functional analysis in Lean and Mathlib

Mathlib distinguishes E →ₗ[ℝ] F (linear maps) from E →L[ℝ] F (continuous linear maps) — a type-level reminder that continuity is extra structure in infinite dimensions. The first half of "bounded ⇔ continuous", proved directly:

continuous_of_boundLean 4Proved here from basic factsFormally verified
/-- **Bounded linear maps are continuous.** If `‖T x‖ ≤ C ‖x‖` for all `x`, then
`‖T y − T x‖ = ‖T (y − x)‖ ≤ C ‖y − x‖`, so `T` is (Lipschitz) continuous: given `ε > 0`,
take `δ = ε / (|C| + 1)`. (Mathlib: `LinearMap.continuous_of_bound`; the converse, that a
continuous linear map is bounded, is `ContinuousLinearMap.le_opNorm`.) -/
theorem continuous_of_bound {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [NormedAddCommGroup F] [NormedSpace ℝ F] (T : E →ₗ[ℝ] F) (C : ℝ)
    (h : ∀ x, ‖T x‖ ≤ C * ‖x‖) : Continuous T := by
  rw [Metric.continuous_iff]
  intro x ε hε
  have hC : 0 < |C| + 1 := by positivity
  refine ⟨ε / (|C| + 1), by positivity, fun y hy => ?_⟩
  rw [dist_eq_norm] at hy ⊢
  rw [← map_sub]
  calc ‖T (y - x)‖ ≤ C * ‖y - x‖ := h (y - x)
    _ ≤ (|C| + 1) * ‖y - x‖ := by
        apply mul_le_mul_of_nonneg_right _ (norm_nonneg _)
        linarith [le_abs_self C]
    _ < (|C| + 1) * (ε / (|C| + 1)) := mul_lt_mul_of_pos_left hy hC
    _ = ε := by field_simp
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor

The Riesz representation theorem is Mathlib's isometric conjugate-linear equivalence InnerProductSpace.toDual : E ≃ₗᵢ⋆[𝕜] StrongDual 𝕜 E. Note that Mathlib's inner product is conjugate-linear in the first argument (the physicists' convention), so the representing vector goes on the left. Uniqueness, proved as in the lesson:

riesz_representationLean 4Applies a library theoremFormally verified
/-- **Riesz representation theorem** (Fréchet–Riesz). On a Hilbert space `E` over `𝕜 = ℝ` or `ℂ`,
every bounded linear functional `ℓ` is an inner product with a fixed vector:
`ℓ x = ⟪y, x⟫` for some `y`. (Mathlib's inner product is conjugate-linear in the *first*
slot.) This applies Mathlib's isometric equivalence `InnerProductSpace.toDual`. -/
theorem riesz_representation {𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E]
    [InnerProductSpace 𝕜 E] [CompleteSpace E] (ℓ : StrongDual 𝕜 E) :
    ∃ y : E, ∀ x, ℓ x = ⟪y, x⟫_𝕜 :=
  ⟨(InnerProductSpace.toDual 𝕜 E).symm ℓ, fun _ => InnerProductSpace.toDual_symm_apply.symm⟩
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor
riesz_uniqueLean 4Proved here from basic factsFormally verified
/-- **Uniqueness of the representing vector.** If `⟪y₁, x⟫ = ⟪y₂, x⟫` for every `x`, then
`y₁ = y₂`: take `x = y₁ − y₂` to get `⟪y₁ − y₂, y₁ − y₂⟫ = 0`, and an inner product is
definite. (This does not need completeness; existence does.) -/
theorem riesz_unique {𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E]
    {y₁ y₂ : E} (h : ∀ x, ⟪y₁, x⟫_𝕜 = ⟪y₂, x⟫_𝕜) : y₁ = y₂ := by
  have h0 : ⟪y₁ - y₂, y₁ - y₂⟫_𝕜 = 0 := by
    rw [inner_sub_left, h (y₁ - y₂), sub_self]
  exact sub_eq_zero.mp (inner_self_eq_zero.mp h0)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor

The three Baire-category theorems and Hahn–Banach, all library theorems:

uniform_boundednessLean 4Applies a library theoremFormally verified
/-- **Uniform boundedness principle** (Banach–Steinhaus). A family of bounded operators on a
Banach space that is bounded at each point is bounded in operator norm. Proved in Mathlib
(`banach_steinhaus`) from the Baire category theorem, as in the lesson. -/
theorem uniform_boundedness {ι E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] {T : ι → E →L[ℝ] F}
    (h : ∀ x, ∃ C, ∀ i, ‖T i x‖ ≤ C) : ∃ C', ∀ i, ‖T i‖ ≤ C' :=
  banach_steinhaus h
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor
open_mappingLean 4Applies a library theoremFormally verified
/-- **Open mapping theorem** (Banach–Schauder). A surjective bounded operator between Banach
spaces maps open sets to open sets. This is Mathlib's `ContinuousLinearMap.isOpenMap`. -/
theorem open_mapping {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E]
    [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] (T : E →L[ℝ] F)
    (hT : Function.Surjective T) : IsOpenMap T :=
  T.isOpenMap hT
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor
closed_graphLean 4Applies a library theoremFormally verified
/-- **Closed graph theorem.** A linear map between Banach spaces whose graph is closed in
`E × F` is continuous. This is Mathlib's `LinearMap.continuous_of_isClosed_graph`. -/
theorem closed_graph {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E]
    [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] (T : E →ₗ[ℝ] F)
    (hT : IsClosed (T.graph : Set (E × F))) : Continuous T :=
  T.continuous_of_isClosed_graph hT
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor
hahn_banachLean 4Applies a library theoremFormally verified
/-- **Hahn–Banach theorem** (normed version). A bounded linear functional on a subspace extends
to the whole space *with the same norm*. Mathlib proves it (`exists_extension_norm_eq`) from
the sublinear-functional version, which uses Zorn's lemma. -/
theorem hahn_banach {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] (p : Subspace ℝ E)
    (f : StrongDual ℝ p) : ∃ g : StrongDual ℝ E, (∀ x : p, g x = f x) ∧ ‖g‖ = ‖f‖ :=
  exists_extension_norm_eq p f
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor

The non-compactness of the unit ball, proved from scratch from an orthonormal sequence (the lesson's proof), next to Mathlib's converse in arbitrary normed spaces:

orthonormal_dist_sqLean 4Proved here from basic factsFormally verified
/-- Distinct members of an orthonormal family are at distance `√2`:
`‖eᵢ − eⱼ‖² = ‖eᵢ‖² − 2⟪eᵢ, eⱼ⟫ + ‖eⱼ‖² = 1 − 0 + 1 = 2` (Pythagoras). -/
theorem orthonormal_dist_sq {E ι : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    {e : ι → E} (he : Orthonormal ℝ e) {i j : ι} (hij : i ≠ j) : ‖e i - e j‖ ^ 2 = 2 := by
  rw [norm_sub_sq_real, he.1 i, he.1 j, he.2 hij]
  norm_num
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor
closedBall_not_compactLean 4Proved here from basic factsFormally verified
/-- **The closed unit ball of an infinite-dimensional Hilbert space is not compact.** If `E` has
an orthonormal sequence `e₀, e₁, …` (every infinite-dimensional Hilbert space does, by
Gram–Schmidt), the `eₙ` lie in the closed unit ball but no subsequence is Cauchy, because
distinct terms are `√2 > 1` apart. A compact metric space would contain a convergent, hence
Cauchy, subsequence. -/
theorem closedBall_not_compact {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    {e : ℕ → E} (he : Orthonormal ℝ e) : ¬ IsCompact (closedBall (0 : E) 1) := by
  intro hK
  have hmem : ∀ n, e n ∈ closedBall (0 : E) 1 := fun n => by
    rw [mem_closedBall, dist_zero_right, he.1 n]
  obtain ⟨a, -, φ, hφ, hlim⟩ := hK.tendsto_subseq hmem
  -- A convergent sequence is Cauchy: eventually all terms are within `1` of each other.
  obtain ⟨N, hN⟩ := Metric.cauchySeq_iff'.1 hlim.cauchySeq 1 one_pos
  have hlt : dist (e (φ (N + 1))) (e (φ N)) < 1 := hN (N + 1) (Nat.le_succ N)
  have hne : φ (N + 1) ≠ φ N := (hφ (Nat.lt_succ_self N)).ne'
  have h2 := orthonormal_dist_sq he hne
  rw [dist_eq_norm] at hlt
  nlinarith [norm_nonneg (e (φ (N + 1)) - e (φ N))]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor
riesz_compact_ballLean 4Applies a library theoremFormally verified
/-- **F. Riesz's theorem.** Conversely, in any normed space, a compact closed ball of positive
radius forces finite dimension. This is Mathlib's `FiniteDimensional.of_isCompact_closedBall`,
proved from Riesz's lemma. -/
theorem riesz_compact_ball {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {r : ℝ}
    (hr : 0 < r) (h : IsCompact (closedBall (0 : E) r)) : FiniteDimensional ℝ E :=
  FiniteDimensional.of_isCompact_closedBall ℝ hr h
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor

Mathlib's spectral theorem for compact self-adjoint operators is stated as: the orthogonal complement of the span of all eigenspaces is zero, and eigenspaces for non-zero eigenvalues are finite-dimensional. Together with the orthogonality of eigenspaces this is the theorem proved above.

spectral_compact_symmetricLean 4Applies a library theoremFormally verified
/-- **Spectral theorem for compact self-adjoint operators**, completeness part. For a compact
symmetric operator `T` on a Hilbert space, the eigenspaces span a dense subspace: the orthogonal
complement of their span is `0`. Choosing an orthonormal basis of each (finite-dimensional, for
non-zero eigenvalues) eigenspace gives an orthonormal basis of eigenvectors. This is Mathlib's
`ContinuousLinearMap.orthogonalComplement_iSup_eigenspaces_eq_bot`. -/
theorem spectral_compact_symmetric {𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E]
    [InnerProductSpace 𝕜 E] [CompleteSpace E] {T : E →L[𝕜] E} (hT : IsCompactOperator T)
    (hT' : (T : E →ₗ[𝕜] E).IsSymmetric) :
    (⨆ μ, Module.End.eigenspace (T : Module.End 𝕜 E) μ)ᗮ = ⊥ :=
  T.orthogonalComplement_iSup_eigenspaces_eq_bot hT hT'
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor
eigenspace_finite_dimensionalLean 4Applies a library theoremFormally verified
/-- The eigenspace of a compact operator for a non-zero eigenvalue is finite-dimensional
(its unit ball is the image of a bounded set under `μ⁻¹ T`, hence compact). This is Mathlib's
`ContinuousLinearMap.finite_dimensional_eigenspace`. -/
theorem eigenspace_finite_dimensional {𝕜 E : Type*} [RCLike 𝕜] [NormedAddCommGroup E]
    [InnerProductSpace 𝕜 E] [CompleteSpace E] {T : E →L[𝕜] E} (hT : IsCompactOperator T)
    (μ : 𝕜) (hμ : μ ≠ 0) : FiniteDimensional 𝕜 (Module.End.eigenspace T.toLinearMap μ) :=
  T.finite_dimensional_eigenspace hT μ hμ
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/FunctionalAnalysis.leanTry it in the Lean web editor

Not formalised here: the projection theorem (Mathlib: exists_norm_eq_iInf_of_complete_convex), Bessel and Parseval (Mathlib: Orthonormal.tsum_inner_products_le and HilbertBasis), our proof of the spectral theorem (we cite Mathlib's, which goes through the spectral radius), weak topologies and Banach–Alaoglu (Mathlib: WeakDual.isCompact_polar), and the spectral theorem for non-compact operators.

ComputationC

Watching eigenvalues accumulate at zero

The experiment discretises the Green's operator GG of −u′′-u'' on (0,1)(0, 1) by a 200×200200 \times 200 symmetric matrix (the midpoint rule) and compares its eigenvalues with the exact values 1/(kπ)21/(k\pi)^2. The matrix eigenvectors are orthonormal, the first matches 2sin⁡(πx)\sqrt 2 \sin(\pi x), and the count of eigenvalues above each threshold matches the count for the operator: they pile up only at 00, as the spectral theorem requires. Two exact computations then show the warnings of the intuition section: differentiation multiplies the sup norm of sin⁡(nx)\sin(nx) by nn, and ∥xn∥∞/∥xn∥1=n+1\|x^n\|_\infty / \|x^n\|_1 = n + 1.

Eigenvalues of a compact operator, numericallyPythonNumerical approximationExact computationComputationally tested
"""The spectrum of a compact self-adjoint operator, seen through a matrix.

The operator (Gf)(x) = integral of G(x, y) f(y) dy on L^2(0, 1), with kernel
G(x, y) = min(x, y) (1 - max(x, y)), inverts -u'' = f, u(0) = u(1) = 0. It is
compact and self-adjoint, with eigenvalues 1/(k pi)^2 and eigenfunctions
sqrt(2) sin(k pi x). We discretise it by the midpoint rule (an N x N
symmetric matrix), compare its eigenvalues with the exact ones, and count how
they pile up at 0. Then two infinite-dimensional warnings: differentiation is
unbounded, and the sup and L^1 norms are not equivalent.
"""

import math
from fractions import Fraction

import numpy as np

def green_matrix(n):
    """Midpoint-rule matrix (1/n) G(x_i, x_j) with x_i = (i + 1/2)/n."""
    if n < 1:
        raise ValueError("n must be positive")
    x = (np.arange(n) + 0.5) / n
    big_x, big_y = np.meshgrid(x, x, indexing="ij")
    kernel = np.minimum(big_x, big_y) * (1 - np.maximum(big_x, big_y))
    return kernel / n

def eigen_decreasing(matrix):
    """Eigenvalues (decreasing) and orthonormal eigenvectors of a symmetric
    matrix."""
    values, vectors = np.linalg.eigh(matrix)
    return values[::-1], vectors[:, ::-1]

def exact_eigenvalue(k):
    """The k-th eigenvalue 1/(k pi)^2 of the Green's operator."""
    return 1 / (k * math.pi) ** 2

def count_above(values, threshold):
    """How many eigenvalues exceed the threshold."""
    return int(np.sum(np.asarray(values) > threshold))

def exact_count_above(threshold):
    """Number of k >= 1 with 1/(k pi)^2 > threshold."""
    k = 0
    while exact_eigenvalue(k + 1) > threshold:
        k += 1
    return k

def derivative_ratio(n, samples=4000):
    """max |f'| / max |f| for f(x) = sin(n x) on [0, 2 pi], sampled."""
    xs = np.linspace(0, 2 * math.pi, samples)
    return float(np.max(np.abs(n * np.cos(n * xs))) /
                 np.max(np.abs(np.sin(n * xs))))

def power_norms(n):
    """Exact (sup norm, L^1 norm) of x^n on [0, 1]."""
    return Fraction(1), Fraction(1, n + 1)

def main():
    n = 200
    values, vectors = eigen_decreasing(green_matrix(n))
    print(f"Green's operator of -u'' on (0, 1), midpoint matrix with N = {n}")
    print(f"{'k':>3} {'matrix':>12} {'exact 1/(k pi)^2':>18} {'rel. error':>11}")
    for k in range(1, 7):
        exact = exact_eigenvalue(k)
        err = abs(values[k - 1] - exact) / exact
        print(f"{k:>3} {values[k - 1]:>12.8f} {exact:>18.8f} {err:>11.1e}")
    orth = np.max(np.abs(vectors.T @ vectors - np.eye(n)))
    print(f"max |V^T V - I| = {orth:.1e} (orthonormal eigenvectors)")
    first = vectors[:, 0] * math.sqrt(n)
    sine = math.sqrt(2) * np.sin(math.pi * (np.arange(n) + 0.5) / n)
    first = first if first @ sine > 0 else -first
    print(f"first eigenvector vs sqrt(2) sin(pi x): max gap "
          f"{np.max(np.abs(first - sine)):.1e}")
    for t in [1e-1, 1e-2, 1e-3]:
        print(f"eigenvalues > {t:g}: matrix {count_above(values, t)}, "
              f"exact {exact_count_above(t)}")
    print(f"smallest matrix eigenvalue: {values[-1]:.2e} (they pile up at 0)")
    print()
    print("Differentiation is unbounded: f = sin(n x), ratio max|f'| / max|f|")
    print("  ", [round(derivative_ratio(m), 3) for m in [1, 10, 100]])
    print("Norms are not equivalent: x^n on [0, 1], (sup norm, L^1 norm)")
    print("  ", [tuple(str(v) for v in power_norms(m)) for m in [1, 10, 100]])
    print()
    print("Epistemic status: the eigenvalue table is a numerical approximation")
    print("of one operator (midpoint rule, floating point), within about 2e-6")
    print("of the exact eigenvalues; it proves nothing in general. The derivative")
    print("ratios are sampled, the norms of x^n exact. That no constant bounds")
    print("either ratio follows because n and n + 1 are unbounded.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

This is numerical evidence about one operator. Why the matrix eigenvalues approximate the operator's is itself a theorem (convergence of the Nyström method for compact operators); the spectral theorem is what guarantees there is a discrete spectrum to approximate.

Explore

Finite and infinite dimensions

In two dimensions the spectral theorem is visible: a symmetric matrix stretches the plane along two perpendicular invariant lines, its eigenvectors. Try other symmetric matrices, then a non-symmetric shear, whose single invariant line is not accompanied by a perpendicular one.

A symmetric matrix: perpendicular eigenvectors

Change the entries or pick a transformation. The columns of A are where e₁ and e₂ land; the gold square shows what happens to area.

Your own matrix
λ₁ = 3λ₂ = 1Ae₁Ae₂
  • image of the grid
  • image of the unit square
  • image of the flag
  • before the transformation
  • invariant line
Entries of the matrix A
A =

The columns of A are the images of e₁ = (1, 0) and e₂ = (0, 1): Ae₁ = (2, 1), Ae₂ = (1, 2)

det A = ad − bc = 3

The unit square (area 1) becomes a parallelogram of area |det A| = 3. Since det A > 0, orientation is preserved.

Invariant lines (real eigenvectors)

  • λ₁ = 3, v₁ = (1, 1)
  • λ₂ = 1, v₂ = (1, −1)

Vectors on the two dashed lines are only stretched, by the factors λ₁ = 3 and λ₂ = 1; every other direction is turned.

In infinite dimensions, boundedness can fail. Move the slider: sin⁡(nx)\sin(nx) stays between −1-1 and 11, but its derivative ncos⁡(nx)n\cos(nx) grows without bound. No constant CC gives ∥f′∥∞≤C∥f∥∞\|f'\|_\infty \le C\|f\|_\infty on all of C1C^1.

Differentiation is an unbounded operator

Move the sliders and trace along the curves to read off values.

  • f = sin(nx)
  • f′ = n cos(nx)
  • f = sin(nx): y = 0.1411
  • f′ = n cos(nx): y = −2.97
Exercises

Exercises

1. Functional analysis

Warm-upHuman

Which of these normed spaces are complete (Banach spaces)? Select all that apply.

Choose all that apply

2. Functional analysis

Warm-upHuman

The diagonal operator TT on ℓ2\ell^2 is defined by (Tx)n=3nn+1 xn(Tx)_n = \dfrac{3n}{n+1}\, x_n for n≥1n \ge 1. Find ∥T∥\|T\|.

3. Functional analysis

CoreHuman

On c00c_{00} (sequences with finitely many non-zero terms) with the sup norm, let Tn(x)=nxnT_n(x) = n x_n. Each xx has sup⁡n∣Tnx∣<∞\sup_n |T_n x| < \infty, yet ∥Tn∥=n\|T_n\| = n. Why does this not contradict the uniform boundedness principle?

Choose one

4. Functional analysis

CoreHuman

On L2(0,1)L^2(0, 1) let ℓ(f)=∫01/2f(x) dx\ell(f) = \int_0^{1/2} f(x)\, dx. By the Riesz representation theorem ℓ(f)=⟨f,g⟩\ell(f) = \langle f, g \rangle for a unique gg. What is ∥ℓ∥\|\ell\|?

Choose one

5. Functional analysis

CoreHuman

Which operator on ℓ2\ell^2 is compact?

Choose one

6. Functional analysis

StretchHuman

In the proof that a compact self-adjoint T≠0T \ne 0 has an eigenvalue λ=±∥T∥\lambda = \pm\|T\|, we have unit vectors with ∥Txn−λxn∥→0\|Tx_n - \lambda x_n\| \to 0. Where is compactness used?

Choose one

7. Functional analysis

CoreFormal

Which Lean statement correctly formalises "if a real inner product space EE contains an orthonormal sequence, its closed unit ball is not compact"?

Choose one

8. Functional analysis

StretchComputational

Apply Gram–Schmidt to 1,x,x2,…1, x, x^2, \dots in L2(−1,1)L^2(-1, 1), keeping the polynomials monic (leading coefficient 11) instead of normalising. A polynomial is a list of Fraction coefficients, constant term first. The helper inner(p, q) computes ∫−11pq dx\int_{-1}^1 p q \, dx exactly. Write monic_orthogonal(n) returning the first n monic orthogonal polynomials (the monic Legendre polynomials).

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.
Common misconceptionsH

Common misconceptions

Misconception

"Every linear map between normed spaces is continuous." True in finite dimensions only. Differentiation on C1[0,1]C^1[0, 1] with the sup norm is unbounded, and with the axiom of choice every infinite-dimensional normed space carries discontinuous linear functionals. What is true: on Banach spaces, linear maps with closed graphs are continuous, and in practice (without choice) one never writes down a discontinuous linear map defined on a whole Banach space.

Misconception

"All norms on a vector space are equivalent." Only in finite dimensions, where it follows from compactness of the unit sphere. On C[0,1]C[0, 1] the sup norm and the L1L^1 norm are inequivalent (∥xn∥∞/∥xn∥1=n+1\|x^n\|_\infty / \|x^n\|_1 = n + 1), and only one of them is complete. In fact if two norms are both complete and one dominates the other, they are equivalent (open mapping theorem) — so this kind of example always involves an incomplete norm.

Misconception

"Closed and bounded implies compact." That is the Heine–Borel theorem of Rn\R^n. In infinite dimensions the closed unit ball is closed and bounded but not compact; one must use weak compactness or prove compactness of specific sets (Arzelà–Ascoli, Rellich–Kondrachov).

Misconception

"Every operator has an eigenvalue." Over C\C in finite dimensions, yes. The shift on ℓ2\ell^2 has none, and neither does multiplication by xx on L2(0,1)L^2(0, 1), although both have non-empty spectrum {λ:T−λI not invertible}\{\lambda : T - \lambda I \text{ not invertible}\}. Compactness is what makes the spectrum (apart from 00) consist of eigenvalues.

ViewpointsH

Many ways of seeing

Geometry— The geometry of the unit ball

A Banach space is determined, up to isometry, by the shape of its unit ball, a closed convex symmetric set, and much of Banach space theory is convex geometry. Hilbert spaces are exactly the spaces whose ball is "round": by the Jordan–von Neumann theorem (1935), a norm comes from an inner product iff it satisfies the parallelogram law. Smoothness and rotundity of the ball control the existence and uniqueness of best approximations; uniformly convex spaces such as LpL^p, 1<p<∞1 < p < \infty, are reflexive (Milman–Pettis). Dvoretzky's theorem (1961) says that every infinite-dimensional Banach space contains, for each nn and ε>0\varepsilon > 0, an nn-dimensional subspace whose ball is within 1+ε1 + \varepsilon of a Euclidean ball: roundness is unavoidable in high dimensions, the starting point of asymptotic geometric analysis.

Topology— Baire, weak topologies and contractible spheres

The three pillar theorems are theorems of topology: they use only completeness through the Baire property. The weak and weak-* topologies show that "the" topology of an infinite-dimensional space is a choice: the weak topology is never metrisable on an infinite-dimensional space, yet Banach–Alaoglu makes its balls compact, which is how one recovers fixed-point theorems (Schauder, Markov–Kakutani) and existence of minimisers. Infinite-dimensional topology also overturns finite-dimensional intuition: the unit sphere of ℓ2\ell^2 is contractible and homeomorphic to ℓ2\ell^2 itself, so there is no infinite-dimensional Brouwer fixed-point theorem for the closed ball (Kakutani gave a fixed-point-free continuous self-map of the ball of ℓ2\ell^2), and Kuiper (1965) proved that the unitary group of an infinite-dimensional Hilbert space is contractible — a fact used in K-theory and index theory.

Algebra— Operator algebras

B(H)\mathcal B(H) is an algebra with an involution T↦T∗T \mapsto T^* satisfying ∥T∗T∥=∥T∥2\|T^* T\| = \|T\|^2, a C*-algebra. Gelfand and Naimark (1943) showed that every commutative C*-algebra with unit is isomorphic to C(K)C(K) for a compact Hausdorff space KK, its space of characters — a dictionary between commutative algebra and topology, and the template for "noncommutative geometry", where a noncommutative C*-algebra is treated as functions on a virtual space. The spectral theorem in this language is the continuous functional calculus: a self-adjoint TT generates a commutative C*-algebra isomorphic to C(σ(T))C(\sigma(T)). Von Neumann algebras (weakly closed *-algebras) classify, through Murray and von Neumann's factors, the possible "dimensions" of infinite quantum systems.

Physics— Hilbert space as the stage of quantum mechanics

In von Neumann's Mathematical Foundations of Quantum Mechanics (1932), states are unit vectors (up to phase) in a Hilbert space, observables are self-adjoint operators, and the possible measured values of an observable are the points of its spectrum. The discrete energy levels of an atom are eigenvalues; the continuous spectrum of a free particle is why the spectral theorem had to go beyond eigenvectors; and the canonical commutation relation [Q,P]=iℏI[Q, P] = i\hbar I cannot hold for bounded operators (in finite dimensions take traces; for bounded operators a norm argument of Wintner and Wielandt rules it out), which is why position and momentum are unbounded operators on dense domains. Heisenberg's matrix mechanics and Schrödinger's wave mechanics were shown to be equivalent because ℓ2\ell^2 and L2(R)L^2(\R) are isomorphic Hilbert spaces. See quantum mechanics.

Category theory— Duality and its limits

X↦X∗X \mapsto X^* is a contravariant functor on Banach spaces with bounded operators (T↦T∗T \mapsto T^*), and Hahn–Banach makes the canonical map X→X∗∗X \to X^{**} an isometric embedding, natural in XX — the infinite-dimensional analogue of V≅V∗∗V \cong V^{**}, which now fails to be onto in general (c0∗∗=ℓ∞c_0^{**} = \ell^\infty). Spaces for which it is onto are reflexive. For Hilbert spaces, Riesz gives the stronger, but conjugate-linear, identification H≅H∗H \cong H^*. A categorical subtlety: with bounded operators the category of Banach spaces has few limits; with contractions (∥T∥≤1\|T\| \le 1) it is complete and cocomplete, with ℓ1\ell^1-sums as coproducts and ℓ∞\ell^\infty-sums as products.

History & global context

History and context

  • Vito Volterra (from 1887) treated "functions of lines" and integral equations; Ivar Fredholm (1900–1903) proved his alternative for integral equations; David Hilbert (1904–1910) developed the theory of quadratic forms in infinitely many variables and the spectral theory of symmetric kernels, with Erhard Schmidt (1907–1908) introducing the geometric language of ℓ2\ell^2 and orthogonal projection.
  • Maurice Fréchet (1906) introduced metric spaces and, with Frigyes Riesz (1907), proved the representation theorem for L2L^2; Riesz introduced LpL^p spaces (1910), compact operators (1918) and the non-compactness lemma.
  • Hans Hahn (1927) and Stefan Banach (1929) proved the extension theorem; Banach and Hugo Steinhaus proved uniform boundedness (1927); Juliusz Schauder and Banach proved the open mapping theorem. Banach's Théorie des opérations linéaires (1932), from the Lwów school whose problems were famously recorded in the Scottish Book, fixed the subject's shape.
  • John von Neumann (1929–1932) axiomatised Hilbert space and proved the spectral theorem for unbounded self-adjoint operators, independently of Marshall Stone; Israel Gelfand (1941) created the theory of normed rings (Banach algebras), and with Mark Naimark (1943) characterised C*-algebras.
  • Later landmarks include Alexander Grothendieck's work on topological tensor products (1950s) and Per Enflo's counterexample to the approximation problem (1973), which showed that compact operators on a Banach space need not be norm limits of finite-rank ones.
Further reading

Further reading

  • Haim Brezis, Functional Analysis, Sobolev Spaces and Partial Differential Equations (2011) — functional analysis aimed at PDE; the proofs of the big theorems in Chapters 1–6.
  • Michael Reed and Barry Simon, Methods of Modern Mathematical Physics I: Functional Analysis (1972; revised 1980) — with an eye on quantum mechanics.
  • Walter Rudin, Functional Analysis (2nd ed., 1991) — topological vector spaces, distributions and Banach algebras.
  • John B. Conway, A Course in Functional Analysis (2nd ed., 1990) — a clear standard text with Hilbert spaces first.
  • Peter D. Lax, Functional Analysis (2002) — rich in applications and history.
  • Erwin Kreyszig, Introductory Functional Analysis with Applications (1978) — a gentle first course.