Convergence of Sum of Orthogonal Let $\{x_n\}$ be an orthonormal basis of a Hilbert space $H.$
Can anyone help me how to show that $\sum_{n=0}^{\infty}|(x_n,x)|^2$ is convergent and $\|x\|^2=\sum_{n=0}^{\infty}|(x_n,x)|^2?$
This is to show that $(x_n,x)\rightarrow 0.$ 
I used Bessel's Inequality to show that $\|x\|^2\geq\sum_{n=0}^{\infty}|(x_n,x)|^2$. Is this even right?
Thanks a lot.

The usual definition of a basis for a Hilbert space denoted $\{x_n\}$ you mean that the set is orthonormal and that
$$x = \sum_{n=1}^\infty \langle x,x_n\rangle x_n$$
meaning that
$$\lim_{N\rightarrow \infty} \left\|x-\sum_{n=1}^N\langle x,x_n\rangle x_n\right\| = 0\quad \text{Convergence in the Hilbert space norm}$$
Now if two vectors are orthogonal its easy to prove Pythagoras Theorem in this general setting so that $x\perp y\Rightarrow \|x+y\|^2 = \|x\|^2+\|y\|^2$. Now we can write
$$\left\|x\right\|^2 = \left\|x-\sum_{n=1}^{N}\langle x,x_n\rangle x_n+\sum_{n=1}^{N}\langle x,x_n\rangle x_n\right\|^2 = \left\|x-\sum_{n=1}^{N}\langle x,x_n\rangle x_n\right\|^2+\left\|\sum_{n=1}^{N}\langle x,x_n\rangle x_n\right\|^2$$
Why is this equality true? How can you use this to prove Bessel's inequality? Taking the limit as $N$ tends to infinity you should get the equality you want after having applied Pythagoras theorem to the last term.
Note further that if you only want to prove that $\langle x,x_n\rangle \rightarrow 0$ then you only need that Bessel's inequality is true and then you don't need that $\{x_n\}$ is a basis, it suffices that it is an orthonormal set.
