Let $G$ be abelian group of order $n$ and let $k$ be a positive integer.If $(k,n)=1$, Prove that the function $f:G \to G$ given by $f(a)=a^k$ is an isomorphism.
My attempt:
let $a, b \in G$ then $f(ab)=(ab)^k=a^kb^k=f(a)f(b)$
so $f$ is homo Is i am correct how to prove one-one and onto
Let $a^k=b^k \Rightarrow (ab^{-1})^k= 1$ but $gcd(k,n)=1$ therefore $n $ does not divide $k$. So $k=1 \Rightarrow a=b.$ Now there exists x and y such that $kx+ny=1 x,y \in \mathbb{Z}$, so for any $b\in G$ we have $ (b^{x})^k =b$ as $|x|$ does not divide $n$ we have $b^{x} \neq 1$ . Thus proved.