# Existence of Orthonormal Basis for Hilbert space.

Wikipedia cites the following text:https://epdf.tips/linear-functional-analysis.html (Page 79) which states that not every Hilbert space has an orthonormal basis. It states that an Hilbert space has an orthonormal basis iff its separable.

However, this site gives a proof using Zorn's Lemma which states that every Hilbert space has an orthonormal basis. The proof seems fine to me.

So now I am confused. Is there an orthonormal basis or not?

Definition Let $$\mathcal H$$ be a Hilbert space and $$\{e_n\}_{n\in \mathbb N}$$ be an orthonormal sequence in $$\mathcal H$$. $$\{ e_n\}_{n\in \mathbb N}$$ is called an orthonormal basis if $$\{ e_n : n\in \mathbb N\}^\perp = \{0\}$$.
Note that $$\{e_n\}_{n\in \mathbb N}$$ is an orthonormal sequence if $$\| e_n\| =1$$ for all $$n$$ and $$\langle e_i, e_j\rangle = 0$$ for all $$i\neq j$$. That the index set is $$\mathbb N$$ is in the definition.
Thus it is true that, using the definition in the book, that $$\mathcal H$$ has an orthonormal basis if and only if it is separable. A proof can be found here.