# $2\times 2$ matrix $C=AB-BA$

Let $C=\begin{pmatrix}c_{11}& c_{12} \\ c_{21} & c_{22}\end{pmatrix}$ be a $2 \times 2$ matrix. Show that there exist matrices $A$ and $B$ such that $C=AB-BA$ if and only if $c_{11}+c_{22}=0$.

I could show that if such matrices exist, then the trace of the matrix $C$ is equal to zero, I did it by hand, just adding up the entries of the diagonal of the matrix $AB-BA$.

I could not prove the other implication. Suppose that $c_{11}+c_{22}=0$, then $c_{22}=-c_{11}$ so $C$ is of the form $C=\begin{pmatrix}c_{11}& c_{12} \\ c_{21} & -c_{11}\end{pmatrix}$.

I've tried to find matrices $A$ and $B$ using this condition. If $$A=\begin{pmatrix}a& b \\ c & d\end{pmatrix},B=\begin{pmatrix}e& f\\ g & h\end{pmatrix},$$ then $$AB-BA=\begin{pmatrix}bg-cf& b(h-e)+f(a-d) \\ c(e-h)+g(d-a) & cf-bg\end{pmatrix}$$

I got stuck trying to find the values of each entry, any help would be appreciated.

• In general, you can show that $\mathrm{tr}(AB)=\mathrm{tr}(BA)$ in $n\times n$ matrices, for what it is worth. Jan 3, 2015 at 21:11
• I'd note first that you can assume $c_{11}=1$ or $c_{11}=0$, since you can scale $AB-BA$ by a scalar easily. Jan 3, 2015 at 21:15

Well, you can set $a=c=e=f=0$ and $g=1$, then your matrix becomes $$AB-BA=\begin{pmatrix}b& bh \\ d & -b\end{pmatrix}$$ Now it's easy if $c_{11}\ne 0$.
Else suppose $c_{11}=0$ and set $f=g=h=0$ and $e=1$, then it becomes $$AB-BA=\begin{pmatrix}0& -b \\ c & 0\end{pmatrix}$$ That's all.