research28 min studyLesson 81 in Mathematics

Hilbert spaces and orthogonal projection

Find the nearest admissible vector and see why closedness matters in infinite dimensions.

On this page

What you’ll understand

  • State the projection theorem with its closed-subspace hypothesis.
  • Derive a finite least-squares projection from orthogonality.
  • Distinguish convergence in a Hilbert norm from pointwise convergence.

A Hilbert space lets us keep the geometry of perpendicular vectors while allowing infinitely many coordinates. The familiar idea of dropping a perpendicular becomes a theorem about approximation: a closed linear subspace contains a unique nearest point to any vector. This underlies least squares, Fourier truncation, and weak formulations of differential equations. The important new question is whether the proposed approximation space actually contains its limits. Geometry alone cannot repair a missing limit.

An inner product and a complete geometry

An inner product measures lengths and angles through a positive definite pairing. Throughout this module the complex inner product is conjugate linear in its first argument and linear in its second. Its induced norm obeys the parallelogram identity, a stronger geometric property than the triangle inequality. A Hilbert space is complete in this norm: every Cauchy sequence has a limit inside the space. Infinite-dimensional examples include square-summable sequences and square-integrable functions, with the latter understood as almost-everywhere equivalence classes.

The completion is consequential. Polynomials on [0,1], equipped with the L2 norm, form an inner-product space but are not complete. They can approximate nonpolynomial functions in mean square. Passing to L2 adds the missing limits without assigning unique values at individual points. When a calculation uses point evaluation, derivatives, or boundary traces, further regularity must be established. A norm that controls integrated squared error does not by itself control the largest pointwise error.

∥x+y∥2+∥x−y∥2=2∥x∥2+2∥y∥2,∥x∥2=⟨x,x⟩\|x+y\|^2+\|x-y\|^2=2\|x\|^2+2\|y\|^2,\qquad \|x\|^2=\langle x,x\rangle
The parallelogram identity is the geometric ingredient that turns a minimizing sequence into a Cauchy sequence in the projection theorem.↔ Scroll wide equations horizontally.

Why the nearest point is perpendicular

Let M be a closed linear subspace of a Hilbert space H. A sequence of candidates whose distances to x approach the infimum is Cauchy by the parallelogram identity. Completeness gives a limit in H, and closedness keeps it in M. Call it P_M x. Varying that candidate along any direction in M shows that the residual is perpendicular to M. Otherwise a small move along that direction would reduce the distance, contradicting minimality.

Orthogonality also proves uniqueness and the error formula. For any other candidate m, the residual x−P_M x and the difference P_M x−m are perpendicular, so their squared norms add. No other candidate improves the error. The resulting projection is linear, self-adjoint, idempotent, and has norm one when M is nonzero. For the zero subspace its norm is zero. Every nonempty closed convex subset of H also has a unique nearest point, but its nearest-point map need not be linear.

x=PMx+(I−PM)x,∥x−m∥2=∥x−PMx∥2+∥PMx−m∥2(m∈M)x=P_Mx+(I-P_M)x,\qquad \|x-m\|^2=\|x-P_Mx\|^2+\|P_Mx-m\|^2\quad(m\in M)
M must be a closed linear subspace. The orthogonal decomposition makes the minimizer and its error certificate explicit.↔ Scroll wide equations horizontally.

Finite coordinates do not remove infinite-dimensional questions

If e_1 through e_N are orthonormal, the projection onto their span is the sum of each vector times its inner-product coefficient. Expanding the approximation space decreases the best error. For an orthonormal basis, completeness of the basis means these projections converge in norm to every vector. This is different from merely having infinitely many mutually perpendicular vectors: their closed span could still miss an entire perpendicular component of the space.

A numerical discretization replaces a large space by a finite span, where closedness is automatic. That proves a best approximation within the chosen span, not convergence of the entire numerical method. One must also control consistency, stability, and how the trial spaces approach the intended solution class. The lab below only shows a single vector and its coordinate projections. It makes perpendicular components visible, but cannot demonstrate an arbitrary Hilbert-space projection or establish density of a function basis.

PNx=∑j=1N⟨ej,x⟩ej,∥x−PNx∥2=∥x∥2−∑j=1N∣⟨ej,x⟩∣2P_Nx=\sum_{j=1}^{N}\langle e_j,x\rangle e_j,\qquad \|x-P_Nx\|^2=\|x\|^2-\sum_{j=1}^{N}|\langle e_j,x\rangle|^2
The displayed identity applies to a finite orthonormal family; convergence as N grows additionally requires that its closed span contain x.↔ Scroll wide equations horizontally.

Project onto a slanted line

In real Euclidean space, project x=(3,1) onto the line spanned by v=(1,1). Compute the squared minimum error.

  1. Write the candidate as av. Orthogonality requires (x−av)⋅v=0(x-av)\cdot v=0, so 4−2a=0 and a=2.

  2. The projection is (2,2). The residual is (1,−1), whose dot product with v is zero and whose squared norm is 2.

  3. For any real a the squared distance is (3−a)²+(1−a)²=2+2(a−2)². Its unique minimum is therefore exactly 2, attained at a=2.

The result

The nearest point is (2,2), with distance √2. The residual provides an independent orthogonality check.

Explore the model

Interactive lab

Interactive lab · vectors

Inspect perpendicular components

Set the angle to 45° and magnitude to 2. Read the equal x and y components, then vary the angle while holding the length fixed. The lab displays one 2D vector and its projections onto the coordinate axes; the slanted-line worked example must be calculated separately.

Inspect perpendicular componentsPlayback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Current readings: x component: 1.393; y component: 0.975; Magnitude: 1.7. All parameters are adjustable with the labeled controls below.−7.46−3.7303.737.46−3.5−1.7501.753.5xyvvₓ = 1.39
Vectorx / y projectionsTrace marker
x component
1.393
y component
0.975
Magnitude
1.7
t = 0 s

Playback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forAn orthogonal projection is tied to a specified subspace and inner product, not just a visually plausible shadow.

Check your understanding

Which condition ensures the nearest vector belongs to the approximation subspace in the Hilbert-space projection theorem?

Try it yourself

Project (2,3,4) onto the plane z=0 and verify the Pythagorean error identity with the alternative candidate (1,1,0).

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Separate the component perpendicular to the plane before comparing candidates.

Compare with the solution

The projection is (2,3,0), so the residual has squared norm 16. The squared distance from the projection to (1,1,0) is 1+4=5. Their sum is 21, which equals the squared distance from (2,3,4) to (1,1,0): 1+4+16.

Take it with you

  • A Hilbert space combines inner-product geometry with norm completeness.
  • Closed linear subspaces admit unique orthogonal best approximations.
  • Finite projections approximate only what lies in the closure of the chosen span.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.