Hi guys.

I need to prove Bessel's inequality for a finite set of orthonormal vectors $\displaystyle \left \{ e_1, e_2,...e_n \right \}$

I looked around the internet and found this on Wikipedia:

"Bessel's inequality follows from the identity:

$\displaystyle 0\leq \left \| x-\sum_{i=1}^{n}<x,e_i>e_i \right \|^2=\left \| x \right \|^2-2\sum_{i=1}^{n}|<x,e_i>|^2+\sum_{i=1}^{n}|<x,e_i>| ^2=\left \| x \right \|^2-\sum_{i=1}^{n}|<x,e_i>|^2$

"

but something just does not make sense to me.

how did they make the first transition from $\displaystyle \left \| x-\sum_{i=1}^{n}<x,e_i>e_i \right \|^2$ to $\displaystyle \left \| x \right \|^2-2\sum_{i=1}^{n}|<x,e_i>|^2+\sum_{i=1}^{n}|<x,e_i>| ^2$?

you can't just use the binomial expanding formula here, can you?

Is there another, more simple proof for this inequality?

Thanks in advanced!