# How to show projection of $L^2$ function converges to that $L^2$ function

My teacher said that if $P_n f = \sum_{j=0}^n(f,w_j)w_j$, where $w_j$ is orthonormal basis of $L^2$, then $|P_n f- f|_{L^2} \to 0$ for $f \in L^2$. How do I prove this?

I thought $$|P_nf - f| = |\sum_{j=0}^n(f,w_j)w_j - \sum_{j=0}^\infty(f,w_j)w_j| = |\sum_{j={n+1}}^\infty(f,w_j)w_j| \leq \sum_{j={n+1}}^\infty|f|$$ where the last equality is by Cauchy Schwarz, but this equals infinity.

How to show it correctly using the definition??

-

The last inequality is not tight enough. However, we can write $$\left\lVert\sum_{j=n+1}^{+\infty}(f,w_j)w_j\right\rVert^2\leqslant \sum_{j=n+1}^{+\infty}|(f,w_j)|^2,$$ as $\{w_j\}$ is an orthonormal subset. By Bessel's inequality, the series $\sum_{j=1}^{+\infty}|(f,w_j)|^2$ is convergent. Conclude.
@michael_faber There is no need to use the DCT, as we know that the remainder of a convergent series converges to $0$. – Davide Giraudo Feb 11 '13 at 13:09