Historical Context & Motivation
Imagine you need to draw a straight line through a scatter of data points, but no single line passes through every point. What do you do? You find the line that comes as close as possible to all the points. This idea — getting the best answer when a perfect answer is impossible — is at the heart of best approximation. For centuries, mathematicians and scientists have tackled problems where exact solutions simply don't exist. Instead, they looked for the closest match, and this search shaped entire fields of mathematics.
The central question that best approximation answers is: given a vector (or point, or signal) and a subspace where we must find our answer, which element of that subspace is the closest to our target? As we'll see, the answer involves a beautiful geometric idea called orthogonal projection.
Core Principles & Definitions
Before we can find the best approximation, we need a few building blocks. These ideas let us measure distances and angles in vector spaces, much like a ruler and protractor work in everyday geometry.
Inner Product
Norm (Length)
Subspace
Orthogonality
Orthogonal Projection
Visual Explanation
The diagram below shows the geometry of best approximation in three dimensions. A vector b lives in 3D space, but the subspace W (shown as a shaded plane) is only two-dimensional. The best approximation b̂ is the point on W that is closest to b. The error vector b − b̂ is perpendicular to the entire subspace.
Notice the right-angle symbol where the error vector meets the subspace. This perpendicularity is not a coincidence — it's the defining property that makes b̂ the closest point in W to the target b. If you moved to any other point on the plane, you'd be farther away. This is the same reason the shortest distance from a point to a line is always the perpendicular distance, an idea you may remember from geometry class.
Mathematical Framework
Now let's write down the math. Suppose W is a subspace of an inner product space V, and b is a vector in V that may or may not be in W. We want to find the vector b̂ in W that minimizes the distance ‖b − b̂‖.
When the subspace W has an orthogonal basis {u₁, u₂, …, uₖ}, computing the projection becomes straightforward. You project b onto each basis vector individually and then add the results together.
If the basis is orthonormal (meaning each basis vector has length 1), the formula simplifies even further because ⟨uᵢ, uᵢ⟩ = 1 for every basis vector.
Step-by-Step Projection Process
Let's visualize the step-by-step process of finding a best approximation. The diagram below breaks down how we decompose a vector b into a part that lies in the subspace (the projection b̂) and a part that is perpendicular to it (the error). In this example, W is a one-dimensional subspace — simply a line through the origin in 2D.
The Projection Algorithm
- Step 1 — Get an orthogonal basis. If the subspace W doesn't already have an orthogonal basis, use the Gram–Schmidt process to create one.
- Step 2 — Compute each projection. For each basis vector uᵢ, calculate the scalar (⟨b, uᵢ⟩ / ⟨uᵢ, uᵢ⟩) and multiply it by uᵢ.
- Step 3 — Add them up. Sum all the individual projections to get b̂ = proj_W(b).
- Step 4 — Find the error. Compute the error vector as b − b̂. Its length ‖b − b̂‖ is the distance from b to the subspace.
Worked Example
Let's find the best approximation to a vector b from a subspace W using a concrete numerical example.
Strengths & Limitations
Best approximation via orthogonal projection is a powerful tool, but like any technique, it has situations where it shines and situations where you need to be careful.
| Aspect | Strengths | Limitations |
|---|---|---|
| Uniqueness | The best approximation is always unique — there is exactly one closest point in the subspace. | Only guaranteed in complete inner product spaces with closed subspaces. |
| Computation | Very fast with an orthogonal or orthonormal basis — just dot products and scalar multiplication. | If the basis is not orthogonal, you first need the Gram–Schmidt process, which adds extra steps. |
| Geometric Intuition | The perpendicularity condition gives strong visual and geometric understanding. | In very high dimensions, visualizing the geometry becomes impossible (but the math still works). |
| Error Control | You can calculate the exact error ‖b − b̂‖, so you know how good your approximation is. | The error can only be reduced by enlarging the subspace W — you cannot improve within the same subspace. |
Connection to Advanced Theory
Best approximation is not just an isolated technique. It connects to many powerful ideas in mathematics, science, and engineering. Here's how the concept you just learned relates to more advanced topics.
| This Lesson | Advanced Extension | Where It Appears |
|---|---|---|
| Projection onto a subspace with orthogonal basis | Least-squares regression — finding the best-fit line through data points | Statistics, data science, machine learning |
| Orthogonal projection in ℝⁿ | Fourier series — approximating signals using sine and cosine functions | Signal processing, audio compression, music technology |
| Minimizing ‖b − b̂‖ | QR factorization — a matrix decomposition that makes projection computationally efficient | Numerical analysis, computer graphics, engineering simulations |
| Error vector is perpendicular | Hilbert space theory — projection theorem in infinite-dimensional spaces | Quantum mechanics, functional analysis, partial differential equations |
The idea you learned here — projecting onto a subspace to find the closest match — is the same idea behind fitting a line to data in statistics, compressing music files on your phone, and even how quantum physics describes the state of a particle. The language gets more sophisticated, but the core geometry of dropping a perpendicular stays exactly the same.
Practice Problems
Summary
The best approximation to a vector b from a subspace W is the orthogonal projection of b onto W, written b̂ = proj_W(b). It is the unique vector in W that minimizes the distance ‖b − b̂‖. The defining property is the orthogonality condition: the error vector b − b̂ is perpendicular to every vector in W, meaning ⟨b − b̂, w⟩ = 0 for all w in W.
To compute b̂, use an orthogonal basis {u₁, u₂, …, uₖ} for W and apply the formula b̂ = Σ (⟨b, uᵢ⟩ / ⟨uᵢ, uᵢ⟩) × uᵢ. With an orthonormal basis, this simplifies to b̂ = Σ ⟨b, uᵢ⟩ × uᵢ. Best approximation is the foundation of least-squares regression, Fourier analysis, and countless applications in science and engineering.