How many group homomorphisms we can get from ${\mathbb Z}_{20}$ to ${\mathbb Z}_{10}$? How many group homomorphisms we can get from ${\mathbb Z}_{20}$  to   $ {\mathbb Z}_{10}$?
My Try: I think $4$. Because $1 , 2 , 5 , 10$ are the only possible order of image of ${\mathbb Z}_{20} $. 
Can anyone please help me?
 A: Any homomorphism is completely determined by the image of $1$. That is, if $1 \mapsto a$, then $x \mapsto xa$.
So assume $1 \mapsto a$. Then by Lagrange's theorem $\vert a \vert$ divides $10$. Also by this result$\Bigl( \text{If}\; \vert g \vert$ is finite, then $\vert \phi(g) \vert$ divides $\vert g \vert \Bigr)$,we have $\vert a \vert$ divides $20$ ,since $\vert 1 \vert =20$ is finite. 
Thus $\vert a \vert$ divides both $20$ and $10$. So $\vert a \vert=1,2,5,10$
Thus $a=0,5,2,8,4,6,1,3,7,9$. ( Actually the range of this "$a$" is all the elements of $\Bbb{Z}_{10} $, but I am writing in the order mentioned above). This give a list of $10$ 
homomorphisms.
That is
$$x \mapsto ax$$ where $a=0,1,2,...,9$ are all the required ten homomorphisms.
In General, the number of group homomorphisms from $\Bbb{Z}_m$ to $\Bbb{Z}_n$ is $\text{gcd}(m,n)$  
A: Let's consider the more general problem of determining the homomorphisms from $\Bbb Z/m\Bbb Z$ to $\Bbb{Z}/n\Bbb Z$. Consider the short exact sequence:
$$0\longrightarrow \Bbb Z\xrightarrow{~\times~ m\enspace}\Bbb Z\xrightarrow{\qquad} \Bbb Z/m\Bbb Z\longrightarrow 0, $$
from which we deduce the exact sequence of $\DeclareMathOperator{\Hom}{Hom}\Hom$s:
$$0\longrightarrow\Hom(\Bbb Z/m\Bbb Z,\Bbb Z/n\Bbb Z)\xrightarrow{\qquad}\Hom(\Bbb Z,\Bbb Z/n\Bbb Z)\xrightarrow{~\times~ m\enspace}\Hom(\Bbb Z,\Bbb Z/n\Bbb Z).$$
Thus $\Hom(\Bbb Z/m\Bbb Z,\Bbb Z/n\Bbb Z)$ is the kernel of the map
\begin{align}
\Hom(\Bbb Z,\Bbb Z/n\Bbb Z)\simeq\Bbb Z/n\Bbb Z&\xrightarrow{\qquad}\Bbb Z/n\Bbb Z, \newline 
f(1)=\bar x& \longmapsto f(m)=m\bar x,
\end{align}
i.e. it corresponds to the set $\;\{\bar x\in\Bbb Z/n\Bbb Z\mid mx\in n\Bbb Z\}$.
Nenote $d=\gcd(m,n)$, $\:m'=\dfrac md$, $\:n'=\dfrac nd$. As $m'$ and $n'$ are coprime, :
$$mx\in n\Bbb Z\iff m'x\in n' \Bbb Z \iff x\in  n' \Bbb Z ,$$
so that $\; \Hom(\Bbb Z/m\Bbb Z,\Bbb Z/n\Bbb Z)$ corresponds to the ideal in $\Bbb Z/n\Bbb Z$ generated by the congruence class of $\;n'=\dfrac nd$. This ideal is isomorphic to $\;\Bbb Z/d\Bbb Z$.
