Prove that the function $f:G \to G$ given by $f(a)=a^k$ is an isomorphism. 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 
 A: 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.
A: Maybe nice to know, the opposite direction is also true: if $G$ is an abelian group of order $n$, $k$ an integer and $f: a \mapsto a^k$ is an isomorphism, then gcd$(k,n)=1$. Proof: assume gcd$(k,n)\neq 1$. Then we can find a prime $p$ with $p \mid k$ and $p \mid n$. By Cauchy's Theorem there is an $a \in G$ with order$(a)=p$. Then $a^k=a^{p \cdot \frac{k}{p}}=1^\frac{k}{p}=1$. Since $f$ is injective this yields $a=1$, a contradiction.
A: The proof that $f$ is a homomorphism is correct.
Suppose $a\in\ker f$, that is, $a^k=1$. Write $1=kx+ny$ (Bézout), so
$$
a=a^1=a^{kx+ny}=(a^k)^x(a^n)^y=1
$$
because it's a general fact that $a^n=1$, for every $a$ in a group of order $n$.
Thus $\ker f=\{1\}$ and $f$ is injective. Do you need anything else? (Hint: no.)

 Since $G$ is finite, $f$ is also surjective.

