Pythagoream theorem I am preparing a presentation about inner product spaces and I am a little bit confused. I hope anyone can help me to summarize the necessary assumptions for the following theorems:
Pythagorean theorem - it is clear that for any couple of orthogonal vectors is $$\left\|x \right\|^2+\left\|y \right\|^2=\left\|x+y \right\|^2$$
and it can be generalized to $$\sum_{i=1}^k\left\|e_i \right\|^2=\left\|\sum_{i=1}^k{e_i} \right\|^2 $$if $\{e_1,\ldots,e_k\}$ is finite mutually orthogonal set.
There is also Bessel's inequality which holds only in Hilbert spaces $$\sum_{i=1}^\infty|\langle x,e_i \rangle|^2\leq \| x \|^2,$$ where $\{e_1,e_2,\ldots\}$ is orthonormal system.
If $\{e_1,e_2,\ldots\}$ is orthonormal basis, then it is replaced by Parseval's identity 
$$
\sum_{i=1}^\infty|\langle x,e_i \rangle|^2= \| x \|^2.
$$
Is there a connection between those two relationships and the Pythagorean theorem? And can the finite sum in Pythagorean theorem be replaced with infinite sum? I mean when does this equality make sense?
$$\sum_{i=1}^\infty\left\|e_i \right\|^2=\left\|\sum_{i=1}^\infty{e_i} \right\|^2 $$
Thank you.
 A: The equality you wrote does not really make sense since $||e_i||=1$ for each $i$ so $$\sum_{i=1}^\infty||e_i||^2$$ does not converge.
If you drop the demand that the vectors $e_i$ must have length $1$ and demand that the sum $$\sum_{i=1}^\infty$$ converges to a vector $x$, then the equality you wrote is simply Parseval's identity for $x$ given the orthonormal set obtained by normalizing the vectors $e_i$.
A: Gerard Folland states in his Fourier analysis book: 

If $\{\phi_n\}_1^{\infty}$ is an orthonormal set in $L^2(a,b)$ (the
  set of square-integrable functions on $[a,b]$) and for all $f\in
 L^2(a,b)$ the following holds: 
$$f= \sum_1^\infty\langle f, \phi_n\rangle\phi_n,$$
and the Pythagorean theorem extends to infinite sums of orthogonal
  vector, Bessel's inequality should actually be an equality, namely
  Parseval's equation.

Hope that helps. I can see Pythagorean theorem used all the time with proves involving Bessel's inequality and Parseval's equation so I'd say yes they are related. 
