Let $G$ be a group and let $\phi:G \rightarrow G$ be defined by $\phi(g)=g^{-1}$. Prove that $\phi$ is an isomorphism if and only if $G$ is abelian.
My attempt.
(Forward direction)
Suppose $\phi$ is isomorphic. Then $\phi$ is:
$i)$ Injective. Implying that $\phi(g_1)=\phi(g_2), g_1=g_2$
$ii)$ Surjective. Implying that $a^{-1} \in G$ and $\phi(a)=a^{-1}$
$iii)$ $\phi(g_1g_2)$ = $\phi(g_1)\phi(g_2)$
from ($iii)$, $\phi(g_1g_2) =\phi(g_1)\phi(g_2)= g_1^{-1} g_2^{-1}$
=$\phi(g_2)\phi(g_1^{-1})\phi(g_1)\phi(g_2)\phi(g_2^{-1})\phi(g_1)= g_2^{-1}g_1g_1^{-1} g_2^{-1}g_2g_1^{-1}= g_2^{-1}g1^{-1} = \phi(g_2)\phi(g_1)$
Hence, it is abelian.
(backwards direction)
Suppose $\phi$ is abelian. Then $\phi(g_1 g_2) = g_2^{-1} g_1{^-1}$
To show injectivity: Let $\phi(g_1g_2) = \phi(g_2g_1)$
$g_1^{-1}g_2^{-1}= g_2^{-1}g_1^{-1}$
$g_1g_1^{-1}g_2^{-1}g_2=g_2g_2^{-1}g_1^{-1}g_1$
$e_1 = e_2$
Surjectivity follows by definition.
Finally, from similar to the forward direction, $\phi(g_1g_2)=\phi(g_1)\phi(g_2)$
Best Answer
Assume $G$ is abelian and let $a,b \in G$. $\phi(ab) = (ab)^{-1} = b^{-1}a^{-1} = a^{-1}b^{-1} = \phi(a)\phi(b)$. $\phi$ is obviously surjective by construction. Suppose that $\phi(a) = \phi(b)$, then $a^{-1} = b^{-1} \longrightarrow aa^{-1}b = ab^{-1}b \longrightarrow b = a$. Thus $\phi$ is injective.
Now suppose that $\phi$ is an isomorphism. Then $\phi(ab) = \phi(a)\phi(b) = a^{-1}b^{-1}$ implies that $(ab)^{-1} = b^{-1}a^{-1} = a^{-1}b^{-1}$. Thus $G$ is abelian.