© 2026 Neckpinch · www.neckpinch.com · All rights reserved.
Course 4Book 4A: Function Spaces and Sobolev SpacesChapter 5
Hilbert Spaces and Lax–Milgram
Projection, Riesz representation, orthonormal bases, and the existence theorem for weak solutions.
Read with Brezis, chapter 5, "Hilbert Spaces" (projection onto closed convex sets, the dual of a Hilbert space, Stampacchia and Lax–Milgram, Hilbert sums and orthonormal bases), or Kreyszig chapter 3 (§3.1–3.10), which is gentler and has more examples, including Legendre polynomials. Pick one, not both.
A Hilbert space is a Banach space whose norm comes from an inner product, so that angles, orthogonality and projections make sense. That one extra structure makes Hilbert spaces the most tractable infinite-dimensional spaces by far. Every closed convex set has a nearest point to any given point. Every bounded linear functional is an inner product with a fixed vector (Riesz representation), so the space is its own dual. Every separable Hilbert space has an orthonormal basis and is, after a choice of basis, the sequence space . The Fourier series of 2B.7 Fourier Series and the First Heat Equation and 3A.7 Lᵖ Spaces and Jensen’s Inequality are one instance.
The chapter's last theorem, Lax–Milgram, is where Hilbert spaces meet PDE. It says that a "coercive" bilinear form represents every functional, and that is precisely the statement that weak solutions of elliptic equations exist (6A.6 Weak Solutions and Elliptic Regularity). The finite element method, the main tool of computational engineering, is Lax–Milgram restricted to a finite-dimensional subspace, and its error estimate is a projection theorem.
By the end of this chapter you will be able to:
- use the parallelogram law to recognise inner product norms, and prove the projection theorem onto closed convex sets;
- decompose a Hilbert space into a closed subspace and its orthogonal complement, and solve least-squares problems as projections;
- prove the Riesz representation theorem;
- work with orthonormal bases: Bessel, Parseval, Gram–Schmidt and Legendre polynomials;
- prove the Lax–Milgram theorem and write a two-point boundary value problem in weak form.
Least squares and the orbit of Ceres
On 1 January 1801 Giuseppe Piazzi discovered a faint moving object, later named Ceres, and followed it for about six weeks, through an arc of only a few degrees of its orbit, before it was lost in the glare of the Sun. To find it again, its orbit had to be computed from a handful of imprecise observations. Carl Friedrich Gauss, then aged 24, devised methods that did this, and using his predicted positions Franz Xaver von Zach found Ceres again on 31 December 1801, with Heinrich Olbers confirming it the next night. Gauss published his methods of orbit determination in Theoria motus corporum coelestium (1809), including the method of least squares, which he said he had used since 1795; Adrien-Marie Legendre had published it first, in 1805. Historians have debated how much least squares in the modern sense entered the 1801 computation itself.
The method is a projection. To fit a model with parameters to measurements , where the model predicts , choose to minimise , the sum of squared residuals. The minimising is the orthogonal projection of onto the column space of : the residual is perpendicular to every column, which is the system of normal equations (Figure 5.1). Fitting a straight line to measurements, the commonest calculation in experimental science, is the case . Gauss also showed that, when the measurement errors are independent and normally distributed, the least-squares estimate is the most probable one, which is why the bell curve is often called Gaussian.
Inner product spaces
An inner product on a real (or complex) vector space is a map (or ) that is linear in the first slot, symmetric (conjugate-symmetric), and positive: for . It defines a norm . A Hilbert space is an inner product space that is complete in this norm.
The examples: and ; with ; with (3A.7 Lᵖ Spaces and Jensen’s Inequality); and, from 4A.10 Sobolev Spaces, the Sobolev space with . The Cauchy–Schwarz inequality holds, with the proof of 2B.1 Metric Spaces, and gives the triangle inequality.
Which norms come from inner products? Exactly those satisfying the parallelogram law
the sum of the squares of the diagonals of a parallelogram equals the sum of the squares of its sides (Jordan and von Neumann, 1935). The inner product is then recovered by polarisation, in the real case. The norms satisfy the law only for (Exercise 5.9), which is why is special among them.
Angles between functions
An inner product gives more than lengths: by Cauchy–Schwarz, lies in , so it is the cosine of an angle between and . For functions in this angle is a precise measure of how alike two shapes are, and it explains facts that otherwise look like numerical accidents.
Take the monomials in . Then and , so
For this is , an angle of about ; for it is , about . The high monomials are nearly parallel: on , and are both near for most of the interval and rise steeply at the end, and they look almost the same. A basis of nearly parallel vectors is a bad coordinate system, because small changes in a vector produce huge changes in its coordinates. That is the geometric reason the Hilbert matrix of 4A.1 Banach Spaces and Bounded Operators, which is exactly the matrix of inner products , is so badly conditioned, and why the orthogonal polynomials below, at right angles to each other by construction, cure it.
Projection
The parallelogram law is what makes nearest points exist.
Let be a non-empty closed convex subset of a Hilbert space and . There is a unique with . It is characterised by
Proof. Existence. Let be the infimum and with . The parallelogram law applied to and gives
since by convexity. The right side tends to , so is Cauchy. By completeness it converges, to some ( is closed), and .
Uniqueness is the same computation with two minimisers in place of and .
Characterisation. For and , , so ; expanding and letting gives . Conversely, the inequality gives .
Compare 2B.3 Compactness: there, a nearest point existed because closed bounded sets in are compact. Here there is no compactness, and the parallelogram law, through completeness, does the job instead. In a general Banach space nearest points need not exist (Exercise 5.10).
For a closed subspace , the characterisation becomes for all : the residual is orthogonal to . The map is linear, of norm (if ), and every splits uniquely as
where is the orthogonal complement. Least squares is the case = the column space of .
Riesz representation
For every bounded linear functional on a Hilbert space there is a unique with for all , and .
Proof. If take . Otherwise the kernel is a closed proper subspace, so contains a unit vector . For any , the vector lies in , hence is orthogonal to : . So , and works. Uniqueness: if for all , take . The norm identity is Cauchy–Schwarz with equality at .
The proof has a picture. A non-zero functional is determined, up to scale, by its kernel, a closed hyperplane (4A.4 Hahn–Banach and Duality). In a Hilbert space a hyperplane has a unique normal direction, and the representing vector points along it, scaled so that . In a general Banach space a hyperplane need not have a distinguished normal, which is why the dual can be a different space altogether.
On with , evaluation at a point, , is a bounded functional (functions in of an interval are continuous, 4A.10 Sobolev Spaces). Riesz says there is with
Which function is it? Integrating by parts, the right side is plus jump terms at , so must satisfy away from , vanish at and , be continuous at , and have a jump of in its derivative there. Solving: for and for ; continuity and the jump give
This is the Green's function of with zero boundary values: the solution of Example 5.8 with a point source at . So the abstract representer of a measurement is the response of the equation to a point load, and the norm of the measurement is (apply the defining identity with ). The identity , a function reproducing its own values by inner products, makes what is called a reproducing kernel Hilbert space, the setting of kernel methods in statistics and machine learning.
So a Hilbert space is its own dual, and every Hilbert space is reflexive (4A.4 Hahn–Banach and Duality). The theorem turns abstract existence questions into concrete ones: to find a vector, it is enough to exhibit a bounded functional it should represent.
Orthonormal bases
An orthonormal set consists of unit vectors that are pairwise orthogonal. For finitely many , the projection onto their span is , and Pythagoras gives Bessel's inequality , for any orthonormal sequence.
For an orthonormal sequence in a Hilbert space , the following are equivalent:
- the span of the is dense in ;
- for every , the series converging in norm;
- (Parseval) for every ;
- if for every , then .
Such a sequence is an orthonormal basis.
Proof. (1) ⇒ (2). Let be the span of and . Then is orthogonal to each with (compute ), so is the orthogonal projection onto , the nearest point of to . Given , density gives in some with ; for , , so .
(2) ⇒ (3). By Pythagoras, , and because the norm is continuous.
(3) ⇒ (4). If every coefficient vanishes, .
(4) ⇒ (1). Let be the closure of the span, a closed subspace. If , pick ; then lies in , so for every , contradicting (4).
This is 2B.7 Fourier Series and the First Heat Equation's argument for Fourier series, done abstractly; there, (1) was Fejér's theorem. Every separable Hilbert space has an orthonormal basis (apply Gram–Schmidt to a dense sequence), and the map is an isometry onto . So all infinite-dimensional separable Hilbert spaces are, abstractly, the same space, ; what differs is the concrete basis, and choosing a good one is half of applied analysis.
Gram–Schmidt turns linearly independent vectors into an orthonormal sequence with the same nested spans: subtract from its projection onto the span of , then normalise. Applied to in , it produces (up to scaling) the Legendre polynomials , , , , … (Exercise 5.13). Expanding in them instead of in monomials cures the ill-conditioning of 4A.1 Banach Spaces and Bounded Operators's Hilbert matrix, because orthonormal coordinates are perfectly conditioned.
In , find the polynomial of degree at most nearest to . With an orthogonal basis the projection is a sum of independent one-dimensional projections, , using the Legendre polynomials , , , with , , .
- , coefficient .
- ( is even, odd), coefficient .
- , coefficient .
So . Its error is about , against for the best constant and for the naive guess . Two things are worth noticing. The coefficients did not change when the degree went up: the best constant, , is still the part of the best quadratic. With monomials every coefficient would have to be recomputed; with an orthogonal basis each new term is a correction that leaves the earlier ones alone, exactly as Taylor polynomials refine one another (2A.10 Derivatives). And unlike a Taylor polynomial, which matches at one point and is undefined for at , the projection is a global best fit, which is why it is the right notion for functions that are not smooth.
A noisy measured signal is often modelled as a smooth signal plus rapidly fluctuating noise. Projecting onto the first Fourier modes, , keeps the smooth part (whose energy is in low frequencies, 2B.7 Fourier Series and the First Heat Equation) and discards most of the noise (whose energy is spread over all frequencies). Too few modes blur the signal; too many let the noise back in (Figure 5.2). Because is an orthogonal projection, the energy removed is exactly , and the trade-off can be chosen by looking at how the coefficients decay. JPEG's discarding of high-frequency coefficients (2B.7 Fourier Series and the First Heat Equation) is the same idea with a different orthonormal basis.
In quantum mechanics the state of a system is a unit vector in a Hilbert space, for a single particle in space . A measurement of a quantity with a discrete set of outcomes corresponds to an orthonormal basis , one vector per outcome, and the probability of outcome is (the Born rule). Parseval's identity, , is the statement that the probabilities add up to . Projection onto the subspace spanned by is what textbook quantum mechanics calls the collapse of the state after the measurement.
Lax–Milgram
Riesz represents a functional through the inner product. Lax–Milgram represents it through any bilinear form that behaves enough like one.
Let be a real Hilbert space and a bilinear form that is
- bounded: , and
- coercive: for some .
Then for every there is a unique with for all , and .
Proof. For fixed , is a bounded functional, so by Riesz there is with ; is linear with . Similarly for some . We must solve . Coercivity gives , so : is injective with closed range. Its range is also dense: if , then , so . A closed dense subspace is everything, so is onto, and .
When is also symmetric, is itself an inner product, equivalent to the original by (1) and (2), and Lax–Milgram is just Riesz representation in that inner product. In that case the solution is also the unique minimiser of the energy
since . This is the Dirichlet principle: solving a symmetric elliptic equation is the same as minimising an energy (4A.7 Weak Convergence and the Direct Method, 6A.11 Calculus of Variations and Gradient Flows).
Consider on with . Multiply by a function vanishing at the ends and integrate by parts (2A.11 The Riemann Integral): a classical solution satisfies
Take , the completion of smooth functions vanishing near and in the norm (made precise in 4A.10 Sobolev Spaces). The left side is , bounded and coercive with ; the right side is a bounded functional for . Lax–Milgram gives a unique weak solution , with , for every , including discontinuous for which no classical solution exists. Showing that is in fact smooth when is, is a separate question, regularity (6A.6 Weak Solutions and Elliptic Regularity).
Why coercivity, and why not symmetry
The proof of Lax–Milgram is the strategy of 4A.1 Banach Spaces and Bounded Operators in miniature: coercivity is an a priori estimate, , giving injectivity and closed range, and the same inequality applied to a vector orthogonal to the range gives density. Two examples show what each hypothesis does.
Without coercivity, solvability can fail. On take , the weak form of . It is bounded, but not coercive: for , . Indeed solves the homogeneous equation, so solutions are never unique, and testing the equation against shows that a solution can exist only if . This is resonance: forcing a string at one of its natural frequencies. The precise statement, solvable exactly when is orthogonal to the kernel, is the Fredholm alternative of 4A.8 Compact Operators and Spectra. Coercivity is the condition that rules resonance out, uniformly.
Without symmetry, Lax–Milgram is genuinely needed. The convection–diffusion equation , with a constant drift and zero boundary values, models a pollutant carried along a river while diffusing. Its form is not symmetric, so it is not an inner product and Riesz alone does not apply. But it is coercive: for vanishing at the ends, so , whatever is. Lax–Milgram gives a unique weak solution for every drift. The drift contributes nothing to the energy, only to the direction in which the solution is pushed, and that is why it cannot destroy solvability. (It can still make the solution hard to compute: for large the solution has thin boundary layers, a classical challenge for finite elements.)
Weak solutions (6A.6 Weak Solutions and Elliptic Regularity): every second-order elliptic equation with uniformly elliptic coefficients (2B.3 Compactness's rehearsal) and suitable is solved this way, in . Finite elements (4A.10 Sobolev Spaces): replacing by a finite-dimensional subspace of piecewise polynomials gives a finite linear system; the discrete solution is the -orthogonal projection of onto , and Céa's lemma bounds the error by the best approximation from (Exercise 5.16). Perelman (12A.2 Ricci Flow as a Gradient Flow): the functional , rewritten as (3A.4 Measures, Probability and Weights), is a quadratic form on the Hilbert space of the manifold, and its infimum over unit vectors is the bottom of the spectrum of (4A.8 Compact Operators and Spectra).
History
David Hilbert's work on integral equations (1904–1910) introduced the space of square-summable sequences; Erhard Schmidt (1908) gave it its geometric language of orthogonality and projection, and the orthogonalisation process carries his name with Jørgen Gram's (1883). Frigyes Riesz and Maurice Fréchet proved the representation theorem independently in 1907, for . John von Neumann gave the abstract definition of a Hilbert space in 1929, for quantum mechanics, and with Pascual Jordan characterised inner product norms by the parallelogram law in 1935. Peter Lax and Arthur Milgram published their theorem in 1954. Legendre's method of least squares appeared in 1805, Gauss's in 1809.
A Hilbert space is complete with an inner product; the parallelogram law characterises its norms. Every closed convex set has a unique nearest point, characterised by an obtuse-angle condition; closed subspaces have orthogonal complements and orthogonal projections, and least squares is a projection. Riesz identifies with . Orthonormal bases give Bessel, Parseval and the isometry with ; Gram–Schmidt builds them, and gives the Legendre polynomials. Lax–Milgram solves for bounded coercive forms, which is the existence theorem for weak solutions of elliptic equations. 4A.6 The Fourier Transform turns to the Fourier transform on , a unitary map of that diagonalises derivatives.
Exercises
Show that the parallelogram law fails for the and norms on (try , ), and for the norm on with (try , ).
Solution
For : , so the left side is , the right side . For : left , right . For : and , so , which holds only for .
In with the sup norm, let , a closed affine subspace (hence convex). Show that but no has . So the projection theorem needs the Hilbert structure.
Solution
For , . Equality would need on all of and on all of , impossible for a continuous function. For the infimum, let be on , on , and linear in between; then , so with . The distance from to is , and it is not attained.
Fit a line to the points by solving the normal equations, and check that the residual vector is orthogonal to and to .
Solution
, , so , . Residuals sum to and .
Prove Theorem 5.5. ((1) ⇒ (2): the partial sums are the best approximations from the first vectors' span, as in 2B.7 Fourier Series and the First Heat Equation. (2) ⇒ (3): continuity of the norm. (3) ⇒ (4): immediate. (4) ⇒ (1): if the closure of the span were not everything, a non-zero vector of would contradict (4).)
Solution
The proof is written out after Theorem 5.5.
Apply Gram–Schmidt to in , and show the results are proportional to , , , .
Solution
Odd and even functions are orthogonal on , which saves most of the work. is already orthogonal to . For , subtract its projection onto : , giving (it is orthogonal to by parity). For , subtract its projection onto : , giving (orthogonal to the even ones by parity). Normalising gives the orthonormal versions; the classical Legendre polynomials are scaled instead so that their value at is .
In , find the best approximation to (a) by constants and (b) by linear functions , and compute the error in each case.
Solution
(a) The projection onto constants is the mean, ; the error is . (b) The residual must be orthogonal to and : and , that is, and , so , . The error is .
For on , , with and bounded, write the weak formulation and show the form is bounded and coercive on , assuming the Poincaré inequality for (proved in 4A.10 Sobolev Spaces).
Solution
. Bounded: . Coercive: , using Poincaré to absorb .
In the setting of Lax–Milgram, let be a closed subspace (for instance, finite-dimensional) and the solution of for all . Show Galerkin orthogonality for , and deduce
The finite element method's accuracy is therefore governed by how well piecewise polynomials can approximate the true solution in the energy norm, which is an approximation question in Sobolev spaces (4A.10 Sobolev Spaces).
Solution
Subtract the two equations for . Then for any : .
Free resources for this chapter
Chosen for what this chapter covers, and all free to read or watch. Links checked Nov 6, 2026.
Read
- Notes Lecture 14: Basic Hilbert Space TheoryMIT OpenCourseWare 18.102 Introduction to Functional Analysis (Spring 2021)Inner product spaces and Hilbert spaces.
- Notes Lecture 17: Minimizers, Orthogonal Complements and the Riesz Representation TheoremMIT OpenCourseWare 18.102 Introduction to Functional Analysis (Spring 2021)Projection and Riesz representation.
- Reference Weak formulationWikipediaWeak formulations of PDE and the Lax–Milgram theorem.
Watch 4 lectures and talks
- Video Lecture 14: Basic Hilbert Space TheoryMIT OpenCourseWare 18.102 Introduction to Functional Analysis (Spring 2021), Casey RodriguezInner products, Hilbert spaces and the Cauchy–Schwarz inequality.
- Video Lecture 17: Minimizers, Orthogonal Complements and the Riesz Representation TheoremMIT OpenCourseWare 18.102 Introduction to Functional Analysis (Spring 2021), Casey RodriguezMinimisers and orthogonal projection, and the Riesz representation theorem.
- Video Lecture 17: Riesz and Lax-Milgram representation theoremsClaudio Landim, IMPA Functional Analysis doctoral courseLax–Milgram: existence for coercive bilinear forms, the engine of weak solutions.
- Video Lecture 15: Orthonormal Bases and Fourier SeriesMIT OpenCourseWare 18.102 Introduction to Functional Analysis (Spring 2021), Casey RodriguezOrthonormal bases, with Fourier series as the example.
© 2026 Neckpinch (www.neckpinch.com). All content in the guidebook (text, mathematics, figures and exercises) is protected by copyright. All rights reserved. No part may be copied, republished or redistributed without written permission.