If $G$ is a group show that if $(a \cdot b)^2 = a^2 \cdot b^2$ then $G$ must be abelian. 
If $G$ is a group show that if $(a \cdot b)^2 = a^2 \cdot b^2$ then $G$ must be abelian.

$\begin{aligned}(a \cdot b)^2 = a^2 \cdot b^2 & \iff (a\cdot b)\cdot(a \cdot b) = (a \cdot a)\cdot (b \cdot b) \\& \iff a \cdot (b \cdot (a \cdot b)) =a(a \cdot (b\cdot b)) \\& \iff (a^{-1} \cdot a) \cdot (b \cdot (a \cdot b)) =(a^{-1}\cdot a)(a \cdot (b\cdot b))\\& \iff (b \cdot (a \cdot b)) =(a \cdot (b\cdot b)) \\& \iff (b \cdot a) \cdot b =(a \cdot b)\cdot b\\& \iff (b \cdot a) \cdot (b \cdot b^{-1}) =(a \cdot b)\cdot (b \cdot b^{-1}) \\& \iff b \cdot a = a \cdot b\end{aligned}$
Thus $G$ must be abelian. Is this right? Is there less clunky way to write it if it's?

More simply, $(ab)^2=abab=a^2b^2$
Cancel $a$ from the left and $b$ from the right to get $ba=ab$.
