Suppose $G_1,G_2$ are groups and $f:G_1 \to G_2$ is a homomorphism. Prove $f$ injective implies $o(f(g)) = o(g) \space\forall g\in G$.
Suppose $g\in G , g'\in G$ such that $o(g)=n, f(g)=g'$. Then
$$\begin{align} e&=f(e)\\ &=f(g^n)\\ &=(f(g))^n\\ &=(g')^n, \end{align}$$
which implies $o(g')\mid n.$
I can't see how using the injectivity helps me find that $o(f(g)) = o(g)$.
Help please.
The group
$$\langle g\rangle=\{e,g,\dots, g^{n-1}\}$$
has $n$ distinct elements, since $|g|=n$.
Consider $g'^i=g'^j$ for some $i,j\in\{0,1,\dots, n-1\}$. Here $g'=f(g)$, so
$$\begin{align} g'^i=g'^j&\implies f(g)^i=f(g)^j\\ &\implies f(g^i)=f(g^j)\quad(f\text{ is a homomorphism})\\ &\implies g^i=g^j\quad(f\text{ is injective})\\ &\implies i=j\quad(\text{these powers of }g\text{ are distinct}). \end{align}$$
Therefore, the elements of $\{e,g',\dots, g'^{n-1}\}$ are distinct.
But $|f(g)|\mid |g|$.
Clearly, if $|g|$ is infinite, then so is $f(g)$ by injectivity, for suppose otherwise: then $|f(g)|=m$ would imply $f(g)^m=f(g)^{2m}$, which would mean $f(g^m)=f(g^{2m})$, giving $g^m=g^{2m}$ by injectivity; but then $|g|$ would be finite.
Thus $|f(g)|=|g|$.