Homomorphisms from $Z_n$ to $Z_m$ I'm reviewing my Abstract Algebra and I'm stuck on something. My professor explained that if  $\varphi:G\rightarrow H$ is a homomorphism, then $$\varphi(1_G)=1_H$$where $1_X$ is the identity in the group $X$. What I'm confused about is the following: we were asked to count the number of homomorphisms from $Z_a$ to $Z_b$, where $a,b$ are positive integers and $a<b$.
At the time it made sense but thinking about it now I'm confused. $1_{Z_a}$ generates $Z_a$ and $1_{Z_b}$ generates $Z_b$. I know the number of such homomorphisms is $\gcd(a,b)$. Why is this not $1$ homomorphism? From what my professor told me if $\varphi$ is a homomorphism from $Z_a$ to $Z_b$ then $\varphi(1_{Z_a})=1_{Z_b}$. But then as everything in $Z_a$ is determined by $1_{Z_a}$, isn't the entire image of $Z_a$ under $\varphi$ determined already? He talked about mapping $1_{Z_a} \mapsto x \in Z_b$. But how can $x$ be anything but $1_{Z_b}$ by what he told us that same day!? I feel like I'm missing something very obvious and fundamental about group homomorphisms here, what is it? Thanks!
 A: The confusion seems to be about multiplicative vs. additive notation.  $1_G$ denotes the identity element of the group $G$ (which may or may not be numerically equal to $1$).  
In this case $1_{Z_a}$ denotes the identity element in the group $Z_a$, so we have $1_{Z_a}=0$.  So, $1_{Z_a}$ does not generate $Z_a$ (unless $a=1$).
A: You confuse $1$ with $1$. Note that $1_G$ represents the identity of $G$.
In $\mathbb{Z}_n$ the number $1$ (or the class of 1) is NOT the identity of the group. The identity is $0$. 
So, $\varphi(1_G)=1_H$ actually says:
$$\varphi(0)=0 \,.$$
This is exactly why I prefer to denote $1_G$ by $e$ or $e_G$....
A: Note that your $1_{\mathbb{Z}_{a}}$ is actually $0$ as you're taking the additive group. The $1$ is not the additive identity. Therefore, $1\mapsto x$ may be a homomorphism for $x\neq1$.
A: Note that the homomorphism could be zero. If the homomorphism is non zero, then as you remarked, everything is determined by where $1$ goes. $1$ can go to any of the generators of $\mathbb{Z_m}$. Your confusion stems from the fact that you are confusing notations.
For a group written in "multiplicative notation" $1_G$ means the identity. For abelian groups like $Z_n$ we use additive notation, and here the identity is $0$ and not $1$
