Infinite-Dimensional Function Spaces

Linear algebra begins with arrows in the plane, but nothing in the vector-space axioms mentions arrows, components, or a finite count of them. Read the axioms literally and a startling possibility opens up: functions, added pointwise and scaled by constants, obey every one of them. A function is a vector. This single reinterpretation is the doorway to the whole analytic machinery of mathematical physics — the wavefunctions of quantum mechanics, the normal modes of a vibrating string, the eigenfunctions of Sturm–Liouville problems, and the signals of Fourier analysis all live inside function spaces, and all of them are studied with the geometry of length, angle, and projection carried over from Rn\mathbb{R}^n. What changes, and changes everything, is dimension. A function on [a,b][a,b] has a continuum of "components" f(x)f(x), and no finite list of basis functions can reproduce it. In finite dimension every subspace is closed, every linear functional is bounded, every symmetric operator diagonalizes, and the unit ball is compact — four comforts that all fail in a typical function space. The repair is analytic. One installs a norm, demands completeness so that limits of approximating sequences cannot escape the space, and thereby earns a Banach space; if the norm descends from an inner product, a Hilbert space. Completeness is exactly what lets an infinite expansion ∑ncnen\sum_n c_n e_n name an honest element of the space, in the same way that completeness of R\mathbb{R} lets a decimal expansion name a real number. The richest example, L2[a,b]L^2[a,b], is where Fourier's expansions, Parseval's theorem, and the spectral theorem become precise infinite-dimensional echoes of basis decomposition, the Pythagorean theorem, and matrix diagonalization.

Key takeaways
  • A function space treats each function ff as a single point — a vector — so that (f+g)(x)=f(x)+g(x)(f+g)(x)=f(x)+g(x) and (αf)(x)=αf(x)(\alpha f)(x)=\alpha f(x) satisfy exactly the axioms of finite-dimensional vector spaces.
  • The decisive new feature is infinite dimension: no finite basis suffices, so convergence, completeness, and norm become essential rather than automatic.
  • The Hilbert space L2[a,b]L^2[a,b] carries the inner product ⟨f,g⟩=∫abf∗g dx\langle f,g\rangle=\int_a^b f^*g\,\mathrm{d}x and is the home of Fourier series, Sturm–Liouville eigenfunctions, and quantum wavefunctions.
  • Completeness — every Cauchy sequence converges inside the space — is what separates a Hilbert space from a merely normed one and underwrites f=∑ncnenf=\sum_n c_n e_n with cn=⟨en,f⟩c_n=\langle e_n,f\rangle.
  • Parseval's identity ∥f∥2=∑n∣cn∣2\|f\|^2=\sum_n|c_n|^2 is the infinite-dimensional Pythagorean theorem and expresses the exact isometry L2≅ℓ2L^2\cong\ell^2.
  • Operators (differentiation, multiplication, integral kernels) generalize matrices, but the physically central ones are unbounded and carry a domain — a subtlety with no finite-dimensional analogue.
  • Key idea: a function is a vector; an inner product gives geometry; completeness gives convergence — and with those three ingredients L2L^2 becomes a Hilbert space in which orthonormal expansion, Parseval's identity, and the spectral theorem are the exact infinite-dimensional forms of basis decomposition, the Pythagorean theorem, and diagonalization.
The core insight

A function is a vector; an inner product gives geometry; completeness gives convergence. With those three ingredients L2L^2 becomes a Hilbert space in which orthonormal expansion, Parseval's identity, and the spectral theorem are exact infinite-dimensional analogues of basis decomposition, the Pythagorean theorem, and matrix diagonalization.

Where this lives today

Function-space geometry is quietly at work far beyond the textbook. Every quantum computation is bookkeeping in a Hilbert space, and the mathematical foundations of quantum field theory still turn on making infinite-dimensional operator algebras and their spectra precise — the rigged Hilbert spaces that hold scattering states with continuous spectra are a direct descendant of the unbounded-operator subtleties above. In data science, kernel methods and support-vector machines lift finite data into a reproducing-kernel Hilbert space, where the "kernel trick" is exactly the integral operator of equation (7) reused as a similarity measure; Gaussian-process regression is a probability distribution over a function space. Signal processing runs on truncated orthonormal expansions: the discrete cosine transform behind JPEG and MPEG is Worked Example 2 in commercial form, keeping the low-order coefficients that carry most of the energy and discarding the rest, while compressed sensing exploits sparsity in a chosen basis to reconstruct MRI images from far fewer samples than classical sampling would demand. Spectral methods integrate the equations of weather and climate by projecting the atmosphere onto spherical-harmonic bases, and finite-element solvers do the same with local bases. And the subject still has open frontiers: the invariant subspace problem — whether every bounded operator on an infinite-dimensional separable Hilbert space has a nontrivial closed invariant subspace — remains unsolved, a reminder that the geometry Hilbert glimpsed is not yet fully mapped.

The physical picture

Picture a string clamped at both ends, plucked and released. At any instant its shape is a function f(x)f(x), and the normal modes sin⁡(nπx/L)\sin(n\pi x/L) are a set of mutually perpendicular directions in an abstract space. Giving the amplitude of each mode is exactly like giving the components of a vector along orthogonal axes — except that here the axes are infinite in number. The inner product ⟨en,f⟩=∫en∗f dx\langle e_n,f\rangle=\int e_n^*f\,\mathrm{d}x measures the overlap of ff with the nn-th axis, so the Fourier coefficient cnc_n is a projection, and reconstructing f=∑ncnenf=\sum_n c_n e_n is reassembling the vector from its shadows. The first figure makes the geometry literal: one plucked profile, resolved into its lowest modes.

Figure
A plucked string profile f(x) is a single point in an infinite-dimensional space, and its coordinates are the mode amplitudes cₙ = ⟨eₙ, f⟩ onto the orthonormal normal modes eₙ = √(2/L) sin(nπx/L), which satisfy ⟨eₘ, eₙ⟩ = δₘₙ
A function is a vector: one profile f(x), resolved onto orthonormal mode-axes f(x) plucked project onto modes c₁ e₁ c₂ e₂ c₃ e₃ eₙ = √(2/L) sin(nπx/L), cₙ = ⟨eₙ, f⟩, ⟨eₘ, eₙ⟩ = δₘₙ, f = Σ cₙ eₙ

Two features of the picture are new to infinite dimension, and both are decisive. First, completeness: the space must have no holes. A sequence of continuous ramps can converge in L2L^2 to a discontinuous step, and unless that step is already a member of the space, the "limit" has fallen out — just as 2\sqrt2 falls out of Q\mathbb{Q}. Completing the continuous functions plugs every such hole and yields L2L^2. Second, the balance sheet of energy must close: a complete orthonormal basis loses nothing, so the norm of ff equals the total of its squared coordinates, ∥f∥2=∑n∣cn∣2\|f\|^2=\sum_n|c_n|^2. The second figure is that ledger in action — how fast the squared coordinates of a square wave accumulate to the full norm as harmonics are added.

Figure
Completeness as a closed energy ledger: the cumulative squared coefficients Σ cₙ² of a square wave, captured by its first Fourier harmonics — 81.1 percent sits in the fundamental, 93.3 percent by the fifth harmonic, and the total rises to the exact norm ‖f‖² = 2π demanded by Parseval's identity Σ cₙ² = ‖f‖²
Parseval closes the books: energy captured by the first harmonics → ‖f‖² = 2π 100% = ‖f‖² = 2π 100 80 60 40 20 81.1 90.1 93.3 95.0 96.0 n ≤ 1 n ≤ 3 n ≤ 5 n ≤ 7 n ≤ 9 Fourier harmonics included (odd n) energy captured Σ|cₙ|² (% of ‖f‖²)

The core equations

Everything starts with the observation that functions can be added and scaled, so they inherit the algebra of vectors before any analysis is added.

(f+g)(x)=f(x)+g(x),(αf)(x)=α f(x)(1)(f+g)(x)=f(x)+g(x),\qquad (\alpha f)(x)=\alpha\, f(x) \qquad (1)

where: f,gf,g — functions regarded as vectors on a common domain; α\alpha — scalar from the field R\mathbb{R} or C\mathbb{C}; xx — a point of the domain [a,b][a,b]. Every vector-space axiom holds because it holds for the numbers f(x),g(x)∈Cf(x),g(x)\in\mathbb{C} at each individual xx; the zero vector is the function 0(x)=00(x)=0, and the inverse of ff is −f-f. Geometry enters through an inner product, which turns the algebraic space into one with length and angle. On a weighted L2L^2 space it is an integral rather than a finite sum.

⟨f,g⟩=∫abf∗(x) g(x) w(x) dx(2)\langle f,g\rangle=\int_a^b f^*(x)\,g(x)\,w(x)\,\mathrm{d}x \qquad (2)

where: f∗f^* — complex conjugate of ff; w(x)≥0w(x)\ge 0 — weight function, nonzero almost everywhere and often simply w≡1w\equiv1; [a,b][a,b] — interval of definition, possibly unbounded. It is conjugate-symmetric (⟨g,f⟩=⟨f,g⟩∗\langle g,f\rangle=\langle f,g\rangle^*), linear in the second slot (physics convention), and positive-definite, and the last property forces us to identify functions equal almost everywhere. The inner product supplies a norm — the length of a function-vector — and the finiteness of that length is precisely the membership card for L2L^2.

∥f∥=⟨f,f⟩1/2=(∫ab∣f(x)∣2 dx)1/2<∞(3)\|f\|=\langle f,f\rangle^{1/2}=\Big(\int_a^b|f(x)|^2\,\mathrm{d}x\Big)^{1/2}<\infty \qquad (3)

where: ∥f∥\|f\| — length of the function-vector; ∣f∣2|f|^2 — modulus squared, read physically as a local energy or probability density. A function belongs to L2[a,b]L^2[a,b] exactly when this integral converges; membership is a global condition, indifferent to the value of ff at any single point. Length and inner product are tied together by the single most-used inequality in the subject, valid in every inner-product space regardless of dimension.

∣⟨f,g⟩∣≤∥f∥ ∥g∥(4)|\langle f,g\rangle|\le \|f\|\,\|g\| \qquad (4)

where: ⟨f,g⟩\langle f,g\rangle — inner product, or overlap integral, of the two functions; ∥f∥,∥g∥\|f\|,\|g\| — their norms. Equality holds only when ff and gg are parallel; the inequality is what makes the triangle inequality ∥f+g∥≤∥f∥+∥g∥\|f+g\|\le\|f\|+\|g\| — and hence the very notion of distance — work in L2L^2. The heart of the theory is that a complete orthonormal set behaves like an axis system: every function is the sum of its projections, with the coefficients read off by inner products.

⟨em,en⟩=δmn,f=∑n=1∞cn en,cn=⟨en,f⟩(5)\langle e_m,e_n\rangle=\delta_{mn},\qquad f=\sum_{n=1}^{\infty} c_n\,e_n,\quad c_n=\langle e_n,f\rangle \qquad (5)

where: {en}\{e_n\} — complete orthonormal set (Fourier modes, Legendre, Hermite, or Bessel functions); δmn\delta_{mn} — Kronecker delta; cnc_n — generalized Fourier coefficient, the projection of ff onto ene_n. The word complete is doing heavy lifting: it guarantees the series actually reconstructs ff and misses no part of it. Because no part is missed, the squared length of ff equals the total of its squared coordinates — the Pythagorean theorem, promoted to infinitely many axes.

∥f∥2=∑n=1∞∣cn∣2,⟨f,g⟩=∑n=1∞an∗ bn(6)\|f\|^2=\sum_{n=1}^{\infty}|c_n|^2,\qquad \langle f,g\rangle=\sum_{n=1}^{\infty} a_n^*\,b_n \qquad (6)

where: an=⟨en,f⟩a_n=\langle e_n,f\rangle, bn=⟨en,g⟩b_n=\langle e_n,g\rangle — coordinate sequences of ff and gg. This is Parseval's (or Plancherel's) identity, and it is the exact statement that the coordinate map f↦(cn)f\mapsto(c_n) is an isometry from L2L^2 onto the sequence space ℓ2\ell^2. Operators are the next layer: they generalize matrices, and the continuous analogue of a matrix acting on a vector is an integral operator with a kernel.

(K^f)(x)=∫abK(x,y) f(y) dy(7)(\hat K f)(x)=\int_a^b K(x,y)\,f(y)\,\mathrm{d}y \qquad (7)

where: K(x,y)K(x,y) — kernel, the continuous analogue of a matrix entry AijA_{ij}; K^\hat K — the linear operator sending f↦K^ff\mapsto\hat K f. Summation over the column index jj becomes integration over yy, and the row index ii becomes the output point xx. The operators that matter physically are symmetric under the inner product, which in infinite dimension is a statement about boundary terms, not just about the formula for the operator.

⟨A^f,g⟩=⟨f,A^g⟩⟺A^=A^†(8)\langle \hat A f,g\rangle=\langle f,\hat A g\rangle\quad\Longleftrightarrow\quad \hat A=\hat A^{\dagger} \qquad (8)

where: A^†\hat A^\dagger — the adjoint of A^\hat A; the equivalence defines (formal) self-adjointness. For a differential operator the identity holds only once boundary conditions kill a surface term, so the domain of admissible functions is part of the operator, not an afterthought. The archetype that manufactures orthonormal bases across physics is the Sturm–Liouville operator, whose eigenfunctions are the sines, Legendre polynomials, and Bessel functions of separation of variables.

L^u=ddx ⁣(p(x)dudx)+q(x) u=−λ w(x) u(9)\hat L u = \frac{\mathrm{d}}{\mathrm{d}x}\!\Big(p(x)\frac{\mathrm{d}u}{\mathrm{d}x}\Big)+q(x)\,u=-\lambda\,w(x)\,u \qquad (9)

where: p,q,wp,q,w — coefficient functions with p,w>0p,w>0 on (a,b)(a,b); λ\lambda — eigenvalue, discrete for a regular problem; uu — eigenfunction, orthonormal in Lw2L^2_w. Self-adjointness of L^\hat L is what guarantees the eigenvalues are real and the eigenfunctions form a complete orthonormal basis.

Derivation ABest approximation and Bessel's inequality

The goal is to prove that the truncated expansion SNf=∑n≤NcnenS_N f=\sum_{n\le N}c_n e_n with cn=⟨en,f⟩c_n=\langle e_n,f\rangle is not merely one approximation of ff but the unique closest element of the subspace span{e1,…,eN}\mathrm{span}\{e_1,\dots,e_N\} in the L2L^2 norm, and to extract Bessel's inequality as an automatic by-product. This one calculation justifies least-squares fitting, underlies every spectral numerical method, and — in its limiting form — becomes Parseval's identity. The strategy is to compare ff against an arbitrary combination ∑n≤Ndnen\sum_{n\le N}d_n e_n and minimize the squared distance over the coefficients dnd_n.

Step 1. Expand the squared distance using bilinearity of the inner product and orthonormality ⟨em,en⟩=δmn\langle e_m,e_n\rangle=\delta_{mn}, giving ∥f−∑ndnen∥2=∥f∥2−∑ndn⟨f,en⟩−∑ndn∗⟨f,en⟩∗+∑n∣dn∣2\|f-\sum_n d_n e_n\|^2=\|f\|^2-\sum_n d_n\langle f,e_n\rangle-\sum_n d_n^*\langle f,e_n\rangle^*+\sum_n|d_n|^2. Why: orthonormality collapses the double sum of cross terms to a single diagonal sum, exactly as an orthonormal basis does in Rn\mathbb{R}^n.

Step 2. Insert cn=⟨en,f⟩c_n=\langle e_n,f\rangle, so that ⟨f,en⟩=cn∗\langle f,e_n\rangle=c_n^*, and the expression becomes ∥f∥2−∑n(dncn∗+dn∗cn−∣dn∣2)\|f\|^2-\sum_n(d_n c_n^*+d_n^*c_n-|d_n|^2). Why: rewriting everything in terms of the fixed numbers cnc_n and the free variables dnd_n sets up a completion of the square.

Step 3. Complete the square to reach the boxed identity ∥f−∑ndnen∥2=∥f∥2−∑n∣cn∣2+∑n∣dn−cn∣2\|f-\sum_n d_n e_n\|^2=\|f\|^2-\sum_n|c_n|^2+\sum_n|d_n-c_n|^2. Why: the first two terms do not depend on the choice of dnd_n, and the last is a sum of non-negative pieces, so the whole distance is minimized by killing that last sum.

Step 4. Read off the minimizer: the distance is smallest precisely when dn=cnd_n=c_n for every nn, proving the truncated Fourier sum is the best approximation in the subspace, and the minimum squared error is ∥f∥2−∑n≤N∣cn∣2\|f\|^2-\sum_{n\le N}|c_n|^2. Why: this is the projection theorem — the error f−SNff-S_Nf is orthogonal to the subspace, the infinite-dimensional version of dropping a perpendicular.

Step 5. Since that minimum error is non-negative, ∑n≤N∣cn∣2≤∥f∥2\sum_{n\le N}|c_n|^2\le\|f\|^2 for every NN; letting N→∞N\to\infty gives Bessel's inequality and shows (cn)∈ℓ2(c_n)\in\ell^2. Why: equality for all ff is not automatic — it holds exactly when {en}\{e_n\} is complete, and that upgrade of Bessel to Parseval is the definition of a basis.

Go deeper · Derivation B · 1 minWhy continuous functions are not complete
Derivation BWhy continuous functions are not complete

The goal is to exhibit a single explicit sequence of continuous functions that is Cauchy in the L2L^2 norm yet converges to a discontinuous limit, thereby proving that the continuous functions under the L2L^2 norm form an inner-product space that is not complete, and that one must enlarge it to L2L^2 to obtain a Hilbert space. This is not a pathology to be avoided but the very reason L2L^2 exists: the physically natural limits of smooth functions are often not smooth, and a space fit for physics must already contain them. The construction uses continuous ramps that steepen into a step.

Step 1. On [−1,1][-1,1] define fn(x)=0f_n(x)=0 for x≤0x\le0, fn(x)=nxf_n(x)=nx for 0<x<1/n0<x<1/n, and fn(x)=1f_n(x)=1 for x≥1/nx\ge1/n; each fnf_n is piecewise linear and continuous, hence lies in C[−1,1]C[-1,1] and in L2[−1,1]L^2[-1,1]. Why: staying inside the space of continuous functions is what makes the eventual escape of the limit meaningful.

Step 2. For m>nm>n the two ramps agree except on (0,1/n)(0,1/n), where both are bounded by 11, so ∥fn−fm∥2=∫01/n∣fn−fm∣2 dx≤1/n→0\|f_n-f_m\|^2=\int_0^{1/n}|f_n-f_m|^2\,\mathrm{d}x\le 1/n\to0; the sequence is Cauchy in L2L^2. Why: the disagreement lives on a shrinking interval, so the accumulated squared difference vanishes even though the functions never stop changing shape near the origin.

Step 3. The candidate limit is the Heaviside step Θ\Theta, and the error is computed exactly: ∥fn−Θ∥2=∫01/n(nx−1)2 dx=13n→0\|f_n-\Theta\|^2=\int_0^{1/n}(nx-1)^2\,\mathrm{d}x=\tfrac{1}{3n}\to0, using the substitution u=nx−1u=nx-1. Why: a closed-form integral, not an estimate, pins the limit down — the ramps converge in L2L^2 to a genuinely discontinuous function.

Step 4. The Cauchy sequence therefore converges in L2L^2 to an element that is not in C[−1,1]C[-1,1], so (C[−1,1],∥⋅∥L2)(C[-1,1],\|\cdot\|_{L^2}) is incomplete; its completion is L2[−1,1]L^2[-1,1], a Hilbert space. Why: this is the analytic price of infinite dimension, and the exact analogue of completing Q\mathbb{Q} to R\mathbb{R} by filling in the limits of Cauchy sequences. *The integral ∫01/n(nx−1)2 dx=1/(3n)\int_0^{1/n}(nx-1)^2\,\mathrm{d}x=1/(3n) is elementary and confirms the convergence rate directly.*

Go deeper · Derivation C · 1 minOrthogonality from the Sturm–Liouville form
Derivation COrthogonality from the Sturm–Liouville form

The goal is to show that eigenfunctions of a self-adjoint Sturm–Liouville operator belonging to distinct eigenvalues are automatically orthogonal in the weighted space Lw2L^2_w, which is the mechanism that produces the complete orthonormal bases — Fourier, Legendre, Hermite, Bessel — used throughout physics to solve boundary-value problems. The same one-line identity, taken with equal indices, also proves that the eigenvalues are real. The engine is the Lagrange identity, which converts the difference of two eigen-equations into a pure boundary term.

Step 1. Let um,unu_m,u_n satisfy (pu′)′+qu=−λwu(pu')'+qu=-\lambda w u with the same self-adjoint boundary conditions and λm≠λn\lambda_m\neq\lambda_n; conjugate the mm-equation, using that self-adjointness forces λm∗=λm\lambda_m^*=\lambda_m. Why: reality of the eigenvalues, itself a consequence of self-adjointness, is what lets the two equations be combined cleanly.

Step 2. Multiply the nn-equation by um∗u_m^* and the conjugated mm-equation by unu_n, then subtract, to get um∗(pun′)′−un(pum′∗)′=(λm−λn) w um∗unu_m^*(pu_n')'-u_n(pu_m'^*)'=(\lambda_m-\lambda_n)\,w\,u_m^*u_n. Why: the potential terms ququ cancel, isolating the eigenvalue difference against the weighted product of eigenfunctions.

Step 3. Recognize the left side as a total derivative and integrate: ∫ab[um∗(pun′)′−un(pum′∗)′] dx=[p(um∗un′−unum′∗)]ab\int_a^b[u_m^*(pu_n')'-u_n(pu_m'^*)']\,\mathrm{d}x=[p(u_m^*u_n'-u_n u_m'^*)]_a^b. Why: this is the Lagrange identity — integration by parts turns the entire bulk contribution into an evaluation at the two endpoints.

Step 4. The self-adjoint boundary conditions (Dirichlet, Neumann, or periodic) make the bracket vanish at both ends, leaving (λm−λn)∫abum∗un w dx=0(\lambda_m-\lambda_n)\int_a^b u_m^*u_n\,w\,\mathrm{d}x=0; since λm≠λn\lambda_m\neq\lambda_n, the weighted overlap integral is zero. Why: the vanishing of the boundary term is exactly the content of self-adjointness, and it is what makes the eigenfunctions orthogonal rather than merely linearly independent.

Step 5. Normalizing each unu_n gives an orthonormal set, and for a regular Sturm–Liouville problem the spectral theorem guarantees it is also complete — a genuine basis of Lw2L^2_w. Why: orthogonality alone is not enough; completeness is the separate theorem that promotes the eigenfunctions to a coordinate system for the whole space. *Reality of λ\lambda follows from the same Lagrange identity taken with m=nm=n.*

Limiting cases

Function spaces are stratified by how much structure they carry, and each level recovers a more familiar object as a limiting case.

CaseResultMeaning
Finite-dimensional truncationdim⁡=N<∞\dim=N<\inftyKeeping only NN basis functions collapses L2L^2 to CN\mathbb{C}^N: every operator is a finite matrix, all norms are equivalent, the unit ball is compact, and ordinary linear algebra applies exactly. Galerkin and spectral methods live here.
Hilbert space, L2L^2⟨f,g⟩=∫f∗g dx, ∥f∥=⟨f,f⟩1/2\langle f,g\rangle=\int f^*g\,\mathrm{d}x,\ \|f\|=\langle f,f\rangle^{1/2}Inner product present: orthonormal bases, projections, Cauchy–Schwarz, and Parseval all hold. The setting of quantum mechanics and Fourier analysis.
Banach space, LpL^p with p≠2p\neq2 or C[a,b]C[a,b]∥f∥p=(∫∣f∣p dx)1/p\|f\|_p=(\int|f|^p\,\mathrm{d}x)^{1/p}Complete and normed but with no inner product: no orthogonality, no Parseval. The sup norm on C[a,b]C[a,b] governs uniform, not mean-square, convergence.
Incomplete normed space(C[a,b],∥⋅∥L2)(C[a,b],\|\cdot\|_{L^2})An inner-product space that is not complete: Cauchy sequences may converge to limits outside it. Completing it yields L2L^2 — the reason L2L^2 is defined at all.

Worked examples

1 · Parseval's identity and the Basel sum (fully worked)

Expand f(x)=xf(x)=x on [0,π][0,\pi] in the orthonormal sine basis en(x)=2/π sin⁡(nx)e_n(x)=\sqrt{2/\pi}\,\sin(nx), then apply Parseval's identity to evaluate ∑n=1∞1/n2\sum_{n=1}^\infty 1/n^2 in closed form.

Step 1. Compute the coefficients. With ∫0πxsin⁡(nx) dx=[−xcos⁡(nx)/n+sin⁡(nx)/n2]0π=π(−1)n+1/n\int_0^\pi x\sin(nx)\,\mathrm{d}x=[-x\cos(nx)/n+\sin(nx)/n^2]_0^\pi=\pi(-1)^{n+1}/n, the projection is cn=⟨en,f⟩=2/π⋅π(−1)n+1/n=2π (−1)n+1/nc_n=\langle e_n,f\rangle=\sqrt{2/\pi}\cdot\pi(-1)^{n+1}/n=\sqrt{2\pi}\,(-1)^{n+1}/n, so ∣cn∣2=2π/n2|c_n|^2=2\pi/n^2. The set {en}\{e_n\} is a complete orthonormal basis of L2[0,π]L^2[0,\pi] (the Dirichlet Laplacian eigenfunctions), so Parseval applies.

Step 2. Compute the norm directly: ∥f∥2=∫0πx2 dx=π3/3\|f\|^2=\int_0^\pi x^2\,\mathrm{d}x=\pi^3/3, so ∥f∥2=π3/3\|f\|^2=\pi^3/3.

Step 3. Impose Parseval, ∥f∥2=∑n∣cn∣2\|f\|^2=\sum_n|c_n|^2: π33=∑n=1∞2πn2=2π∑n=1∞1n2\dfrac{\pi^3}{3}=\sum_{n=1}^\infty\dfrac{2\pi}{n^2}=2\pi\sum_{n=1}^\infty\dfrac1{n^2}. Solving gives ∑n=1∞1n2=π3/32π=π26\displaystyle\sum_{n=1}^\infty\frac1{n^2}=\frac{\pi^3/3}{2\pi}=\frac{\pi^2}{6}, the Basel sum. ∑1/n2=π2/6≈1.6449\sum 1/n^2=\pi^2/6\approx1.6449.

Step 4. Sanity-check the convergence. The partial sums 1, 1.2500, 1.3611, 1.4236, 1.4636,…1,\ 1.2500,\ 1.3611,\ 1.4236,\ 1.4636,\dots climb steadily toward π2/6=1.64493\pi^2/6=1.64493. The value is not an approximation forced by truncation; it is the exact statement that a plucked-string profile stores its entire mean-square in its harmonic amplitudes — the Pythagorean theorem, counted over infinitely many axes.

2 · How many harmonics hold the energy of a square wave

The square wave f(x)=+1f(x)=+1 on (0,π)(0,\pi) and −1-1 on (−π,0)(-\pi,0) is expanded on [−π,π][-\pi,\pi]. What fraction of its total energy ∥f∥2\|f\|^2 is captured by the first few harmonics, and what does the answer say about best approximation?

Step 1. Set up coefficients in the orthonormal set en=sin⁡(nx)/πe_n=\sin(nx)/\sqrt\pi. Because ff is odd, every cosine and constant coefficient vanishes, and cn=1π∫−ππfsin⁡(nx) dx=1π⋅2(1−(−1)n)nc_n=\tfrac1{\sqrt\pi}\int_{-\pi}^{\pi}f\sin(nx)\,\mathrm{d}x=\tfrac1{\sqrt\pi}\cdot\tfrac{2(1-(-1)^n)}{n}. This is zero for even nn and 4/(nπ)4/(n\sqrt\pi) for odd nn, so ∣cn∣2=16/(πn2)|c_n|^2=16/(\pi n^2) for odd nn.

Step 2. Get the total energy: ∥f∥2=∫−ππ1 dx=2π\|f\|^2=\int_{-\pi}^{\pi}1\,\mathrm{d}x=2\pi. The captured fraction after odd harmonics up to NN is 12π∑odd n≤N16πn2=8π2∑odd n≤N1n2\dfrac1{2\pi}\sum_{\text{odd }n\le N}\dfrac{16}{\pi n^2}=\dfrac{8}{\pi^2}\sum_{\text{odd }n\le N}\dfrac1{n^2}, with prefactor 8/π2=0.810578/\pi^2=0.81057.

Step 3. Evaluate the running total. The fundamental alone gives 8/π2=81.1%8/\pi^2=\mathbf{81.1\%}; adding n=3n=3 raises it to 0.81057×(1+19)=90.1%0.81057\times(1+\tfrac19)=\mathbf{90.1\%}; through n=5n=5, 93.3%\mathbf{93.3\%}; through n=7n=7, 95.0%95.0\%; through n=9n=9, 96.0%96.0\%. As a check, the full sum uses ∑odd1/n2=π2/8\sum_{\text{odd}}1/n^2=\pi^2/8, which returns exactly ∥f∥2=2π\|f\|^2=2\pi — Parseval closes.

Step 4. Interpret through best approximation. By Derivation 1 the NN-term truncation is the closest element of its subspace to ff, so these percentages are the best possible for that many modes — no other choice of coefficients beats the Fourier coefficients. That a single mode already holds four-fifths of the energy is exactly why truncated orthonormal expansions power lossy compression and spectral solvers.

Physics of the portrait

The theory of function spaces is one of the rare parts of physics whose central object carries a person's name. "Hilbert space" honors the mathematician who, studying integral equations at Göttingen, first found the geometry of infinitely many coordinates hiding inside analysis — though, characteristically, it was others who gave it its final axioms.

Origins · 1 minDavid Hilbert and how this was discovered
DH
David Hilbert
1862–1943 · integral equations, ℓ², and the geometry of infinitely many dimensions

David Hilbert never set out to invent the space that bears his name. Between 1904 and 1912, working on Fredholm's integral equations at Göttingen, he was led to study infinite systems of linear equations in infinitely many unknowns, and to the sequence space of square-summable coefficients — what we now call ℓ2\ell^2 — together with the quadratic forms acting on it. It was in this work that Hilbert introduced the word Spektrum for the set of characteristic values of such a form, decades before quantum mechanics attached the term to atomic energy levels; the naming was uncanny, and Hilbert himself later remarked on the coincidence. The geometry latent in his analysis — orthogonality, projection, and completeness for infinite coordinate systems — was drawn out and made coordinate-free by his student Erhard Schmidt in 1908, while Riesz and Fischer proved in 1907 that the function space L2L^2 is isometric to Hilbert's sequence space ℓ2\ell^2, welding the two pictures into one. The abstract, axiomatic definition of a complete inner-product space, and the name "Hilbert space," were supplied by John von Neumann in 1929, who needed exactly this structure to give quantum mechanics a rigorous foundation and to prove the spectral theorem for the unbounded self-adjoint operators that represent observables. Hilbert's own program — that physics should rest on clearly stated axioms, his sixth Paris problem of 1900 — thus found one of its most complete realizations in the space named for him.

History
1902
— Lebesgue's integral gives a robust notion of square-integrable function
1906
— Fréchet introduces abstract metric spaces, the setting for completeness
1907
— Riesz and Fischer prove L² is isometric to the sequence space ℓ²
1910
— Hilbert's papers on integral equations formalize ℓ² and the spectrum
1929
— von Neumann axiomatizes abstract Hilbert space for quantum mechanics

Going further

Texts. Stone & Goldbart, Mathematics for Physics, Ch. 1–2 (function spaces, operators, Hilbert space) · Arfken, Weber & Harris, Mathematical Methods for Physicists, 7th ed., Ch. 5 and 8 · Hassani, Mathematical Physics, Ch. 5–6 (Hilbert spaces and operators) · Byron & Fuller, Mathematics of Classical and Quantum Physics, Ch. 3–5 · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., Ch. 17 · Kreyszig, Introductory Functional Analysis with Applications, Ch. 2–3 · Reed & Simon, Methods of Modern Mathematical Physics I: Functional Analysis. Key identities in this article: the completing-the-square identity of Derivation 1 yields Bessel's inequality as a finite-NN reduction to orthogonal projection; the integral ∫01/n(nx−1)2 dx=1/(3n)\int_0^{1/n}(nx-1)^2\,\mathrm{d}x=1/(3n) of Derivation 2 pins the convergence rate exactly; Derivation 3 uses the Lagrange identity to establish orthogonality. Worked Example 1 gives ∑1/n2=π2/6≈1.6449\sum1/n^2=\pi^2/6\approx1.6449 from Parseval with ∥f∥2=π3/3\|f\|^2=\pi^3/3 and ∣cn∣2=2π/n2|c_n|^2=2\pi/n^2; Worked Example 2 gives energy fractions 8/π2≈81.1%8/\pi^2\approx81.1\%, 90.1%90.1\%, 93.3%93.3\% with total ∥f∥2=2π\|f\|^2=2\pi via ∑odd1/n2=π2/8\sum_{\text{odd}}1/n^2=\pi^2/8. Every relation here is a mathematical identity; no empirical constants appear.

Builds on: Vector Spaces and Subspaces · Linear Independence, Basis, and Dimension · Inner-Product Spaces and Norms · Orthogonality and the Gram–Schmidt Process. Leads to: Adjoint and Hermitian Operators · Diagonalization and the Spectral Decomposition · Linear Operators and Matrix Representations · Eigenvalues, Eigenvectors, and the Characteristic Equation.

Ask the tutor: Ask me to expand any function you like in an orthonormal basis and watch Parseval's identity balance the energy books term by term.

In what sense is a function "really" a vector?

In the only sense that matters to linear algebra: it obeys the axioms. The vector-space axioms ask that objects can be added, scaled, that addition is commutative and associative, that there is a zero and additive inverses, and that scalar multiplication distributes. Functions on a fixed domain, combined pointwise by (f+g)(x)=f(x)+g(x)(f+g)(x)=f(x)+g(x) and (αf)(x)=αf(x)(\alpha f)(x)=\alpha f(x), satisfy every one of these — each axiom holds because it holds for the ordinary numbers f(x)f(x) at each point xx. Nothing in the axioms mentions arrows or a finite number of components, so functions are as legitimately vectors as elements of R3\mathbb{R}^3. The payoff is that the entire vocabulary of length, angle, orthogonality, and projection transfers wholesale to functions.

Why does L² use equivalence classes of functions equal "almost everywhere"?

Positive-definiteness of the inner product demands that ∥f∥=0\|f\|=0 imply f=0f=0. But ∫ab∣f∣2 dx=0\int_a^b|f|^2\,\mathrm{d}x=0 only forces ff to vanish except on a set of measure zero — a function that is 11 at a single point and 00 elsewhere has zero norm yet is not the zero function pointwise. To rescue positive-definiteness, L2L^2 is built not from functions but from equivalence classes, where two functions are identified when they agree almost everywhere. This is why it is meaningless to ask for "the value of an L2L^2 element at a point": individual points have measure zero and can be changed freely. The trade is worthwhile — it is exactly what makes ∥⋅∥\|\cdot\| a genuine norm and L2L^2 a Hilbert space.

What is the difference between pointwise, uniform, and L² convergence?

They are three genuinely different notions, and in infinite dimension they can disagree. Pointwise convergence asks that fn(x)→f(x)f_n(x)\to f(x) at each xx separately; uniform convergence asks that the worst-case gap sup⁡x∣fn(x)−f(x)∣→0\sup_x|f_n(x)-f(x)|\to0; and L2L^2 (mean-square) convergence asks that ∫∣fn−f∣2 dx→0\int|f_n-f|^2\,\mathrm{d}x\to0. A Fourier series can converge in L2L^2 while overshooting near a jump forever (the Gibbs phenomenon), so it fails to converge uniformly there; and a sequence can converge in L2L^2 while diverging at individual points. Because the "distance" in a Hilbert space is the L2L^2 norm, it is L2L^2 convergence that the geometry sees, and it is the one under which orthonormal expansions are guaranteed to work.

Why insist on completeness at all?

Because without it, natural limits leak out of the space and analysis stalls. An incomplete space is like the rationals: you can write down a Cauchy sequence whose limit is missing, so you can never be sure that an approximation scheme actually converges to anything you are allowed to name. Derivation 2 shows continuous functions doing exactly this — a Cauchy sequence of ramps whose L2L^2 limit is a discontinuous step. Completeness is the guarantee that every Cauchy sequence has its limit present, which is precisely what lets an infinite expansion ∑ncnen\sum_n c_n e_n define a bona fide element rather than a formal symbol. A Hilbert space is, by definition, a complete inner-product space; the completeness is not decoration but the load-bearing wall.

Is an orthonormal basis of a Hilbert space the same as a basis in linear algebra?

No, and conflating the two causes real confusion. A Hamel (algebraic) basis expresses every vector as a finite linear combination of basis elements; for an infinite-dimensional space it is uncountable and useless in practice. An orthonormal basis of a Hilbert space is a Schauder-type basis: it allows infinite combinations f=∑ncnenf=\sum_n c_n e_n converging in norm, and its span need only be dense, not literally everything. A countable orthonormal basis exists exactly when the space is separable — as L2[a,b]L^2[a,b] is. So "basis" in Hilbert space quietly means "complete orthonormal set," relying on convergence and completeness in a way the finite-dimensional notion never does.

Why are the operators of quantum mechanics unbounded, and what is a "domain"?

Differentiation is the culprit. Applying d/dx\mathrm{d}/\mathrm{d}x to the normalized modes einxe^{inx} multiplies them by inin, so the operator can amplify a unit vector without limit — it is unbounded, and unbounded operators cannot be defined on the whole Hilbert space, only on a dense subspace of sufficiently smooth functions. That subspace is the operator's domain, and it is part of the operator's very identity: momentum −iℏ d/dx-i\hbar\,\mathrm{d}/\mathrm{d}x on a finite interval becomes self-adjoint only for particular boundary conditions, and different conditions give physically different operators with different spectra. This has no finite-matrix analogue, where every matrix acts on the entire space. Getting the domain right is not pedantry — it is what makes observables have real eigenvalues and complete eigenbases.

Is every Hilbert space just L²?

Up to isomorphism, every separable infinite-dimensional Hilbert space is "the same" space, and L2[a,b]L^2[a,b] and ℓ2\ell^2 are two of its faces. This is the content of the Riesz–Fischer theorem: choosing an orthonormal basis maps any such space isometrically onto ℓ2\ell^2, the sequences with ∑∣cn∣2<∞\sum|c_n|^2<\infty. So L2L^2 of the line, L2L^2 of an interval, and the sequence space are all isometric — they differ only in the costume the vectors wear. What is not universal is the extra structure one lays on top: which operators are natural, what the basis means physically, and whether the space is separable at all. But as a bare geometric object, the separable Hilbert space is unique, and Fourier analysis is the dictionary between its function and sequence incarnations.

Before this

Where this leads