The Projection Theorem
Let$ \mathcal{M}be a closed subspace (refer to "closed set") of$ \mathcal{H}. Then, for any$ \boldsymbol{x} \in \mathcal{H}, there exists a unique pair$ (\boldsymbol{x}_1, \boldsymbol{x}_2)satisfying$ \boldsymbol{x} = \boldsymbol{x}_1 + \boldsymbol{x}_2with$ \boldsymbol{x}_1 \in \mathcal{M}and$ \boldsymbol{x}_2 \in \mathcal{M}^\perp. https://scrapbox.io/files/656b1b65bb40f5002382f7d9.png
Proof.
For$ \boldsymbol{x} \in \mathcal{H}, let$ d = \inf_{\boldsymbol{y}\in\mathcal{M}}\| \boldsymbol{x} - \boldsymbol{y} \|.
Then, for any$ n \in \mathbb{N}, there exists$ \boldsymbol{y}_n \in \mathcal{M}satisfying
$ d^2 \le \| \boldsymbol{x} - \boldsymbol{y}_n \|^2 < d^2 + \frac{1}{n^2}. $ \tag{1}
Using the midpoint theorem for$ \bm{x} - \bm{y}_nand$ \bm{x} - \bm{y}_m, where
$ 0 \le \| \bm{y}_n - \bm{y}_m \|^2
$ = 2\| \bm{x} - \bm{y}_n \|^2 + 2\| \bm{x} - \bm{y}_m\|^2 - \| 2\bm{x} - \bm{y}_n - \bm{y}_m \|^2
$ \le 2(d^2+\frac{1}{n^2}) + 2(d^2 + \frac{1}{m^2}) - 4\| \bm{x} - \frac{\bm{y}_n + \bm{y}_m}{2} \|^2
$ \le \frac{2}{n^2} + \frac{2}{m^2} \to 0 \ \ (n,m \to \infty),
we obtain$ \| \bm{y}_n - \bm{x}_1 \| \to 0 \ \ (n \to \infty) for some $ \bm{x}_1 \in \mathcal{H} due to the completeness of$ \mathcal{H}. Since$ \mathcal{M} is a closed subspace, we have$ \bm{x}_1 \in \mathcal{M}, and by continuity of the norm and equation$ (1),$ \| \bm{x} - \bm{x}_1 \| = d holds.
Now, defining$ \boldsymbol{x}_2 = \boldsymbol{x} - \boldsymbol{x}_1, we aim to show that$ \boldsymbol{x}_2 \in \mathcal{M}^\perp. Assuming the existence of$ \boldsymbol{y} \in \mathcal{M}such that$ \langle \boldsymbol{x}_2, \boldsymbol{y} \rangle \neq 0, we can adjust$ \boldsymbol{y}by scaling so that$ \langle \boldsymbol{x}_2, \boldsymbol{y} \rangle = 1. Note that$ \| \bm{x}_2 \| = \| \bm{x} - \bm{x}_1 \| = d. In this case,
$ d^2 \le \| \boldsymbol{x} - (\boldsymbol{x}_1 + t\boldsymbol{y}) \|^2 = \| \boldsymbol{x}_2 - t \boldsymbol{y} \|^2 = d^2 - 2t + \| \boldsymbol{y} \|^2t^2 = \left(\|\boldsymbol{y}\| t - \frac{1}{\| \boldsymbol{y} \|}\right)^2 - \frac{1}{\| \boldsymbol{y} \|^2} + d^2.
However, for$ t = \frac{1}{\| \boldsymbol{y} \|^2}, we obtain$ d^2 \le d^2 - \frac{1}{\| \boldsymbol{y} \|^2} < d^2, which is a contradiction. Therefore, for all$ \boldsymbol{y} \in \mathcal{M},$ \langle \boldsymbol{x}_2, \boldsymbol{y} \rangle = 0, implying$ \boldsymbol{x}_2 \in \mathcal{M}^\perp. Thus, we have shown that$ \boldsymbol{x} = \boldsymbol{x}_1 + \boldsymbol{x}_2 \ (\boldsymbol{x}_1 \in \mathcal{M}, \boldsymbol{x}_2 \in \mathcal{M}^\perp).
Next, we demonstrate the uniqueness of the decomposition. Suppose there exists another decomposition$ \boldsymbol{x} = \boldsymbol{x}_1' + \boldsymbol{x}_2' \ (\boldsymbol{x}_1' \in \mathcal{M}, \boldsymbol{x}_2' \in \mathcal{M}). Then,$ \boldsymbol{x}_1 + \boldsymbol{x}_2 = \boldsymbol{x}_1' + \boldsymbol{x}_2', and it follows that$ \boldsymbol{x}_1 - \boldsymbol{x}_1' = \boldsymbol{x}_2' - \boldsymbol{x}_2, where$ \boldsymbol{x}_1 - \boldsymbol{x}_1' \in \mathcal{M}and$ \boldsymbol{x}_2' - \boldsymbol{x}_2 \in \mathcal{M}^\perp. Noting that$ \| \boldsymbol{x}_1 - \boldsymbol{x}_1' \|^2 = \langle \boldsymbol{x}_1 - \boldsymbol{x}_1', \boldsymbol{x}_2' - \boldsymbol{x}_2 \rangle = 0, we conclude that$ \boldsymbol{x}_1 = \boldsymbol{x}_1', and$ \boldsymbol{x}_2 = \boldsymbol{x}_2'. Therefore, the decomposition$ \boldsymbol{x} = \boldsymbol{x}_1 + \boldsymbol{x}_2is unique. $ \Box