Let $A$ be an $n \times n$ diagonalizable matrix; let $g(x)$ be a polynomial.
Is $g(A)$ diagonalizable?
If not, what are the minimum hypothesis one needs to make so that it works (if any?)
(As additional hypothesis I mean, for example, that all eigenvalues of $A$ are distinct, or that the degree of $g$ is $< n$, or something similar)
Proof following @Martin Brandenburg's answer
If $A$ is diagonalizable, then exists $S$ such that $S^{-1}AS = D$, with $D$ a diagonal matrix. Then applying $g$ to both sides we get $$S^{-1}g(A)S = g(D)$$ and we know that $g(D)$ is diagonal, hence $g(A)$ is diagonalizable.
This implies by the way the the same matrix $S$ also diagonalize $g(A)$
Yes. Use (and prove if not already known) the following: