Show that $\det(A) = 0$ or $\mathrm{tr}(A)=0$ Let $A$ and $B$ are two matrices in $\mathcal{M}_{2,2}(\mathbb{R})$ with $B\neq0$ and $AB=-BA$. Show that either $\mathrm{tr}(A) = 0$ or $\det(A)=0$.
I'm stuck since the order is 2.
A few attempts are

*

*From the hypothesis we imply that $\mathrm{tr}(AB) = 0$, thus $(AB)^2=(\det AB)(AB)$. Take $\det$ of both sides, we get $\det AB = 0$ or $\det AB = 1$. which leads to no thing.


*Suppose $\det A \neq 0$, then multiply both side by $A^{-1}$ to the left we have
$B=A^{-1}(-B)A$. This implies that $\mathrm{tr}B= 0$. But i'm still stuck afterward.
Thanks in advance!
 A: Well, I manage to find out another answer for this question, it maybe helpful for future readers.
If we define $A=\begin{pmatrix}
 a&b\\c&d
\end{pmatrix}$ and let $M$ be the matrix of $T$, where $T$ is a linear transformation defined by $$T:\mathcal{M}_{2,2}(\mathbb{R})\to\mathcal{M}_{2,2}(\mathbb{R}), T(X)=AX+XA.$$ Then, , we can find out that
$$
 M= \begin{pmatrix}
  2a&c&b&0\\b&a+d&0&b\\c&0&a+d&c\\0&c&b&2d
 \end{pmatrix}.
$$
Moreover, the hypothesis is now equivalent to $T(B)=0$ , where $B\neq0$, which happens if and only if $\det M = 0$.
In the other hand we have $\det M =4(a+d)^2(ad-bc)$, thus, $\det M = 0$ iff either $\mathrm{tr}(A)=a+d=0$ or $\det A = ad-bc=0$.
A: FIRST PROOF :
You have $AB=-BA$ so multiplying by $A$ on the left, you get $A^2B = -ABA = BA^2$.
Now, by Cayley-Hamilton theorem, you know that
$$A^2- \mathrm{Tr}(A) A + \mathrm{det}(A) I = 0 \quad \quad (1)$$
Multiplying by $B$ on the right, you get
$$A^2B- \mathrm{Tr}(A) AB + \mathrm{det}(A) B = 0, \quad \text{ i.e.} \quad BA^2+ \mathrm{Tr}(A) BA + \mathrm{det}(A) B = 0 \quad \quad (2)$$
And multiplying $(1)$ by $B$ on the left, you get
$$BA^2- \mathrm{Tr}(A) BA + \mathrm{det}(A) B = 0 \quad \quad (3)$$
Now $(2)-(3)$ gives you
$$\mathrm{Tr}(A)BA=0$$
If $\mathrm{Tr}(A)=0$, you are done. Otherwise, $BA=0$, so the equation $(3)$ gives you $\mathrm{det}(A)B=0$, and because $B \neq 0$, you deduce $\mathrm{det}(A)=0$.
$$$$

SECOND PROOF : Here is another way to solve the question. We suppose that $\mathrm{det}(A) \neq 0$, and we will prove that $\mathrm{Tr}(A)=0$.
Let's trigonalize $A$ in $\mathbb{C}$. There exists a basis $\lbrace x,y \rbrace$, and three complex numbers $\lambda, \mu, \nu$ such that $$Ax= \lambda x \quad \quad \text{ and } \quad Ay=\mu y + \nu x$$ (note that $\lambda$ and $\mu$ are the eigenvalues of $A$, and they are non-zero because $\mathrm{det}(A) \neq 0$).
Now apply $B$ to the first equation : you get $$BAx=\lambda Bx\quad \quad \text{ so} \quad A(Bx)=-\lambda(Bx)$$ If $Bx \neq 0$, then $-\lambda$ has to be an eigenvalue of $A$, and because $\lambda \neq 0$, that means that $\lambda$ and $-\lambda$ are the two disctincts eigenvalues of $A$. So $\mathrm{Tr}(A)=0$.
If on the contrary, $Bx=0$, then you must have $By \neq 0$ because $B \neq 0$. Applying $B$ to the second equation gives
$$BAy=\mu By + 0\quad \quad \text{ so} \quad A(By)=-\mu(By)$$
so again, $\mu$ and $-\mu$ are the two only eigenvalues of $A$ and $\mathrm{Tr}(A)=0$.
