Since a subspace of an inner product space may itself be considered as an inner product space, the theorem of the preceding section may be applied. The following result, called the projection theorem , is the most important application.

Theorem 1. If \(\mathcal{M}\) is any subspace of a finite-dimensional inner product space \(\mathcal{V}\) , then \(\mathcal{V}\) is the direct sum of \(\mathcal{M}\) and \(\mathcal{M}^{\perp}\) , and \(\mathcal{M}^{\perp \perp}=\mathcal{M}\) .

Proof. Let \(\mathcal{X}=\{x_{1}, \ldots, x_{m}\}\) be an orthonormal set that is complete in \(\mathcal{M}\) , and let \(z\) be any vector in \(\mathcal{V}\) . We write \(x=\sum_{i} \alpha_{i} x_{i}\) , where \(\alpha_{i}=(z, x_{i})\) ; it follows from Section: Completeness , Theorem 1, that \(y=z-x\) is in \(\mathcal{M}^{\perp}\) , so that \(z\) is the sum of two vectors, \(z=x+y\) , with \(x\) in \(\mathcal{M}\) and \(y\) in \(\mathcal{M}^{\perp}\) . That \(\mathcal{M}\) and \(\mathcal{M}^{\perp}\) are disjoint is clear; if \(x\) belonged to both, then we should have \(\|x\|^{2}=(x, x)=0\) . It follows from the theorem of Section: Direct sums that \(\mathcal{V}=\mathcal{M} \oplus \mathcal{M}^{\perp}\) .

We observe that in the decomposition \(z=x+y\) , we have \[(z, x)=(x+y, x)=\|x\|^{2}+(y, x)=\|x\|^{2},\] and, similarly, \[(z, y)=\|y\|^{2}.\] Hence, if \(z\) is in \(\mathcal{M}^{\perp \perp}\) , so that \((z, y)=0\) , then \(\|y\|^{2}=0\) , so that \(z\) ( \(=x\) ) is in \(\mathcal{M}\) ; in other words, \(\mathcal{M}^{\perp \perp}\) is contained in \(\mathcal{M}\) . Since we already know that \(\mathcal{M}\) is contained in \(\mathcal{M}^{\perp \perp}\) , the proof of the theorem is complete. ◻

This kind of direct sum decomposition of an inner product space (via a subspace and its orthogonal complement) is of considerable geometric interest. We shall study the associated projections a little later; they turn out to be an interesting and important subclass of the class of all projections. At present we remark only on the connection with the Pythagorean theorem; since \((z, x)=\|x\|^{2}\) and \((z, y)=\|y\|^{2}\) , we have \[\|z\|^{2}=(z, z)=(z, x)+(z, y)=\|x\|^{2}+\|y\|^{2}.\] In other words, the square of the hypotenuse is the sum of the squares of the sides. More generally, if \(\mathcal{M}_{1}, \ldots, \mathcal{M}_{k}\) are pairwise orthogonal subspaces in an inner product space \(\mathcal{V}\) , and if \(x=x_{1}+\cdots+x_{k}\) , with \(x_{j}\) in \(\mathcal{M}_{j}\) for \(j=1, \ldots, k\) , then \[\|x\|^{2}=\|x_{1}\|^{2}+\cdots+\|x_{k}\|^{2}.\]