# Finding homomorphisms $f: \mathbb{Z}_{12} \to \mathbb{Z}_{18}$ with image of size $3$

I'm looking at the number of group homomorphisms $f:\mathbb{Z}_{12} \to\mathbb{Z}_{18}$ whose image is of size 3.

I read from another post that the total number of group homomorphisms is $1 +$ the number of elements of order $12$ in $\mathbb{Z}_{18}$. I hadn't seen this before, but if this is true, then isn't there no element of order $12$ in $\mathbb{Z}_{18}$ which means there is only one group homomorphism?

Also, from the corollary: if $G$ is finite, then $|im (f)|$ divides both $|H|$ and $|G|$, 3 clearly divides $|f:\mathbb{Z}_{12}|=12$ and $|\mathbb{Z}_{18}|=18$, so I know that there must be at least one homomorphism, right?

The image of a group is a subgroup. What are the subgroups of $\mathbb{Z}_{18}$ of size $3$? There is exactly one, and it is $\{ 0, 6, 12\}$, and it is generated by either $6$ or by $12$.
The group $\mathbb{Z}_{18}$ is generated by $1$, and so a group homomorphism $\phi$ is determined entirely by $\phi(1)$. The image of $1$ must be one of the two generators of $\mathbb{Z}_3 \cong \{0, 6, 12\} \subset \mathbb{Z}_{18}$.
So there are two homomorphisms, given by $\phi(1) = 6$ and $\phi'(1) = 12$.
Hint: The image of a homomorphism is a subgroup. If the image has to have size $3$, what are the subgroups of $\Bbb Z_{18}$ of size $3$? Next, remember that a subgroup of $\Bbb Z_{18}$ of size $3$ is isomorphic to $\Bbb Z_3$ (there's only one group of order three up to isomorphism). So you're essentially finding surjective homomorphisms $\Bbb Z_{12}\to\Bbb Z_3$. How many of these are there? (Because $\Bbb Z_{12}$ is cyclic, a homomorphism is determined by where $1$ is sent, and because $\Bbb Z_3$ is cyclic, if you want your homomorphism to be surjective, you just need the homomorphism $\Bbb Z_{12}\to\Bbb Z_3$ to send some element of $\Bbb Z_{12}$ to a generator of $\Bbb Z_3$. Using these facts should simplify things once you figure out what the generators of $\Bbb Z_3$ are.) Lastly, combine the two pieces of knowledge: compose your surjective homomorphisms $\Bbb Z_{12}\to\Bbb Z_3$ with the isomorphism $\Bbb Z_3\to H$, $H\subseteq\Bbb Z_{18}$ to get your maps with image of order $3$. How many are there?