Given $(G,*)$ a group. Show the function $f: G \to G$ defined as $f(a)=a^{-1}$ is an isomorphism if and only if G is abelian.
I am having troubles showing both ways of the proof. I know I have to show that $a*b=b*a$ for the first part, but do I have to suppose that the function is bijective or just use that $f(a*b)=f(a)*f(b)$?
For the second part, knowing that G is abelian, do I have to show that the function is bijective and $f(a*b)=f(a)*f(b)$ is true?
You can observe that for every $a,b\in G$
$(a*b)*(b^{-1}*a^{-1})=a*(b*b^{-1})a^{-1}=$
$=a*1*a^{-1}=a*a^{-1}=1$
so for the unicity of inverse you have that
$(ab)^{-1}=b^{-1}a^{-1}$
For every $a,b\in G$
$f(a*b)=(a*b)^{-1}=b^{-1}*a^{-1}=$
$=a^{-1}*b^{-1}=f(a)*f(b)$
so the map is a morphism.
$f(a)=1 \to a^{-1}=1$ and so $a=1$
so the map is injective
If $a\in G$ than
$f(a^{-1})=(a^{-1})^{-1}=a$
so the map is also surjective
Conversely, if $f$ is an isomorphism than
$a*b=f((a*b)^{-1})=$
$=f(b^{-1}*a^{-1})=f(b^{-1})*f(a^{-1})=b*a$