Minimal polynomial of a diagonal matrix

How can I show that the minimal polynomial of a diagonal matrix is the product of the distinct linear factors $(A-\lambda_{j}I)$? In particular, if we have a repeated eigenvalue, why is it that we only count the factor associated with that eigenvalue once?

I know by the Cayley Hamilton theorem that the characteristic polynomial $p(t)$, i.e. the product of all the linear factors, not necessarily distinct, yields $p(A) = 0$. But I'm uncertain how this can be simplified for diagonal matrices when there is a repeated eigenvalue.

• Maybe the example of a scalar matrix $A = \lambda{}I$ will enlighten you : what would $A-\lambda{}I$ be ? – Traklon Jan 30 '14 at 8:50
• Hint: when a polynomial has multiple roots, after removing the repeated factors, the roots remain the same. E.g. any root of $(x-1)^3(x+3)$ is a root of $(x-1)(x+3)$. – user65203 Jun 24 '15 at 7:01

$$\begin{pmatrix}D_m&0&0\\0&\color{red}0&0\\0&0&D_{n-m-1}\end{pmatrix}\cdot D'_n=\begin{pmatrix}D''_m&0&0\\0&\color{red}0&0\\0&0&D''_{n-m-1}\end{pmatrix}$$ Where $D_i$ are any diagonal matrices of dimension $i$
• Since the eigenvalues of a diagonal matrix are the elements of the diagonal, you have that for any eigenvalue $\lambda$, $A-\lambda I$ will set to zero exactly all diagonal terms $a_{ii}$with are equal to $\lambda$. Now you multiply $A-\lambda I$ by any diagonal matrix $B$ and you will still have that the $c_{ii}$ term of $(A-\lambda I)B$ will be equal to zero, hence doing this once for all eigenvalues leads to the null-matrix – b00n heT Jan 30 '14 at 9:30