Suppose $A \in M_n$ has distinct eigenvalues $a_1,\dots,a_n$ and that $A$ commutes with a given matrix $B \in M_n$ so that $AB=BA$.
a. Prove A and B are simultaneously diagonalizable
I was able to show that $B$ is diagonalizable but I cannot figure out how to show that $A$ and $B$ are simultaneously diagonalizable.