Why do characters of groups have modulus $1$? This is a fairly simple question, and it is supposed to be a definition-level question. But it really bothers me as I couldn't see the reason. Let $f$ be a character of an (arbitrary) group $G$, then
$$f(ab)=f(a)f(b)$$
and $f:G\to\mathbb{C}$. Apostol in his book Introduction to Number Theory mentions that for all group elements $|f(a)|=1$. The only proof of this statement I can come up with is that if $G$ is a finite abelian group, then for all $g\in G$, there exists an integer $n$ such that $g^n=1_G$. Therefore, we have
$$f(g^n)=f(g)^n=f(1_G)=1$$
Thus $|f(g)|=|1|^{1/n}=1$. However, this result is restricted to only finite abelian groups. So I'm wondering if this is a general truth or it is just for finite abelian groups?

It's a general result for compact groups since in that case, the image of $G$ under $f$ must be compact and every compact sub-group of $\mathbb{C}^{\times}$ is contained in $S^1$.
To see this, note that if $H$ is a sub-group of $\mathbb{C}^{\times}$ and $z\in H$ satisfies $|z|\neq 1$ ,then, $|z^n|$ tends to either $0$ or $\infty$. However, this means that either $H$ is unbounded or has $0$ as an accumulation point (in fact, considering $z^{-1}$, both of these statements must be true). Hence, $H$ cannot be compact. 
To see that it's not true in general, simply take $G=\mathbb{C}^{\times}$ and $f(z)=z$. It's clearly a character and its image is not contained in $S^1$.
