# Is $AB=BA$ Given the following conditions.

If $A$ and $B$ are $n x n$ invertible matrices and $(AB)^2$ = $A^2B^2$, then $AB = BA$.

How would you go about proving or disproving this statement. I fail to connect my theorems to the $(AB)^2$ part, I can't think of a relation or hint.

• you have $ABAB = A^2B^2$, simplify this expression. – Thoth Nov 1 '15 at 21:28

$(AB)^2=A^2B^2$ is equivalent to $ABAB=A^2B^2$. Multiplying to the left both members in the last expression by $A^{-1}$ (wich exists because A,B are invertible) you get $$BAB=AB^2$$ then multiplying to the right both members by $B^{-1}$ you get $$BA=AB.$$
If $A,B$ are invertible we have: $$(AB)^2=A^2B^2 \quad \iff \quad ABAB=AABB \quad \iff \quad A^{-1}ABABB^{-1}=A^{-1}AABBB^{-1} \quad \iff \quad BA=AB$$