# Show that if $A$ is an $n \times n$ matrix that commutes with $B$

Suppose that $A$ is an $n\times n$ matrix with distinct eigenvalues. And suppose $B$ commutes with $A$. Show that $B$ is diagonable; i.e., show that $B$ is similar to a diagonal matrix.

I get that $AB=BA$ and that some diagonal matrix $D$ that is similar to $B$ is $D=SBS^{-1}$ and that $S$ is composed of the eigenvecotrs of $B$ I just don't know what to do from their.

• Hint: "Simultaneously diagonalisable" Nov 18 '14 at 22:13

Hint: if $Ax = ax, a$ scalar, then $$a Bx = B(ax) = B(Ax) = BAx= ABx$$ and you know that the subspace $$\{y: Ay = ay\}$$is a line...
• If I wanted to be difficult, I could point out that the matrices might not be over $\Bbb C$. But the hint is sound. Nov 18 '14 at 22:18
• @Arthur $\Bbb C$ can be replaced by any field. Nov 18 '14 at 22:19
The big theorem is that, for a square matrix $A$ for which each eigenvalue occurs in only one Jordan block, all matrices that commute with $A$ can be written as polynomials in $A.$ This includes matrices with distinct eigenvalues, as each Jordan block is one by one. So $$B = b_0 I + b_1 A + b_2 A^2 + \cdots + b_{n-1} A^{n-1}.$$ You do not need higher degree because of Cayley-Hamilton.
Oh, $A$ itself is diagonalizable because of the distinct eigenvalues. Some $P^{-1}A P = E$ diagonal. What can you say about $P^{-1}B P ?$