If we have square matrices $A$ and $B$ that commute (i.e. $AB=BA$), then we have $e^{A+B} = e^Ae^B$. In general this isn't true without the condition that $A$ and $B$ commute. I would like to know if this is "if and only if", or whether $A$ commuting with $B$ is just a necessary condition.
In other words, do there exist square matrices $A$ and $B$ such that $AB\ne BA$ but $e^{A+B} = e^A e^B$?
Not that it really matters because this question already got a very good answer, but I don't think this should be considered a duplicate of Does $e^{a+b}=e^{a}e^{b}$ implies that $ab=ba$ for banach algebras?, because that question is about Banach algebras whereas mine is only about ordinary finite-dimensional matrices.
Neither is it a duplicate of If $e^A$ and $e^B$ commute, do $A$ and $B$ commute for finite dimensional matrices? (of which Does $e^{a+b}=e^{a}e^{b}$ implies that $ab=ba$ for banach algebras? itself is closed as a duplicate), because that is clearly just a different question.