If $e^A$ and $e^B$ commute, do $A$ and $B$ commute?

Solution 1:

No. Let $$A=\begin{pmatrix}2\pi i&0\\0&0\end{pmatrix}$$ and note that $e^A=I$. Let $B$ be any matrix that does not commute with $A$.

Solution 2:

Here's an example over $\mathbb{R}$, modeled after Harald's answer: let $$A=\pmatrix{0&-2\pi\\ 2\pi&0}.$$ Again, $e^A=I$. Now choose any $B$ that doesn't commute with $A$.