Show $T$ is diagonalizable if $T-\lambda I$ is idempotent 
Suppose $V$ is a finite dimensional vector space of dimension $n$ and $T$ is a linear operator on $V$ such that the characteristic polynomial of $T$ splits. Let $\lambda_1,\lambda_2,...,\lambda_k$ be the distinct eigenvalues of $T$. Further suppose that $T-\lambda_iI$ is idempotent for all $i\in\{1,2,...,k\}$. Then prove that $T$ is diagonalizable.

I would like a hint (only!) to start this problem. I am not aware of the result that $T=\lambda_1T_1+...+\lambda_kT_k$ or something like that. I mean, I am not allowed to use that since it has not been done in class. Hints excluding this will be appreciated.
 A: *

*Show first that if a linear map $T$ is idempotent, then it is diagonalizable.

*Show then that if $T-\lambda I$ is idempotent, then $T$ is diagonalizable.
A: So taking help from Mariano Suarez-Alvarez, I came up with the following solution:

We first shall show that if $T$ is idempotent, then $T$ is diagonalizable. We aim to show that $T$ has only $1$ and $0$ as eigenvalues.
Suppose $Rank(T)=r$ then, $Range(T)=L\{v_1,v_2,...,v_r\}$ where $v_1,v_2,...,v_r$ are the basis vectors for the range of $T$. Then, correspondingly, for some $u_1,u_2,...,u_r$ in $V$ we must have $T(u_i)=v_i$. But $T^2(u_i)=T(T(u_i))=T(v_i)$ and by idempotence, as $T(u_i)=T^2(u_i)$ it follows that $T(v_i)=v_i$ for all $i\in\{1,2,...,r\}$. Hence we have got the linearly independent eigenvectors corresponding to the eigenvalue $1$.
Now since $T$ is an operator, and because $Nullity(T)+Rank(T)=dim(V)$, it must happen that $V=Null(T)+Range(T)$ and the sum is a direct sum. We have got a basis for $Range(T)$ so all we now need is a basis for $Null(T)$. Since $Nullity(T)=dimV-Rank(T)$ such a basis is ensured. Let this basis be $\{v_{r+1},...v_n\}$. It is  a set of linearly independent eigenvectors corresponding to the eigenvalue $0$.
The union of these two bases gives us a basis of eigenvectors for $T$. Thus, $T$ is diagonalizable.
Now we are given that for each $i$, $T-\lambda_i I$ is idempotent. So $T-\lambda_i I$ is diagonalizable, henceI can find ALL the linearly independent eigenvectors of $T-\lambda_iI$ for which the eigenvalue is $0$. Thus, for all such vectors $v$, I get $Tv=\lambda v$ and hence I get ALL linearly independent eigenvectors for the eigenvalue $\lambda_i$ for $T$. This holds for all $i$. Hence we get a basis of eigenvectors for $T$ by collecting all these linearly independent vectors corresponding to distinct eigenvalues. Therefore, $T$ is diagonalizable.

Please check whether the argument is correct.
EDIT: One thing that still bugs me is that, whether I can say that $0$ IS indeed an eigenvalue of each $T-\lambda_i I$. What if not? To be more precise, what if $1$ is the only eigenvalue of $T-\lambda_i I$?Then can we still get the basis of eigenvectors of $T$ by collecting the linearly independent eigenvectors of the other eigenvalues?
A: If the characteristic polynomial is
$$
        p(\lambda) = (\lambda -\lambda_{1})^{r_{1}}\cdots(\lambda-\lambda_{k})^{r_{k}},
$$
then the Cayley-Hamilton Theorem gives
$$
              (T-\lambda_{1}I)^{r_{1}}\cdots(T-\lambda_{k})^{r_{k}}=0.
$$
However, beccause $(T-\lambda_{j})^{2}=(T-\lambda_{j})$, then
$$
                    (T-\lambda_{1}I)\cdots(T-\lambda_{k}I) = 0.
$$
That means that the minimal polynomial for $T$ has no repeated factors.
