Let $\langle a \rangle $ be a cyclic group of order $n$ and let $m$ and $n$ be relatively prime. Show that $f(x) = x^m$ is an automorphism. I'm stuck on this proof. I need to prove:
Let $\langle a \rangle $ be a cyclic group of order $n$ and let $m$ and $n$ be relatively prime. Show that  $f(x) = x^m$ is an automorphism.
And this is the work progress I have made so far:
We need to show 3 things:


*

*$f$ is injective from $\langle a \rangle$ to $\langle a \rangle$

*$f$ is surjective from $\langle a \rangle$ to $\langle a \rangle$

*For all $x,y \in \langle a \rangle$, $f(xy) = f(x)f(y)$


Part 3 is trivial, $f(xy) = (xy)^m = x^my^m=f(x)f(y)$
Since $\langle a \rangle$ is finite, 1 and 2 are logically equivalent. My approach is to show that $f$ is surjective. For this, let $p \in \langle a \rangle$ be given, and let $k = \textrm{ord}(p)$. Then $k|n$.
If $\textrm{ord}(p)=k$ and $k|n$ then $p^n = e$.
I'm really not sure where to go next with the proof. If I can show that there is $x$ such that $p = x^m$ I will be done.
 A: $\rm\langle a^m\rangle = \langle a \rangle,\:$ by $\rm\, a^m$ has order $\rm\,n,\,$ by $\rm\ a^{mk}\!=1\!\iff\! n\mid mk\!\iff\! n\mid k,\: $ by $\rm\:(n,m)=1,\:$ and Euclid.
A: Hint:  $mk+nl=1$ for some $k,l$ integeres.
What is $f(a^l)=$? 
P.S. It is probably easier to prove that $\ker(f)=\{ e \}$. That is because if $x \in \ker(f)$ then $x^m=e$ and you already know that $x^n=e$...
A: You have already shown the homomorphism property holds.
To show that $f$ is 1-1, let $a^i, a^j \in \langle a \rangle$ and $f(a^i)=f(a^j).$ Then $(a^i)^m=(a^j)^m \Rightarrow a^i=a^j$ since $m$ and $n$ are coprime $(i.e., (mi)\mod{n}=(mj)\mod{n}$)
Now, since $f$ is 1-1 and has the same set as its domain and codomain, it follows from set theory that $f$ is 1-1 if and only if $f$ is onto. This is a very useful result for verifying automorphisms.
A: Choose $a^i\in(a)$ for some $i\in\mathbb Z.$ 
$(m,n)=1\implies\exists~x,y\in\mathbb Z$ such that $mx+ny=1$ i.e. $(xi)m=i-n(yi).$
Consequently $f(a^{xi})=a^{mxi}=a^{i-n(yi)}=a^i.$
