If $\,\operatorname{trace}(C) = 0\; $ then there exist matrices $A$ and $B$ such that $AB - BA =C$ If $c_{11} + c_{22}=0$  then there exist matrices $A$ and $B$ such that $AB - BA =C$, where
$$C = \begin{pmatrix} c_{11} & c_{12} \\ c_{21} & c_{22} \end{pmatrix}.$$
I cannot understand where to start. This question is from Linear Algebra by Hoffman & Kunje. I thought this problem would be on this site, but I could not find it.
Can anyone give me a hint?
I really could not understand the answer to this question here.
I have two questions:
1) Is the statement true for any Square Matrix?
2) Is there any easy way to prove it for the matrix of order $2 \times 2$?
 A: The issue is to give explicit solutions $(A,B)$ to relationship :
$$AB-BA=\underbrace{\begin{pmatrix}p & \ \ q\\
r& -p\end{pmatrix}}_C\tag{1}$$
We are going to consider 3 cases, from the most general to the most particular.


*

*Let us assume first $p \neq 0$. Relationship (1) is verified by taking :


$$A:=\begin{pmatrix}0& p\\
   0 & r\\ \end{pmatrix} \ \ \text{and} \ \
B:=\begin{pmatrix}0&0\\
   1 & q/p\end{pmatrix}.\tag{2}$$


*

*Let us now consider the case $p=0$ that we divide into 2 subcases :

*Case $p=0$ and $r \neq -q$ : it suffices to take :
$$A:=\tfrac{1}{2(q+r)}\begin{pmatrix}r& -q\\
r& -q\end{pmatrix} \ \ \text{and} \ \
B:=\begin{pmatrix}\ \ q&\ \ q\\
-r&-r\end{pmatrix}\tag{3}$$
to get $$AB-BA=\begin{pmatrix}0 & q\\
r& 0\end{pmatrix}.$$


*

*Case $p=0$ and $r=-q$ : take :
$$A:=\begin{pmatrix}1& 1\\
   1 & 0\\ \end{pmatrix} \ \ \text{and} \ \
B:=\begin{pmatrix}0&q\\
   q & 0\end{pmatrix}.\tag{4}$$
giving 


$$AB-BA=\begin{pmatrix}\ \ 0& q\\
   -q & 0\\ \end{pmatrix} .$$

Remark about the degrees of freedom we have for (2), (3) and (4) :
Out of relationship (2) for example (the same is true for (3) and (4)), it is possible to generate a lot of other solutions to (1). For example by taking, for any $a$ and any $b$ :  
$$A:=\begin{pmatrix}a& p\\
   0 & a+r\\ \end{pmatrix} \ \ \text{and} \ \
B:=\begin{pmatrix}b&0\\
   1 & b+q/p\end{pmatrix}.\tag{5}$$
The idea behind (5) is in fact very natural : if in (1), for a given $C$, we have a solution $(A,B)$, then, for any $k$, $(A,B+kI_2)$ is as well a solution because we still have 
$$A(B+kI_2)-(B+kI_2)A = C.$$
(and $(A+k'I_2,B)$ as well) i.e., we can add a multiple of the identity matrix, to any of the solution matrices without changing the result. More generally, we can add to $B$ any polynomial $p(A)$ in $A$ :
$$A(B+p(A))-(B+p(A))A = C,$$
and, of course, to $A$ any polynomial in $B$.
