TITLE: Proving $A$ is not invertible if $AB=A^2B^2-(AB)^2$ and $\det(B)=2$
QUESTION [5 upvotes]: Let $A$ and $B$ be two $2\times 2$ matrices with real element such that
$$AB=A^2B^2-(AB)^2
\qquad\text{and}\qquad 
\det(B)=2.$$
Show that $A=0$.
My Attempt:
\begin{align}
AB=A^2B^2-(AB)^2
&\implies A=A^2B-ABA &&\text{(since $|B|\neq0$)} \\
&\implies A = A(AB) - A(BA) \\
&\implies \operatorname{tr}(A) = 0
\end{align}
Also, by Cayley Hamilton theorem I could get $$A^2=-|A|I$$
This is all I could gather.

REPLY [4 votes]: From $$ A=A(AB-BA),$$ since $AB-BA=I$ is impossible, you get that $A$ is not invertible. So $|A|=0$, and from your last equality $$A^2=-|A|I=0.$$ 
You cannot improve that. Let 
$$
A=\begin{bmatrix} 0&1\\0&0\end{bmatrix},\ \ \ B=\begin{bmatrix} 0&2\\-1&0\end{bmatrix}. 
$$
Then your conditions are satisfied:
$$
AB=A^2B^2-(AB)^2,\ \ \ \det B=2.
$$