# Simultaneous diagonalizability and matrix polynomial

I know that two matrices commute ($AB = BA$) if they are simultaneously diagonalizable.

I also know that they commute if B is a polynomial of A ( $B = \sum_{k=0}^na_kA^{k+1}$).

What I do not know is whether these two statements mean the same thing (and if so how can it be proved).

• No. They don't mean the same thing. The second statement is essentially trivial. Whereas, the first statement is stating something more general. – Jacky Chong Oct 4 '16 at 8:39
• @JackyChong Thank you. Am I right with thinking that 2) is a subset of 1)? Also does this mean that if B is a polynomial of A, then A and B are simultaneously diagonalizable? – Salvador Dali Oct 4 '16 at 8:42

As pointed out, there are many simultaneously diagonalizable matrices such that neither is a polynomial of the other. One example that comes to mind is $$A = \begin{bmatrix}1 & 0 & 0\\0 &1 & 0 \\0 & 0 & 2 \end{bmatrix},\quad \begin{bmatrix}1 & 0 & 0\\0 &2 & 0 \\0 & 0 & 2\end{bmatrix}$$ since no polynomial in $A$ can make the topmost two diagonal entries unequal, and no polynomial in $B$ can make the bottommost two diagonal entries unequal.
However, if one matrix is a polynomial of the other, say $$B = a_nA^n + \cdots + a_1A + a_0I$$ and $A$ is diagonalisable (say $A = PDP^{-1}$, with $D$ diagonal), then $$B = a_n(PDP^{-1})^n + \cdots + a_1PDP^{-1} + a_0I \\ = a_nPD^nP^{-1} + \cdots + a_1PDP^{-1} + a_0PIP^{-1}\\ = P(a_nD^n + \cdots + a_1D + a_0I)P^{-1} = PEP^{-1}$$ where $E = a_nD^n + \cdots + a_1D + a_0I$ is diagonal. So $A$ and $B$ are simultaneously diagonalisable.