Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Angles and shadows, even for curves
Shine a light straight down on a stick and it casts a shadow on the floor. The shadow is the closest point on the floor to the stick’s tip, and the line from tip to shadow is perpendicular to the floor. That simple picture of shadow, perpendicular and closest is all you need for the best approximation of anything.
The surprise is that it works for functions too. Two curves can be “perpendicular”, and the best way to approximate a messy curve with simple ones is to cast its shadow onto them. A space where lengths, angles and shadows all work is a Hilbert space.
Fitting a model to sensor data (least squares), compressing a fluid simulation into a few modes, and filtering noise out of a signal are all “cast a shadow onto a simpler space”. The geometry guarantees the answer is the best possible, and tells you exactly how big the error is.
- 1. The shadow is the ___ point on the floor.
- 2. The line from tip to shadow is ___ to the floor.
- 3. (2, 1) and (−1, 2): perpendicular?
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.Inner products
An inner product is symmetric, linear in each slot, and positive ( for ). It gives a norm , angles , and orthogonality .
| Space | Inner product |
|---|---|
| (or with SPD) | |
| (random variables) | , which is the covariance for centred variables |
| matrices | (Frobenius) |
Function examples on :
- , so and are orthogonal: odd times even.
- .
- On , the functions are mutually orthogonal.
An orthonormal basis has . Then every . The coefficients are just inner products, with no system of equations to solve.
- 1. ⟨x, x²⟩ on [−1, 1] = ?
- 2. ‖1‖ in L²[−1, 1] = ?
- 3. In an orthonormal basis, the coefficient of eₖ is…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.The projection theorem
Let be a closed subspace of a Hilbert space. For any there is a unique closest point , and it’s characterized by the residual being orthogonal to : for all . With an orthonormal basis of :
The second formula is Pythagoras. Consequences:
- Least squares is the projection of onto , and the normal equations say “the residual is orthogonal” (A2.3-7).
- Bessel’s inequality holds for any orthonormal set.
- Parseval’s identity holds exactly when the set is complete (a basis). Then the energy in the coefficients equals the energy of the function.
Building orthonormal bases
Apply Gram–Schmidt to in . You get the Legendre polynomials, used by the demo. Different weights give other families:
- Chebyshev (weight );
- Hermite (Gaussian weight; quantum oscillators, Gaussian chaos expansions);
- Laguerre;
- Fourier (A3.5-7).
- 1. The best approximation in a subspace has a residual that is…
- 2. Gram–Schmidt on 1, x, x² in L²[−1, 1] gives…
- 3. Parseval's identity holds when the orthonormal set is…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Proofs
Cauchy–Schwarz. If there’s nothing to prove. Otherwise, for every real , . This quadratic in is never negative, so its discriminant is : . ∎
Pythagoras. If , then . ∎
Projection minimizes distance. For any , . The first piece is and the second lies in . So , with equality only for . ∎
Which norms come from inner products?
A norm comes from an inner product if and only if it satisfies the parallelogram law (Jordan–von Neumann). The inner product is then recovered by polarization, . The and norms fail the law (Practice Code 5), so those Banach spaces have no notion of angle. Hilbert spaces are special.
Riesz representation
Every continuous linear functional on a Hilbert space is an inner product with a unique vector: , with . This is why gradients exist in infinite dimensions. The derivative of a functional is a linear map, and Riesz turns it into a vector, the gradient (A3.5-10). It’s also why every reproducing-kernel Hilbert space has a kernel: point evaluation is represented by .
Exercise 3.1: Show the parallelogram law fails for ℓ¹ with e₁, e₂
, while .
- 1. Cauchy–Schwarz is proved by…
- 2. A norm comes from an inner product iff it satisfies…
- 3. The Riesz representation theorem turns a continuous linear functional into…
Level 4: Expert
★★★★★ Expert⏱ 45 minResearchers: original papers and open problems.POD: the optimal basis for your data
Given snapshots of a simulation or experiment, which -dimensional orthonormal basis minimizes the total projection error ? The answer is the top left singular vectors of the snapshot matrix. This is proper orthogonal decomposition (POD), mathematically PCA. The error is exactly the sum of the discarded squared singular values (Eckart–Young). Projecting the governing equations onto these modes gives a reduced-order model that’s thousands of times cheaper. These are used for:
- aeroelastic flutter analysis and active flow control (Holmes, Lumley and Berkooz, 2012);
- spacecraft thermal models;
- digital twins (Benner, Gugercin and Willcox, 2015).
Hilbert spaces across AI and engineering
- Kernel methods and Gaussian processes. A positive-definite kernel defines a reproducing-kernel Hilbert space (RKHS). Kernel ridge regression’s solution lies in the span of (the representer theorem; Schölkopf, Herbrich and Smola, 2001), which is an orthogonal-projection argument. GP posterior means are the same object (Rasmussen and Williams, 2006; I2).
- Random variables as vectors. In , the conditional expectation is the orthogonal projection of onto functions of . The Kalman filter is recursive orthogonal projection: the innovation is orthogonal to past data (Kalman, 1960). That’s why it’s the optimal linear estimator, as used in Apollo’s navigation.
- Quantum mechanics lives in Hilbert space: states are unit vectors, observables are self-adjoint operators (A3.5-6), and probabilities are squared inner products.
- Spectral methods and polynomial chaos. Orthogonal-polynomial expansions solve PDEs with exponential accuracy and propagate uncertainty through spacecraft models (Xiu and Karniadakis, 2002).
- Neural tangent kernel. Wide networks behave like kernel regression in a particular RKHS (Jacot, Gabriel and Hongler, 2018).
References
- E. Kreyszig (1978). Introductory Functional Analysis with Applications. Wiley.
- D. Luenberger (1969). Optimization by Vector Space Methods. Wiley. (Projection theorem, applications.)
- P. Holmes, J. Lumley, G. Berkooz, C. Rowley (2012). Turbulence, Coherent Structures, Dynamical Systems and Symmetry, 2nd ed. Cambridge.
- P. Benner, S. Gugercin, K. Willcox (2015). “A survey of projection-based model reduction methods for parametric dynamical systems.” SIAM Review, 57(4).
- B. Schölkopf, R. Herbrich, A. Smola (2001). “A generalized representer theorem.” COLT.
- C. Rasmussen, C. Williams (2006). Gaussian Processes for Machine Learning. MIT Press.
- R. E. Kalman (1960). “A new approach to linear filtering and prediction problems.” Journal of Basic Engineering, 82.
- D. Xiu, G. E. Karniadakis (2002). “The Wiener–Askey polynomial chaos for stochastic differential equations.” SIAM Journal on Scientific Computing, 24(2).
- A. Jacot, F. Gabriel, C. Hongler (2018). “Neural tangent kernel: convergence and generalization in neural networks.” NeurIPS.