TITLE: Show that $(AB-BA)^2=O_2$
QUESTION [9 upvotes]: Let $A,B$ be two $2 \times 2 $ matrices with real elements and $a,b \in \Bbb R$ such that $a^2 \ne b^2$ and $A(A-aB)+B(B-bA)=O_2$. Show that $(AB-BA)^2=O_2.$
MY TRY: Using Hamilton-Cayley Theorem, the problem reduces to showing that $\det (AB-BA)=0$ because the trace of $AB-BA=0$. This is where I am stuck.

REPLY [7 votes]: I’ll assume that $O_2$ denotes the zero $2\times 2$ matrix.

$a^2 \ne b^2$

We shall need only an assumption $a\ne b$.
Let $J$ be a Jordan canonical form of the matrix $A$. There exists a non-singular matrix $T$ such that $J=T^{-1}AT$. Put $H=T^{-1}BT$. Applying conjugation by $T$ to the given expressions we obtain 
$$O_2=T^{-1}O_2T=T^{-1}(A(A-aB)+B(B-bA))T=$$ 
$$ = T^{-1}A(A-aB)T + T^{-1}B(B-bA)T=$$
$$= T^{-1}ATT^{-1}(A-aB)T + T^{-1}BTT^{-1}(B-bA)T=$$
$$= T^{-1}AT(T^{-1}AT-aT^{-1}BT) + T^{-1}BT(T^{-1}BT-bT^{-1}AT)=$$
$$J(J-aH)+H(H-bJ)=$$ $$J^2-aJH-bHJ+H^2.$$
and 
$$T^{-1}(AB-BA)^2T=(JH-HJ)^2.$$
So it suffices to show that $$(JH-HJ)^2=O_2.$$
Let $$H=\begin{pmatrix} h_{11} & h_{12} \\ h_{21} & h_{22}\end{pmatrix}.$$ Then
$$H^2=\begin{pmatrix} h_{11}h_{11}+h_{12}h_{21} & 
h_{11}h_{12}+h_{12}h_{22} \\ h_{11}h_{21}+h_{21}h_{22} & h_{12}h_{21}+h_{22}h_{22}\end{pmatrix}.$$
The following cases are possible for $J$. 
Case 1. 
$$J=\begin{pmatrix} \lambda_{1} & 0 \\ 0 & \lambda_{2}\end{pmatrix}.$$ Then 
$$J^2=\begin{pmatrix} \lambda_{1}^2 & 0 \\ 0 & \lambda_{2}^2\end{pmatrix},\,
JH=\begin{pmatrix} \lambda_1 h_{11} & \lambda_1 h_{12} \\ \lambda_2 h_{21} & \lambda_2 h_{22}\end{pmatrix},\mbox{ and }  
HJ=\begin{pmatrix} \lambda_1 h_{11} & \lambda_2 h_{12} \\ \lambda_1 h_{21} & \lambda_2 h_{22}\end{pmatrix}.$$
Thus $$JH-HJ=(\lambda_1-\lambda_2)\begin{pmatrix} 0 & h_{12} \\ 
- h_{21}& 0\end{pmatrix}.$$
and $$O_2=J^2-aJH-bHJ+H^2=$$
$$\begin{pmatrix}\lambda_1^2-a\lambda_1h_{11}-b\lambda_1h_{11}+ h_{11}h_{11}+h_{12}h_{21} &
-a\lambda_1h_{12}-b\lambda_2h_{12}+ h_{11}h_{12}+h_{12}h_{22} \\
-a\lambda_2h_{21}-b\lambda_1h_{21}+ h_{11}h_{21}+h_{21}h_{22} &
\lambda_2^2-a\lambda_2h_{22}-b\lambda_2h_{22}+ h_{12}h_{21}+h_{22}h_{22}
\end{pmatrix}.$$ 
In particular $h_{12}(-a\lambda_1-b\lambda_2+ h_{11}+h_{22})$ and
$h_{21}(-a\lambda_2-b\lambda_1+ h_{11}+h_{22})$
are zeros. On the other hand, 
$(JH-HJ)^2=O_2$ provided one of the numbers $\lambda_1-\lambda_2$, $h_{12}$, and $h_{21}$ is zero. But if none of them is zero then 
$$-a\lambda_1-b\lambda_2+ h_{11}+h_{22}=0$$ and 
$$-a\lambda_2-b\lambda_1+ h_{11}+h_{22}=0.$$ Thus 
$$-a\lambda_1-b\lambda_2=-a\lambda_2-b\lambda_1,$$ or  
$$b(\lambda_1-\lambda_2)=a(\lambda_1-\lambda_2),$$
a contradiction.
Case 2. 
$$J=\begin{pmatrix} \lambda & 1 \\ 0 & \lambda\end{pmatrix}.$$ Then 
$$J^2=\begin{pmatrix} \lambda^2 & 2\lambda \\ 0  &\lambda^2\end{pmatrix},\,
JH=\lambda H+ \begin{pmatrix} h_{21} & h_{22} \\ 0 & 0\end{pmatrix},\mbox{ and }  
HJ=\lambda H+ \begin{pmatrix} 0 & h_{12} \\ 0 & h_{21}\end{pmatrix}.$$
Thus $$JH-HJ=\begin{pmatrix} h_{21} & h_{22}-h_{12} \\ 
0& -h_{21}\end{pmatrix}.$$
and $$O_2=J^2-aJH-bHJ+H^2=$$
$$\begin{pmatrix}\lambda^2-(a+b)\lambda h_{11}-ah_{21}+ h_{11}h_{11}+h_{12}h_{21} & 2\lambda-(a+b)\lambda h_{12}-ah_{22}-bh_{12}+ h_{11}h_{12}+h_{12}h_{22} \\
-(a+b)\lambda h_{21}+ h_{11}h_{21}+h_{21}h_{22} &
\lambda^2-(a+b)\lambda h_{22}-bh_{21}+ h_{12}h_{21}+h_{22}h_{22}
\end{pmatrix}.$$
In particular $h_{21}(-(a+b)\lambda + h_{11}+h_{22})$ is zero. On the other hand, it is easy to check that $(JH-HJ)^2=O_2$ iff $h_{21}$ is zero. But $h_{21}$ is not zero then 
$$(a+b)\lambda=h_{11}+h_{22}.$$
Thus $$O_2=\begin{pmatrix}\lambda^2-ah_{21}+ h_{12}h_{21}-h_{11}h_{22} & * \\
0 &
\lambda^2-bh_{21}+ h_{12}h_{21}-h_{11}h_{22}
\end{pmatrix},$$
and hence $a=b$, a contradiction.