Searching two matrix A and B, such that exp(A+B)=exp(A)exp(B) but AB is not equal to BA. [duplicate]

Solution 1:

Let $A = \begin{bmatrix}0&6\pi&0\\-6\pi&0&0\\0&0&0\end{bmatrix}$ and $B = \begin{bmatrix}0&0&0\\0&0&8\pi\\0&-8\pi&0\end{bmatrix}$.

Using the formula I derived here, $e^A = e^B = e^{A+B} = I$. Hence, $e^{A+B} = e^Ae^B$.

However, $AB-BA = \begin{bmatrix}0&0&48\pi^2\\0&0&0\\-48\pi^2&0&0\end{bmatrix} \neq 0$, and so, $AB \neq BA$.