Page 127 - Linear Algebra Done Right
P. 127
114
where 6.38 comes from the Pythagorean theorem (6.3), which applies
because v −P U v ∈ U and P U v −u ∈ U. Taking square roots gives the
⊥
desired inequality. Chapter 6. Inner-Product Spaces
Our inequality is an equality if and only if 6.37 is an equality, which
happens if and only if P U v − u = 0, which happens if and only if
u = P U v.
v
U
P v
U
0
P U v is the closest point in U to v.
The last proposition is often combined with the formula 6.35 to
compute explicit solutions to minimization problems. As an illustra-
tion of this procedure, consider the problem of finding a polynomial u
with real coefficients and degree at most 5 that on the interval [−π, π]
approximates sin x as well as possible, in the sense that
π
2
| sin x − u(x)| dx
−π
is as small as possible. To solve this problem, let C[−π, π] denote the
real vector space of continuous real-valued functions on [−π, π] with
inner product
π
6.39 f, g = f(x)g(x) dx.
−π
Let v ∈ C[−π, π] be the function defined by v(x) = sin x. Let U
denote the subspace of C[−π, π] consisting of the polynomials with
real coefficients and degree at most 5. Our problem can now be re-
formulated as follows: find u ∈ U such that v − u is as small as
possible.
To compute the solution to our approximation problem, first apply
the Gram-Schmidt procedure (using the inner product given by 6.39)