For my linear algebra homework, I need to prove that if $T$ is a diagonalizable linear map and $T^3=T^2$, then $T^2=T$. I tried proving that $T$ is invertible (so that I can multiply both sides of $T^3=T^2$ by $T^{-1}$, but apparently diagonalizability does not imply invertibility (see Can a matrix be invertible but not diagonalizable? in the comment section of the first answer).
Could you help me?
If $T$ is diagonalizable, then you have a diagonal matrix $D$ and an invertible matrix $P$ such that $T=PDP^{-1}$.
Now you have $$T^3=T^2$$ $$PDP^{-1}PDP^{-1}PDP^{-1}=PDP^{-1}PDP^{-1}$$
$$PD^3P^{-1}=PD^2P^{-1}%$$ $$D^3=D^2$$
Now, you can't just apply $D^{-1}$ as that might not exist, but what is the formula entrancewise for $D^n$? from that you should be able to conclude what $D$ has to look like and finish