Let $\mathcal{H}$ be a finite dimensional Hilbert space over $\mathbb{C}$. We want to show that the set $\{ |\phi_i\rangle \}_{i\in I}$ is an orthonormal basis of $\mathcal{H}$ if and only if $$\sum_{i\in I} |\phi_i\rangle\langle\phi_i|=I,$$ with $I$ being the identity map in $\mathcal{H}$.
Let $|\psi\rangle\in \mathcal{H}$, then we can write $|\psi\rangle$ as a linear combination of the orthonormal basis. In other words $|\psi\rangle=\sum_{i\in I} c_i |\phi_i\rangle$, with $c_i\in\mathbb{C}$. This can be rewritten as $\psi = \sum_{i\in I} |\phi_i\rangle \langle\phi_i | \psi\rangle$. Thus we get that $\sum_{i\in I} |\phi_i\rangle \langle\phi_i|=I$.
Now for $\Leftarrow$, when we know that $\sum_{i\in I} |\phi_i\rangle\langle\phi_i|=I$, is where I'm stuck at. I want to first show that if $\{ |\phi_i\rangle \}_{i\in I}$ is linearly independent or has norm 1 that then $\{ |\phi_i\rangle \}_{i\in I}$ is an orthonormal basis, but I don't know where I should start.
Many thanks!