I am studying the theorem that tells us that the eigenvectors of a normal, compact operator $T$ on a Hilbert Space $H$ give us an ONB of $H$.
In my script he proves that:
$E^{\perp} := \overline{span \lbrace eigenvectors(T)\rbrace}^{\perp}=ker(T)$
I don't understand why this shows that $E=H$.
When you write $eigenvectors(T)$, it seems like you're implicitly talking about the ones with non-zero eigenvalues. The kernel of $T$ is the eigenspace associated to the eigenvalue 0.
So it seems like the $E$ you've defined isn't actually all of $H$ (unless $\ker(T)$ is trivial). But if you regard $E$ as the sum of the eigenspaces with $\lambda \neq 0$ and then let $E_0 = \ker(T)$ be the eigenspace with $\lambda = 0$, then $E \oplus E_0 = H$.
That's still enough to get an ONB of H consisting of $T$'s eigenvectors - you just have to remember that eigenvectors can have the eigenvalue 0.