15.14: Approximation and Projections in Hilbert Space
- Page ID
- 23204
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Introduction
Given a line 'l' and a point 'p' in the plane, what's the closest point 'm' to 'p' on 'l'?

Same problem: Let \(x\) and \(v\) be vectors in \(\mathbb{R}^2\). Say \(\|v\|=1\). For what value of \(\alpha\) is \(\|x-\alpha v\|_{2}\) minimized? (what point in span{v} best approximates \(x\)?)

Figure \(\PageIndex{2}\)
The condition is that \(x-\widehat{\alpha} v\) and \(\alpha v\) are orthogonal.
Calculating α
How to calculate \(\widehat{a}\)?
We know that (\(x-\widehat{\alpha} v\)) is perpendicular to every vector in span{v}, so
\[\begin{array}{l}
\langle x-\widehat{\alpha} v, \beta v\rangle=0, \forall(\beta) \\
\bar{\beta}\langle(x, v)\rangle-\widehat{\alpha} \bar{\beta}\langle(v, v)\rangle=0
\end{array} \nonumber \]
because \(\langle v, v\rangle=1\), so
\[(\langle(x, v)\rangle-\hat{\alpha}=0) \Rightarrow(\hat{\alpha}=\langle x, v\rangle) \nonumber \]
Closest vector in span{v} = \(\langle(x, v)\rangle v\), where \(\langle(x, v)\rangle v\) is the projection of \(x\) onto \(v\).
We can do the same thing in higher dimensions.
Exercise \(\PageIndex{1}\)
Let \(V \subset H\) be a subspace of a Hilbert space (Section 15.4) \(H\). Let \(x \in H\) be given. Find the \(y \in V\) that best approximates \(x\). i.e., \(\|x-y\|\) is minimized.
- Answer
-
- Find an orthonormal basis \(\left\{b_{1}, \ldots, b_{k}\right\}\) for \(V\)
- Project \(x\) onto \(V\) using \[y=\sum_{i=1}^{k}\left\langle\left(x, b_{i}\right)\right\rangle b_{i} \nonumber \] then \(y\) is the closest point in \(V\) to x and \((x-y) \perp V(\langle x-y, v\rangle=0, \quad \forall(v) \in V\)
Example \(\PageIndex{1}\)
\(x \in \mathbb{R}^{3}\), \(V=\operatorname{span}\left(\left\{\left(\begin{array}{l}
1 \\
0 \\
0
\end{array}\right),\left(\begin{array}{l}
0 \\
1 \\
0
\end{array}\right)\right\}\right)\), \(x=\left(\begin{array}{l}
a \\
b \\
c
\end{array}\right)\). So,
\[y=\sum_{i=1}^{2}\left\langle\left(x, b_{i}\right)\right\rangle b_{i}=a\left(\begin{array}{l}
1 \\
0 \\
0
\end{array}\right)+b\left(\begin{array}{l}
0 \\
1 \\
0
\end{array}\right)=\left(\begin{array}{l}
a \\
b \\
0
\end{array}\right) \nonumber \]
Example \(\PageIndex{2}\)
V = {space of periodic signals with frequency no greater than \(3w_0\)}. Given periodic f(t), what is the signal in V that best approximates f?
- \(\left\{\frac{1}{\sqrt{T}} e^{j w_{0} k t}, k=-3,-2, \dots, 2,3\right\}\) is an ONB for V
- \(g(t)=\frac{1}{T} \sum_{k=-3}^{3}\left\langle\left(f(t), e^{j w_{0} k t}\right)\right\rangle e^{j w_{0} k t}\) is the closest signal in V to f(t) ⇒ reconstruct f(t) using only 7 terms of its Fourier series.
Example \(\PageIndex{3}\)
Let V = {functions piecewise constant between the integers}
- ONB for V.
\[b_{i}=\left\{\begin{array}{l}
1 \text { if } i-1 \leq t<i \\
0 \text { otherwise }
\end{array}\right. \nonumber \]
where \(\left\{b_{i}\right\}\) is an ONB.
Best piecewise constant approximation?
\[\begin{array}{c}
g(t)=\sum_{i=-\infty}^{\infty}\left\langle\left(f, b_{i}\right)\right\rangle b_{i} \\
\left\langle f, b_{i}\right\rangle=\int_{-\infty}^{\infty} f(t) b_{i}(t) \mathrm{d} t=\int_{i-1}^{i} f(t) \mathrm{d} t
\end{array} \nonumber \]
Example \(\PageIndex{4}\)
This demonstration explores approximation using a Fourier basis and a Haar Wavelet basis. See here for instructions on how to use the demo.