Given a diagonalizable matrix $A$ and polynomial $f$, prove $f(A)$ is diagonalizable I have been given a diagonalizable matrix $A \in K^{n
\times n}$ and a polynomial $f \in K[X]$ for a field $K$. I need to prove that $f(A)$ is diagonalizable. Because the matrix $A$ is a arbitrary matrix, it follows: 
$$A = \left(\begin{array}{cccc}
a_{11} & a_{12} & \cdots & a_{1n}\\
a_{21} & a_{22} & \cdots & a_{2n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{n1} & a_{n2} & \cdots & a_{nn}
\end{array}\right) \in K^{n
\times n} \, for \, a_1,\dots,a_n \in K.$$
Assuming that $f$ is a normalized polynomial, it follows:
$$f = X^n + a_{n-1}X^{n-1} + \dots + a_1X + a_0$$
My first idea was to simply insert the given the matrix $A$ in the polynomial $f$ which results in the following:
$$f(A) = \left(\begin{array}{cccc}
a_{11} & a_{12} & \cdots & a_{1n}\\
a_{21} & a_{22} & \cdots & a_{2n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{n1} & a_{n2} & \cdots & a_{nn}
\end{array}\right)^n + a_{n-1}
\left(\begin{array}{cccc}
a_{11} & a_{12} & \cdots & a_{1n}\\
a_{21} & a_{22} & \cdots & a_{2n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{n1} & a_{n2} & \cdots & a_{nn}
\end{array}\right)^{n-1} + \dots + 
a_1\left(\begin{array}{cccc}
a_{11} & a_{12} & \cdots & a_{1n}\\
a_{21} & a_{22} & \cdots & a_{2n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{n1} & a_{n2} & \cdots & a_{nn}
\end{array}\right)^1 + a_0
\left(\begin{array}{cccc}
1 & 0 & \cdots & 0\\
0 & 1 & \cdots & 0\\
\vdots & \vdots & \ddots & \vdots\\
0 & 0 & \cdots & 1
\end{array}\right)$$
I know that in order to determine the matrix $A^n$ I can use the following:
$$A^n = TB^nT^{-1} \text{$\,$ where B is a diagonal matrix}.$$
I know such matrix $B$ exists because matrix $A$ is diagonalizable, so $A$ is similar to a diagonal matrix. I don't know if this is the right approach because from this point on I am stuck. 
 A: I think you can do it as this. Let
$$f(X) = X^n + a_{n-1}X^{n-1} + \cdots +a_1 X + a_0, \quad \in K[X]$$
be your polynomial and let $A$ diagonalize as
$$A = TBT^{-1}.$$
Then you have
\begin{align*}
f(A) &=A^n + a_{n-1}A^{n-1} + \cdots + a_1A + a_0I \\
&=TB^nT^{-1} + a_{n-1}TB^{n-1}T^{-1} + \cdots + a_1 TBT^{-1} + a_0 I \\
&=T \left(B^nT^{-1} + a_{n-1}B^{n-1}T^{-1} + \cdots + a_1 BT^{-1} + a_0 T^{-1} \right) \\
&=T \left(B^n + a_{n-1}B^{n-1} + \cdots + a_1 B + a_0 I \right)T^{-1}
\end{align*}
where we use the property, that for scalars $\lambda \in K$ and Matrices $A,B$, 
$$\lambda (AB) = (\lambda A)B = A(\lambda B)$$
Now we have to show, that the matrix $B^n + a_{n-1}B^{n-1} + \cdots + a_1 B + a_0 I$is a diagonal one. Let $\lambda_1,\dots, \lambda_n$  be the different eigenvalues, then
$$B^i = \begin{pmatrix} \lambda_1^i &0 &0 &\cdots &0 \\ 0 &\lambda_2^i& 0 &\cdots &0 \\ 0 &0&\lambda_3^i &\cdots &0\\\vdots&&&\ddots\\0&0&0&\cdots & \lambda_n^i\end{pmatrix},\quad \text{ for } 1 \le i \le n.$$
Since the sum of diagonal matrices is diagonal, and multiplication by scalar gives also a diagonal matrix, it should be fine.
A: You observed that $T B^n T^{-1} = A$ for some diagonal matrix $B$, and we know $f(A)$ is simply going to be some linear combinations of the powers of $A$. Let $f(A) = a_0 I + a_1 A + a_2 A^2 + \cdots + a_n A^n$. What can we say about each of the individual terms? 
We can actually rewrite $$f(A) = a_0 TT^{-1} + a_1 T B T^{-1} + \cdots + T B^n T^{-1} = T(a_0 I + a_1 B + \cdots + a_n B^n) T^{-1} = T f(B) T^{-1}$$ Aha! so $f(A)$ is similar to the matrix $f(B)$. Now we know that, if $f(B)$ is a diagonal matrix, then we will have shown that $f(A)$ is diagonalizable (by definition, since it will be similar to a diagonal matrix). Can you explain why $f(B)$ is necessarily a diagonal matrix? Hint: $B$ is a diagonal matrix.
A: You were certainly on the right track. Also, there is no need to assume that the polynomial $f(x)$ is monic. To prove the question, write the polynomial $f(x) \in K[x]$ as 
\begin{equation}
f(x) = \sum_{i=0}^r a_ix^i
\end{equation}
Since $A$ is diagonalizable by assumption, there is an invertible matrix $T$ and a diagonal matrix $B$ such that
\begin{equation}
A = TBT^{-1}
\end{equation}
So, we have that
\begin{align}
f(A) &:= \sum_{i=0}^ra_iA^i \\
&= \sum_{i=0}^ra_i (TBT^{-1})^i \\
&= \sum_{i=0}^r T\cdot (a_iB^i)\cdot T^{-1} \\
&= T \cdot \left( \sum_{i=0}^ra_iB^i \right) \cdot T^{-1} \\
&:= T \cdot f(B) \cdot T^{-1}
\end{align}
(I leave it to you to see why each equal sign above is valid.)
Since $B$ is diagonal, it is easy to verify that powers of $B$ are diagonal; it follows that $f(B)$ is a diagonal matrix. This shows that $f(A)$ is similar to $f(B)$, and hence is diagonalizable.
