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.