linear algebra - rank-nullity

Let V be an n-dimensional vector space where $\displaystyle n\geq 1$. If $\displaystyle T: V\rightarrow V$is a linear transformation, prove that the following statements are equivalent:

a) im(T)=ker(T)

b) $\displaystyle T^2 = 0$, n is even and $\displaystyle r(T)=\frac{n}{2}$.

So far I have managed show show that (a) implies (b), but when trying to find (b) implies (a) I get stuck. This is my working so far:

dim(V) = r(T) + n(T)

$\displaystyle r(T) = \frac{n}{2}, dim(V) = n,$ so $\displaystyle r(T)=n(T)=\frac{n}{2}$

$\displaystyle T^2(V)=0, T(T(V))=0$, so T(V) $\displaystyle \epsilon$ ker(T)