[Math] Prove True or false : If $A$ and $B$ are nxn invertible matrices and $(AB)^2=A^2B^2$, then $AB=BA$

linear algebramatricesvectors

Prove True or false : If $A$ and $B$ are $n\times n$ invertible matrices and $(AB)^2=A^2B^2$, then $AB=BA$.

This looks like it is false, but the thing is I can't find a counter example for it.

Best Answer

HINT: Multiply $(AB)^2=A^2B^2$ on the left by $A^{-1}$ and on the right by ...