# If $AB=BA$ and $BC=CB$ then $AC=CA$

Let $$A, B, C \in M_n(\mathbb{C})$$. Is it true that if $$AB=BA$$ and $$BC=CB$$ then $$AC=CA$$ in general? I could find an example in $$M_2(\mathbb{C} )$$,but I don't know how to approach the general case.

• If $B$ is the null matrix… Apr 4, 2019 at 6:42

No it's not true in general. Just set $$B$$ to be the identity matrix and $$A$$ and $$C$$ to be not equal and not the identity matrix.

• $A$ and $C$ not equal and not the identity matrix does not guarantee that $AC \neq CA$. Apr 4, 2019 at 7:37
• I know, but given that $A \neq I$, $C \neq I$ and $A \neq C$ it is pretty simple to come up with a counter example Apr 4, 2019 at 7:39

If $$B=I$$ then $$AB=BA$$ and $$BC=CB$$ for any two matrices $$A$$ and $$C$$. There is no reason why $$AC=CA$$. For a specific counterexample let $$A$$ have $$(0,1)$$ in both the rows and let $$C$$ have the rows $$(1,0), (0,0)$$.

Need not be true. For example, take $$B$$ to be the identity matrix and $$A$$ and $$C$$ to be two non-commutative matrices.

As matrix $$B$$ appears in both the conditions you can formulate your question in a $$B$$-centric way (pun intended!). That is, if two matrices $$A,C$$ commute with $$B$$, do they commute with each other? (One can ask this question in any non-abelian group)

So it boils down to checking if the centralizer of a subgroup is an abelian group. (Or centralizer in an algebra is a commutative subalgebra).

Zero matrix and identity matrix commute with everything else; but in general two martices don't commute giving the answer you are looking for. Any scalar matrix taken as $$B$$ will provide counter-exmaples.

Let $$A$$ be an abelian group and $$G$$ be a non-abelian group. Pick two elements $$g,h\in G$$ such that $$gh\ne hg$$.

In $$A\times G$$, the element $$(e,g)$$ commutes with $$(a,e)$$. Same way $$(e, h)$$ commutes with $$(a,e)$$. However $$(e,g),\ (e,h)$$ don't commute with each other.

In general, this is not true. However, if all eigenvalues of A are distinct with distinct eigenvectors (s.t they form a basis), B will share the same eigenvectors (and therefore the same eigenbasis, spanning all of space). Now, if we apply the same to B, with all it's eigenvalues being distinct, then B and C share the same eigenbasis. Thus, A and C share the same eigenbasis. This is equivalent to A and C commuting.

$$AB = BA \iff A = PD_AP^{-1},\;B = PD_BP^{-1}$$.

$$BC = CB \iff B = PD_BP^{-1},\;C = PD_CP^{-1}$$.

If $$A\vec{v_i}=\lambda_i\vec{v}_i$$, $$A(B\vec{v}_i) = BA\vec{v_i} = \lambda_i(B\vec{v}_i)$$

and thus, $$B\vec{v_i}$$ lies in the eigenspace of A corresponding to $$\lambda_i$$. If all $$\lambda_i$$ are distinct, every eigenspace corresponding to one eigenvalue $$\lambda_i$$ of A has dimension 1. This means that $$B\vec{v}_i = \mu_i\vec{v}_i$$. Thus is every eigenvector of A also an eigenvector of B. Doing this once more, assuming every $$\mu_i$$ are distinct, we get that every eigenvector of B is an eigenvector of C. Thus, every eigenvector of A is an eigenvector of C. This means that we can write

$$C = PD_CP^{-1}$$, and since $$A = PD_AP^{-1}$$ we would have that $$AC = CA$$.

This is probably not the only solution, but is used in quantum mechanics to deduce commutation relations of hermitian operators.