Direct sums and idempotent transformations

Let T:V→V be a linear transformation on a finite-dimensional vector space. Prove that if T2=T, then

V=ker⁡(T)⊕im(T).