TITLE: Ring Homomorphisms from $\mathbb Z_{20} \to \mathbb Z_{30}$
QUESTION [8 upvotes]: We need to find all ring homomorphisms from $\mathbb Z_{20} \to \mathbb Z_{30} $ ;
I read its solution somewhere which states that : 
$R : \mathbb Z_{20} \to \mathbb Z_{30}$ defined by $R(x) = ax$ , $a$ belongs to $\mathbb Z_{30}$ is a ring homomorphism if : 
$1) \  a^2 = a$ and ,
$2) |a| \ \Big| \ 20 , \ \ \  |a| \ \Big| \ 30$ 
$1)$ is acceptable , but i couldn't understand $2)$.. why order of $a$ should divide both $20$ and $30$ ?

REPLY [2 votes]: I will state here one theorem and one property of group Homomorphism which will allow you to see why (2) hold true.
$\textbf{Lagrange's Theorem}$
If $G$ is a finite group and $H$ is a subgroup of $G$, then $|H|$ divides $|G|$.
Proof: It's proof is based on cosets of $H$ in $G$ and can be found in any standard textbook.
$\textbf{Property of Group Homomorphism}$
If $|g|$ is finite, then $|\phi(g)|$ divides $|g|$.($\phi$ is some homomorphism)
Proof: $g^n=e_{G}  \Rightarrow (\phi(g))^{n}=e_{\bar{G}} \Rightarrow |\phi(g)|$  divides $|g|$. 
Now, back to the problem, since $\phi(1)=a$ and Ring form an abelian group under addition. So, form a cyclic subgroup of $<a>$ whose order must divide order of $Z_{30}$ and $|e_{z_{20}}|=20$ in $Z_{20}$.
Hence, $ |a| \ \Big| \ 20 , \ \ \  |a| \ \Big| \ 30$