I'm trying to get the hang of this theorem by solving some exercises involving it. One of those says: Prove that $(\mathbb{Q},+)/\mathbb{Z}$ is isomorphic to $(U_\infty,\cdot)$, where $U_\infty = \{ z \in C\mid z^n = 1, n \in \mathbb{N} \}$.
I know I need to find a morphism from $(\mathbb{Q},+)$ to $(U_\infty,\cdot)$ such that $\ker(f) = \mathbb{Z}$. I believe that $f(x)=\cos(2\pi x)+i \sin(2\pi x)$ does the trick, but I'm not sure. Could anyone tell me if this is correct, and if not, give another example of a function?