# cyclic group - automorphism

If $G$ is a cyclic group where both $a$ and $b$ are generators. How would I prove that $f:G \rightarrow G$ given by $f(a^i)=b^i$ is an automorphism.

I know that an automorphism is the identity map. So if $G$ is cyclic of order $n$. So I believe I have to show that $f$ is a well defined homomorphism, but I'm not exactly sure how to do this.

-
"I know that an automorphism is the identity map." Not at all, the identity map is an automorphism, but there may be others. In particular, the map of your problem is not the identity if $a \ne b$. –  fkraiem Jan 29 at 6:48

To show that the map is well-defined, show that if $a^i = a^j$, then $b^i = b^j$. Remember that in any group $G$, $a^i = a^j$ if and only if $i$ and $j$ are congruent modulo the order of $a$ in $G$.
The rest is routine, you just need to remember that since $a$ and $b$ are generators, any element of $G$ can be written as a power of $a$ and as a power of $b$ (in general with different exponents).
if $a$ and$b$ are both generators, does that imply they both have the same order? say $n$? @fkraiem –  PandaMan Feb 3 at 5:25
Of course. ;) The order of an element $g$ in a group $G$ is the order of the subgroup of $G$ which $g$ generates. If $g$ is a generator of $G$, then the order of $g$ is the order of $G$. –  fkraiem Feb 3 at 5:30