Let $U_{n}$ be the multiplicative group of the $n$th roots of unity; this group is cyclic of order $n$ and is generated by $w = \cos(\frac{2\pi}{n})+i\sin(\frac{2\pi}{n})$. If we define $f: (\mathbb Z,+) \rightarrow$ $U_{n}$ by the equation $f(a) = w^a$. Is f an epimorphism and monomorphism?
Now I know that epimorphism means that it's onto or surjective. To find if the function is surjective we usually put $f(x)=y$ and then solve for $x$. But I believe it is not the case here. In the book, they just show kernel (which is nontrivial so it is the proof that the function is not monomorphism) and then state that f is an epimorphism. I do not understand how did they come to that conclusion? $\ker f = \{a \in\mathbb Z : w^a=1\} = \{mn : m \in \mathbb Z\}$ if it helps
$\require{AMScd}$Since $\ker f=n\Bbb Z$, $f$ induces an injective homomorphism $h:\Bbb Z/n\Bbb Z\to U_n$. Since $\Bbb Z/n\Bbb Z$ and $U_n$ have the same finite cardinality $n$, this homomorphsm $h$ is bijective. Consequently, $f$ is surjective because composition of surjective functions: \begin{CD} \Bbb Z@>f>>U_n\\ @VpVV@|\\ \Bbb Z/n\Bbb Z@>\sim>h>U_n \end{CD}