Let \(\mathcal {H}\) be a Hilbert space with inner product \((x,y)\) and let the set \(\{e_n\}_{n=1}^{\infty }\) be orthonormal in \(\mathcal {H}\). Complete the following:
- Prove that the formal series \[ g=\sum _{n=1}^{\infty }(f,e_n)e_n \] converges for each \(f\in \mathcal {H}\) to an element \(g\in \mathcal {H}\).
- Let the mapping \(\mathcal {P}\) be defined on \(\mathcal {H}\) by \(\mathcal {P}f=g\), \(g=\sum _{n=1}^{\infty }(f,e_n)e_n\). Prove that \(\mathcal {P}\) is an orthogonal projection on \(\mathcal {H}\).