a matrix of rank $r$ satisfies a polynomial of degree $r+1$. Let $M$ be an $n\times n$ matrix with coefficients in $\mathbb C$. Suppose $M$ has rank $r$ with $r<n$. Prove there is a polynomial $P(x)$ with degree $r+1$ and coefficients in $\mathbb C$ such that $P(M)$ is the zero matrix.
I think this has to do with the minimal/characteristic polynomials, although I have not yet seen this in school. I would appreciate a comprehensive solution, hopefully referencing the theorems as they are used.
 A: Small variation of the answer of loup blanc that does not mention minimal polynomials, and produces an actual annihilating polynmial of degree $r+1$. Note that is is irrelevant that the vector space is over$~\Bbb C$.
The image space $W$ of $M$ (or column space if you prefer) has dimension $r$ by definition of the rank. The characteristic polynomial $Q$ of the endomorphism of$~W$ obtained by restriction of $M$ has degree$~r$ (one can compute this polynomial by expressing the restriction as an $r\times r$ matrix on some basis of the image). Then by Cayley-Hamilton, the restriction of $Q[M]$ to $W$ is zero, i.e., $Q[M]$ vanishes on$~W$. Since $W$ is the image of$~M$, this implies that $(QX)[M]=Q[M]\cdot M=0$, and $QX$ is our annihilating polynmial of degree $r+1$.
A: Since $\dim(\ker(M))=n-r$, there is an invertible matrix $P$ s.t. $P^{-1}MP=\begin{pmatrix}0_{n-r}&A\\0&B_r\end{pmatrix}$. Let $P$ be the minimal polynomial of $B_r$; its degree is $\leq r$. Finally, the minimal polynomial of $M$ divides $xP(x)$ and we are done.
