How to prove an equality The matrices $A,B,C$ all $2\times 2$ dimensions so: $$A^2 +B^2 +C^2 =AB+BC+CA.$$ 
Prove that $$(A^2 +B^2 +C^2 -BA-CB-AC)^2=O_2$$
Can someone help me with this? Thank you.
 A: Set $X=A-B,Y=B-C$, the condition is equivalent to $X^2+YX+Y^2=0$. Hence $A^2+B^2+C^2-BA-CB-AC=X^2+XY+Y^2=XY-YX$, whose trace is obviously $0$. We will frequently use the following special case of Hamilton-Cayley theorem:  

Let $M$ be a $2\times 2$ matrix, then
  $$M^2=(\operatorname{tr}M)M-(\det M)I$$  

For example, $(XY-YX)^2=-(\det(XY-YX))I$, so we only need to prove that $XY-YX$ is not invertible. Note that $X^2+YX+Y^2=0$ implies
$$0=(X^2+YX+Y^2)X-Y(X^2+YX+Y^2)=X^3-Y^3$$
So $X^3=Y^3$. Then one may obtain
$$X(YX+Y^2)=-X^3=-Y^3=(X^2+YX)Y=Y(X^2+YX)$$
or equivalently
$$(XY-YX)X=Y^2X-XY^2,\hspace{1em}Y(XY-YX)=YX^2-X^2Y$$
Now Hamilton-Cayley implies $Y^2X-XY^2=(\operatorname{tr}Y)(YX-XY)$, so
$$(\det X)\det(XY-YX)=(\operatorname{tr}Y)^2\det(YX-XY)=(\operatorname{tr}Y)^2\det(XY-YX)$$
Similarly,
$$(\det Y)\det(XY-YX)=(\operatorname{tr}X)^2\det(YX-XY)=(\operatorname{tr}X)^2\det(XY-YX)$$
Now we suppose on the contrary that $XY-YX$ is invertible, then $\det(XY-YX)\not=0$, hence $(\operatorname{tr}X)^2=\det Y,(\operatorname{tr}Y)^2=\det X$. But $X^3=Y^3$ implies $\det X=\det Y$, thus
$$(\operatorname{tr}X)^2=(\operatorname{tr}Y)^2=\det X=\det Y$$
Applying Hamilton-Cayley again, we see that $\det X=0$ would result in $X^2=Y^2=0$, hence $XY=0$ and $(XY-YX)^2=(YX)(YX)=Y(XY)X=0$. So we may assume $\det X\not=0$. In that case we have
\begin{align}
X^3=X\cdot X^2 & =X((\operatorname{tr}X)X-(\det X)I) \\
& =(\operatorname{tr}X)X^2-(\det X)X \\
& =(\operatorname{tr}X)((\operatorname{tr}X)X-(\det X)I)-(\det X)X\\
& =-(\operatorname{tr}X)^3I
\end{align}
For the same reason, $Y^3=-(\operatorname{tr}Y)^3I$. Now $X^3=Y^3$ yields $\operatorname{tr} X=\operatorname{tr} Y$. Let $\lambda=\operatorname{tr} X\not=0$. Then $0=X^2+YX+Y^2=\lambda(X+Y)+YX-\lambda^2 I$. On the other hand, $$0=(X^2+YX+Y^2)X=-\lambda^3 I+Y(\lambda X-\lambda^2 I)+(\lambda Y-\lambda^2 I)X=\lambda(2YX-\lambda(X+Y)-\lambda^2I)$$
"Solving" these two equations we get 
$$X+Y=\frac 1 3\lambda I,\hspace{1em} YX=\frac 2 3\lambda^2 I$$
But $\det(YX)=(\det Y)(\det X)=\lambda^4$, while $\det(2\lambda^2I/3)=4\lambda^4/9$, contradiction. Now we're done.
A: Hints. As indicated by another answer here, if you put $X=A-B$ and $Y=B-C$, the given condition becomes $X^2 + YX + Y^2 = 0$ and the hypothesis you want to prove becomes $(XY - YX)^2 = 0$. Since $X$ and $Y$ are $2\times2$, Cayley-Hamilton theorem dictates that $X^2$ is a linear combination of $X$ and $I$ and the analogous holds for $Y^2$. So, it suffices to prove the following proposition:

Proposition. Suppose $X,Y$ are $2\times2$ matrices over any field and $YX=aX+bY+cI$ for some scalars $a,b,c$. Then $XY-YX$ is nilpotent.

Sketch of proof. Let $X'=X-bI$ and $Y'=Y-aI$. Then $XY-YX=X'Y'-Y'X'$ and
$$
Y'X'=(Y-aI)(X-bI)=(ab+c)I.
$$
Now:


*

*If $ab+c\ne0$, what is the relationship between $X'$ and $Y'$?

*if $ab+c=0$, then $Y'X'=0$. Can you calculate $(X'Y'-Y'X')^2$ directly?

