TITLE: A weak converse of $AB=BA\implies e^Ae^B=e^Be^A$ from "Topics in Matrix Analysis" for matrices of algebraic numbers.
QUESTION [18 upvotes]: It is a well known fact that if $A,B\in M_{n\times n}(\mathbb C)$ and $AB=BA$, then $e^Ae^B=e^Be^A.$
The converse does not hold. Horn and Johnson give the following example in their Topics in Matrix Analysis (page 435). Let $$A=\begin{pmatrix}0&0\\0&2\pi i\end{pmatrix},\qquad B=\begin{pmatrix}0&1\\0&2\pi i\end{pmatrix}.$$ Then $$AB=\begin{pmatrix}0&0\\0&-4\pi^2\end{pmatrix}\neq\begin{pmatrix}0&2\pi i\\0&-4\pi^2\end{pmatrix}=BA.$$ We have $$e^A=\sum_{k=0}^{\infty}\frac 1{k!}\begin{pmatrix}0&0\\0&2\pi i\end{pmatrix}^k=\sum_{k=0}^{\infty}\frac 1{k!}\begin{pmatrix}0^k&0\\0&(2\pi i)^k\end{pmatrix}=\begin{pmatrix}e^0&0\\0&e^{2\pi i}\end{pmatrix}=\begin{pmatrix}1&0\\0&1\end{pmatrix}.$$ 
For $S=\begin{pmatrix}1&-\frac i{2\pi}\\0&1 \end{pmatrix},$ we have $$e^B=e^{SAS^{-1}}=Se^AS^{-1}=S\begin{pmatrix}1&0\\0&1\end{pmatrix}S^{-1}=\begin{pmatrix}1&0\\0&1\end{pmatrix}.$$ 
Therefore, $A,B$ are such non-commuting matrices that $e^Ae^B=\begin{pmatrix}1&0\\0&1\end{pmatrix}=e^Be^A.$
It is clear that $\pi$ is important in this particular example. In fact, the authors say what follows. 

It is known that if all entries of $A,B\in M_n$ are algebraic numbers and $n\geq 2,$ then $e^A\cdot e^B=e^B\cdot e^A$ if and only if $AB=BA.$

No proof is given. How does one go about proving that?

REPLY [2 votes]: A broad-brush approach is as follows. We want to prove that if $e^A$ and $A$ have the same number of eigenvalues, then $e^A$ is a polynomial in $A$.  This is true for diagonal matrices and hence for diagonalizable matrices. Since the diagonalizable matrices are dense, it is true for all matrices.
We can avoid the density argument though. Any square matrix $A$ can be written in
exactly one way as $A=S+N$ where $S$ and $N$ are polynomials in $A$ and $S$ is diagonalizable and $N$ is nilpotent. Using the series expansion for $e^A$ we find that
$$
e^A = e^D(I+N+\cdots+N^{k-1}) = e^D + M
$$
with $M=e^D(N+\cdots+N^{k-1})$. Note that $M^k=0$. As $e^D$ and $M$ are polynomials in $A$ and $N$, they are polynomials in $A$; they are also the diagonalizable and nilpotent parts in the decomposition of $e^A$.
Now suppose $e^A$ and $e^B$ commute. Using the above we have
$$
e^A = e^{D_A}+M_A,\quad e^B = e^{D_B}+M_B.
$$ 
Then any two of the six matrices here commute (because the first three matrices are polynomials in $e^A$ and the second three polynomials in $e^B$) and therefore $e^{D_A}$ and $e^{D_B}$ commute. Since $e^A=e^{D_A}(I-N_A)^{-1}$ etc we see that that 
$(I-N_A)^{-1}$ and $(I-N_B)^{-1}$ commute, which implies that $N_A$ and $N_B$ commute. So if $D_A$ and $D_B$ are polynomials in $e^{D_A}$ and $e^{D_B}$ respectively, then $AB=BA$. As $D_A$ and $D_B$ are diagonalizable, we are OK
provided the number of distinct eigenvalue of $e^{D_A}$ is equal to the number of distinct eigenvalues of $D_A$ (and ditto for $e^{D_B}$ and $D_B$).