How many different homomorphisms $\varphi : \mathbb{Z}_{18} \to \mathbb{Z}_{24}$ so $|Im\varphi| =6$ Trying to solve the following question:

Let $a$ be the number of different homomorphisms of group $\varphi : \mathbb{Z}_{18} \to \mathbb{Z}_{24}$ so $|Im\varphi| =6$.
Find $a$.

In the solution they stated that $\mathbb{Z}_{24}$ is cyclic and it has only one subgroup of order $6$. Than the number of different homomorphism is based on the number of generators $b$ of that subgroup because $\varphi(1)=b$ when $b$ is the generator of a subgroup of order $6$. There are two $b$'s so $a=2$.
I don't understand the solution. Why due to $|Im\varphi|=6$ we need to talk about subgroups of that order? Also, why $\varphi(1)=b$ and why there are two?
 A: This is due to the following facts, that you should be able to verify yourself: 


*

*the image of a group homomorphism is a group

*since $\mathbb Z_{18}$ is cyclic and generated by 1, it's image is cyclic generated by $\varphi(1)$ 

*as you mention, the only subgroup of $\mathbb Z_{24}$ of order $6$ is $\{0,4,8,12,16,20\}$. The generators of this group are those elements of order 6, namely $4$ and $20$. So you can have one $\varphi_1$ given by $\varphi_1(1)=4$, and another one given by $\varphi_2(1)=20$. 
A: A slight variation. There is only one subgroup of $\mathbb Z/24$ of order $6$, and it is cyclic, so it is isomorphic to $\mathbb Z/6$. The question now is how many surjective homomorphisms are there $\mathbb Z/18 \to \mathbb Z/6$. Such a homomorphism is determined by the image of the generator. Thus, the question is now, how many generators of $\mathbb Z/6$ are there? The number of generators is the number of elements in $1,2,3,4,5$ that are relatively prime to $6$, i.e., $1,5$, thus the answer is $a=2$.
A: Because if $\varphi :\mathbb Z_{12}\to \mathbb Z_{18}$ is a Group homomorphism, then $\text{Im}(\varphi )$ is a subgroup of $\mathbb Z_{24}$. So if $|\text{Im}(\varphi )|=6$ then $\text{Im}(\varphi )=4\mathbb Z/24\mathbb Z$ (because it's the only subgroup of $\mathbb Z_{24}$ of order $6$). Now, $\varphi $ is uniquely determinated by $\varphi (1)$ (because $\mathbb Z_{18}$ is cyclic). Since $$4\mathbb Z/24\mathbb Z=\{0,4,8,12,16,20\}=\left<4\right>=\left<20\right>,$$
where I abusively denote $a$ the class of $a$, then any $\varphi (1)\in \{0,4,8,12,16,20\}$ will denote an homomorphism. Now you need to have that $\varphi (1)$ has order $6$ (because $\text{Im}(\varphi )$ is a cyclic group of order $6$). The only element of order $6$ are $4$ and $20$. So, the only non trivial homomorphisms are determined by $\varphi (1)=4$ and $\varphi (1)=20$.
