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.