# How to show that $A^2=AB+BA$ implies $\det(AB-BA)=0$ for $3\times3$ matrices?

Let $$A$$ and $$B$$ be two $$3\times 3$$ matrices with complex entries such that $$A^2=AB+BA$$. Prove that $$\det(AB-BA)=0$$.

(Is the above result true for matrices with real entries?)

• What reason do you have to believe that this holds? Do you have an nontrivial example? Jan 26, 2015 at 15:08
• As a remark, counterexamples exist when the sizes of $A$ and $B$ are even. E.g. when $A=\pmatrix{1&-1\\ 0&-1}$ and $B=\pmatrix{1&0\\ 1&-1}$, we have $A^2=AB+BA=I$ but the determinant of $AB-BA=\pmatrix{-1&2\\ -2&1}$ is $3\ne0$. Jan 26, 2015 at 16:39

Let $$A,B\in F^{n,n}$$, $$F$$ any field of characteristic $$\ne 2$$, $$n$$ odd. Assume they satisfy $$A^2 = AB+BA$$.

From $$A^2=AB+BA$$ it follows $$AB-BA= A^2-2BA= (A-2B)A.$$ Then it holds $$\det(AB-BA) = \det((A-2B)A) = \det(A(A-2B)).$$ Now we have $$A(A-2B) = A^2-2AB = BA-AB.$$ This proves $$\det(AB-BA) = \det(BA-AB) = \det( -(AB-BA)) = (-1)^n \det(AB-BA),$$ and since $$n$$ is odd (and $$1+1\ne0$$), $$\det(AB-BA)=0$$ follows.

If the field has characteristic 2 then the result is true as well: In this case $$AB-BA=AB+BA=A^2$$. Suppose $$A$$ is invertible. Then the assumption $$A^2=AB+BA$$ implies $$I_3=BA^{-1}+A^{-1}B$$. The trace of the matrix on the left is $$1$$, the trace of the matrix on the right is $$tr(BA^{-1}+A^{-1}B)=tr(BA^{-1})+tr(BA^{-1})=0$$, contradiction. So $$A$$ cannot be invertible, and $$\det(AB-BA)=\det(A^2)=0$$.

• In a field of characteristic two, the last step fails. Indeed, from $D = -D$, we get $2 \, D = 0$ and this is not enough to conclude $D = 0$.
– gerw
Nov 2, 2020 at 13:44
• @gerw thanks for the hint. In fact, the claim is also true in this case (with a different and simplier proof)
– daw
Nov 2, 2020 at 15:01

This was easier than I originally thought. Note that $$AB - BA = AB + BA - 2BA = A^2 - 2BA = (A-2B)A\\ -(AB - BA) = AB + BA - 2AB= A^2 - 2AB = A(A - 2B)$$ and that we have both $\det(AB - BA) = \det(-(AB - BA))$ and $\det(AB - BA) = -\det(-(AB - BA))$.

My original approach: note that $AB - BA$ has trace zero. Then, we note that $$AB - BA = AB + BA - 2BA = A^2 - 2BA = (A-2B)A\\ -(AB - BA) = AB + BA - 2AB= A^2 - 2AB = A(A - 2B)$$ From there, we note by Sylvester's determinant theorem that $$\det(AB - BA - \lambda I)= \\ \det((A - 2B)A - \lambda I) =\\ \det(A(A - 2B) - \lambda I) =\\ \det(-(AB - BA) - \lambda I) =\\ (-1)^3 \det(AB - BA + \lambda I)$$ So, if $\lambda$ is an eigenvalue of $AB - BA$, then so is $-\lambda$. (Alternatively, directly note that $(A - 2B)A$ and $A(A - 2B)$ must have the same eigenvalues).

Thus, we know that $AB - BA$ has $3$ eigenvalues whose sum is zero and such that $\lambda$ is an eigenvalue iff $-\lambda$ is an eigenvalue. We conclude that $AB - BA$ must have $0$ among its eigenvalues. That is, $\det(AB - BA - 0I) = \det(AB - BA) = 0$.