TITLE: On the commutativity of matrices and their exponentials
QUESTION [8 upvotes]: It is fairly easy to see that if $A$ and $B $, real square matrices, commute, then $A $ and $e^B $ commute. In fact,
$$Ae^B = \sum_{n=0}^\infty A\frac{B^n}{n!} = \sum_{n=0}^\infty \frac{B^n}{n!}A = e^BA $$
But is the reverse true as well? If $A $ and $e^B $ commute, do $A $ and $B $ commute as well? If not, can you help me finding a counter-example?
What if both $A $ and $B $ are not constant matrices but matricial functions of $t $?

REPLY [17 votes]: You can cook up nontrivial real matrices $B$ with $\exp(B)=I$, for instance
$$\pmatrix{0&2\pi\\-2\pi&0}.$$
There are matrices $A$ that don't commute with $B$, say
$$A=\pmatrix{1&0\\0&0}.$$
But $A$ commutes with $\exp(B)=I$.