Let $M$ be a nondiagonalizable matrix with entries in $\mathbb{C}$. Suppose that $M^n$ is diagonalizable for some positive integer $n$. Prove that $\det(M) = 0$.
I'm not quite sure how to approach this problem. It seems to me that it would be most useful to show that $M$ must have 0 as an eigenvalue, but I'm not quite sure how to do that. It seems to me that $M$ must be nilpotent, such that when it annihilates it is trivially diagonal.