Let $\mathbb{K}$ be a field and $f \in \mathbb{K}[X]$ a polynomial over $\mathbb{K}$. Let $A \in \mathbb{K}^{n \times n}$ be a diagonalizable matrix. Show that $f(A)$ is also diagonalizable.
I hope you can help me, I have problems with showing something in general without examples.
Since $A$ is diagonalizable, there exists a diagonal matrix $D$ and an invertible matrix $S$ such that $D=SAS^{-1}$. If we write out $f(x)=c_nx^n+...+c_1x+c_0$, then what happens if we multiply the matrix $f(A)$ on the left by $S$ and on the right by $S^{-1}$? You might find the fact that $(SAS^{-1})^k=SA^kS^{-1}$ to be helpful.