Let $V$ be a vector space with inner product $\langle\,,\,\rangle$ and $\{v_1,v_2,\dots,v_n\}$ an orthonormal basis of $V$. Prove that $\sum_{i=1}^n \langle x,v_i\rangle^2=\|x\|^2$, for $x\in V$.
I´m not very fond of proofs but this is what I have:
\begin{align} \sum_{i=1}^n \langle x,v_i\rangle^2 &=\sum_{i=1}^n (\|x\|\,\|v_i\| \cos(\theta))^2\\ &=\sum_{i=1}^n \|x\|^2 \|v_i\|^2 \cos^2(\theta)\\ &=\sum_{i=1}^n (\|x\|^2\cos(\theta)) (\|v_i\|^2 \cos(\theta))\\ &=\sum_{i=1}^n \langle x,x\rangle \langle v_i,v_i\rangle\\ &=\langle x,x\rangle\sum_{i=1}^n \langle v_i,v_i\rangle\\ &=\|x\|^2 n \end{align}
What am I wrong? Any suggestions to improve my proofs would be helpful. Thanks.
This is known as the Parseval's Identity. Observe that since $(v_i)_{i=1}^n$ is an orthonormal basis, $$ x = \sum_{i=1}^n \langle v_i,x \rangle v_i $$ By Pythagorean Theorem, $$ \|x\|^2 = \left\lVert \sum_{i=1}^n \langle v_i,x \rangle v_i\right\rVert = \sum_{i=1}^n \|\langle v_i,x \rangle v_i\|^2 = \sum_{i=1}^n |\langle v_i,x \rangle|^2 $$ The problem with your proof is it uses $\theta$, which is not very rigorous, and leads to the incorrect result.