# Can a matrix $A$ commute with $e^B$ without commuting with $B$?

As in the title. Is it possible that $$[A,B]\neq0$$, but $$[A,e^B]=0$$? I tried expanding the exponential and using $$[A,B^n]=\sum_k {n\choose k} B^{n-k}[A,B]B^k$$ but this doesn't seem to give any insight.

I'm inclined to think the answer is yes, because a sum of terms being $$0$$ is a weaker requirement than each term being $$0$$, but I was wondering if there's a clearer way to see it.

EDIT: in light of lisyarus' answer, what if the matrices in question are hermitian and have real eigenvalues?

• Another way of putting it: $A,B$ commutes means $A$ has to commute with the entire one-parameter subgroup $\exp(tB)$ generated by $B$. Commuting with just a discrete subgroup of this one-parameter is a much weaker requirement, especially when there are multiple one-parameter subgroups that contain this discrete subgroup. – user10354138 May 19 at 10:40
• Is your formula for $[A,B^k]$ correct as stated? Think you’ve got some indices mixed up – Adam Higgins May 19 at 13:22
• @AdamHiggins Thank you, edited, I had mixed up my $n$ and $k$. Now it should be correct assuming I can still do induction – user438666 May 19 at 13:29

Yes, this can happen.

Take $$B$$ to be diagonal, with entries $$2\pi i k$$ with different $$k$$ (so that $$B$$ is not a scalar matrix). Then, $$\exp B = 1$$, so it commutes with anything.

Now, since $$B$$ is not a scalar matrix, there is some $$A$$ that doesn't commute with $$B$$.

• yep, so more examples in the same vein here math.stackexchange.com/questions/349180/… – zwim May 19 at 10:05
• Interesting, thank you. What if $A$ and $B$ are hermitian, hence the eigenvalues are real? – user438666 May 19 at 12:02

Referring to your question in the comment to @lisyarus, if $$A,B$$ are hermitian then $$\left[A,e^{B}\right]=0\Longrightarrow\left[A,B\right]=0$$.

To see this, observe that two hermitian matrices commute iff they can be simultaneously diagonalized. Thus, if $$\left[A,e^{B}\right]=0$$ there exist a unitarian $$U$$ such that both $$U^{\dagger}AU$$ and $$U^{\dagger}e^{B}U$$ are diagonal. Now

$$U^{\dagger}BU=U^{\dagger}\ln e^{B}U=\ln\left(U^{\dagger}e^{B}U\right)$$

is also diagonal and therefore $$\left[A,B\right]=0$$. Note that indeed

$$B=\ln e^{B}$$

since in the diagonal basis this translates to $$\lambda_{i}=\ln e^{\lambda_{i}}$$ where $$\lambda_{i}$$ are the real eigenvalues. This fails for non-hermitian matrices because in that case $$\ln$$ is multivalued and not injective.