In an infinite dimensional Hilbert space, when can we express any element in H as linear combination of the basis vectors? Let H be a hilbert space, infinite dimensional. Let $(e_n)$ be an orthonormal basis for H. Can we express any x in H as $x=\sum_{i=1}^{\infty} c_i e_i$ where the constants are (maybe) $<e_i,x>$? Also when is an infinite linear combination of basis vectors like the one above an element in H? I ask because I know on one hand that by definition of Hilbert basis, any element in H can be approximated in the norm by a sequence of finite linear combinations of $e_k$ but have doubts as to whether we can write any element as an infinite linear combination of the one above.. What conditions garantee that such an infinite sum would even be in H? Thanks for any information.
 A: So firstly we give some definitions:

If $K$ is a subset of a Hilbert space H, the set of finite linear combinations of elements of $K$ is called the span of $K$. An orthonormal basis is then an orthonormal subset of $H$ s.t. the closure of its span is all of $H$.

Then we could show that Every Hilbert space has an orthonormal basis. (Given axiom of choice)
Proof. If $B=\{u_{\alpha}\}$ is orthonormal, but not a basis, let $V$ be the closure of the linear span of $B$, i.e. the closure w.r.t. the norm in $H$ of the set of finite linear combinations of elemtns of $B$. Choose $x\in H^{\perp}$, and if we let $B'=B\cup\{\frac{x}{||x||}\}$, then $B'$ is a basis that is strictly bigger than $B$.
It is easy to see that the union of an increasing sequence of orthonormal sets is an orthonormal set, and so there is a maximal one by Zorn's lemma. By preceding paragraph, this maximal orthonormal set must be a basis, for otherwise we could find a larger basis. Q.E.D.
Note: here we implicitly used the fact that the Gram-Schmidt procedure from linear algebra also works in infinitely many dimensions, and this is because we could do the follow step over the linearly independent sequence $\{x_n\}_{n=1}^{\infty}$:
$$u_N=x_N-\sum_{i=1}^{n-1}\langle x_N,u_i\rangle u_i,$$
$$u_N=v_N/||v_N||$$
In sum, unfortunately it is not a constructive proof, and we relied on axiom of choice. Thus we really cannot show one such basis that all elements in $H$ could be expressed by it - but as long as you accept axiom of choice, you know there is at least one set of such basis out there.
A: $\sum_i c_i e_i$ converges iff $\sum_i c_i^2 <\infty$. 
For any $x\in H$, $x=\sum_i \langle x,e_i\rangle e_i$ where $\sum_i |\langle x,e_i\rangle|^2 =||x||^2 <\infty$.
