# Number of Homomorphisms from $\Bbb{Z}_m$ to $\Bbb{Z}_n$

This question coutesy of Allan Clark's "Elements of Abstract Algebra" (60$\zeta$).

Find the number of homomorphisms from $\Bbb{Z}_m\to \Bbb{Z}_n$ as a function of $m$ and $n$.

This is stumping me, can anyone help?

In general, if $G$ is any group, then you can show that the number of homomorphisms $\mathbb{Z}_m \rightarrow G$ is the number of solutions to $x^m = 1$ in $G$. How many solutions are there to $x^m = 1$ in $\mathbb{Z}_n$?

• Also we can say that number of homomorphism $\mathbb Z_m \rightarrow G$ is the number of solution to mx = 0 in G – user120386 Mar 5 '14 at 16:08
• Do you have a proof? This is interested to me. – Mr.Lilly Jan 31 '15 at 16:26

HINT: If $h:\Bbb Z_m\to\Bbb Z_n$ is a homomorphism, $\big|h[\Bbb Z_m]\big|\cdot|\ker h|=m$, and $\big|h[\Bbb Z_m]\big|$ divides $n$.

I am not sure if this is the correct way to go but look good to me hence, i am sharing.

Let $f$ be the homomorphism from $Z_{m} \to Z_{n}$

Since $O(f(_{n})) \space | \space O(Z_{n}) \implies O(f(_{n})) \space | \space n$

Also $O(f(_{n})) \space | \space m$

Hence number of homomorphism = $gcd(n, m)$