A strange matrix equality Let $A$ and $B$ be $n\times n$ real matrices.
When $n=2$, we have the equality
$$A\Big(\mbox{Trace}(B)A-\mbox{Trace}(A)B\Big) B=B\Big(\mbox{Trace}(B)A-\mbox{Trace}(A)B\Big) A.$$


*

*Can we give an interpretation to this equality?

*Are there similar equalities when $ n = 3,4,...$?
 A: Let $A'$ and $B'$ be the classical adjoints of $A$ and $B$.  Write
$$S(A,B)=(B+B')A^2B-AB^2(A+A')$$
$$T(A,B)=BA^2(B+B')-(A+A')B^2A$$
$$U(A,B)=B'A^2B-AB^2A'$$
$$V(A,B)=BA^2B'-A'B^2A$$
Then:
1)  For any $n$ we have (trivially) $$S(A,B)-T(A,B)=U(A,B)-V(A,B)$$
2)  For $n=2$ (but not otherwise), $S(A,B)$ is equal to your left-hand side and $T(A,B)$ is equal to your right-hand side.
3)  For $n=2$ (but not otherwise) it's easy to check that $U(A,B)=V(A,B)$.
The proof of (2) above relies on the fact that, for $n=2$ (but not otherwise) we have $B+B'=trace(B)$, and therefore $B+B'$ commutes with everything.  There's no good generalization of this to $n>2$.  
With a little more patience and/or cleverness, one might hope to juggle the expressions for $S,T,U$ and $V$ a little so that 1) and 2) remain true as stated, while 3) becomes true for every $n$.   This would essentially imply that your identity is equivalent to $B+B'=tr(B)$ and explain why we shouldn't expect it to generalize past $n=2$.
A: Let us rewrite it using the commutators $[P,Q]=PQ-QP$, as follows:
 $$
tr(B)[A^2,B]=tr(A)[A,B^2].
 $$
Now, for matrices $X$ of size~$2$, we have $X^2=tr(X)X-det(X)I$ (a particular case of Cayley--Hamilton), so
 $$
tr(B)[tr(A)A-det(A)I,B]=tr(A)tr(B)[A,B]=tr(A)[A,tr(B)B-det(B)I],
 $$
since $I$ commutes with everything. 
This might be the most economic proof of your identity; moreover, it is known (Procesi, Razmyslov) that every identity with traces for $n\times n$-matrices does follow from the Cayley--Hamilton identity, so generalisations of your identity should be obtained in a similar way.
