I have been tasked to solve both parts of this question.
(a): How many group homomorphisms $\phi :\mathbb{Z}_{45} \to \mathbb{Z}_{27}$ are there?
(b): How many of these $\phi$ are injective and how many are surjective?
For part (a): I recall, that in general, the # of group homomorphisms from $Z_m\to Z_n$ can be found by the $\gcd(m,n)$. So here, I got: $\gcd(45,27) = 9$.
For part (b) though, I'm actually entirely lost on how to determine which of these $\phi$ are injective and surjective. Is there a general way to find these? and if so, how would one do that with this example?
Thanks in advance. Any help, advice, or direction would be greatly appreciated.
Recall that $$\mathbb{Z}_{45}\cong\mathbb{Z}_{5}\times\mathbb{Z}_{9}$$ via the map $1\mapsto(1,1).$ Therefore it is enough to determine homomorphisms between $\varphi: \mathbb{Z}_{5}\times\mathbb{Z}_{9}\to\mathbb{Z}_{27}.$ Note that $$\varphi((a,b))=\varphi((a,0)+(0,b))=\varphi((a,0))+\varphi((0,b)),\qquad a\in\mathbb{Z}_5, b\in\mathbb{Z}_9.$$ Now, since $\mathbb{Z}_{27}$ has no element whose order is $5,$ under any homomorphism the first factor of $\mathbb{Z}_5$ maps to $0.$ This in fact shows that there are no injective or surjective homomorphism between them.
Then, if you determine the number of ways to map the other factor of $\mathbb{Z}_{9}$ in to $\mathbb{Z}_{27}$ we are done. The image of any homomorphism in to $\mathbb{Z}_{27}$ is a (unique) subgroup of order $1, 3, 9$ or $27.$ By looking at image of the generator we can see that there are three different such maps. Explicitly they are $$(0,1)\mapsto 0\qquad (0,1)\mapsto3,\qquad (0,1)\mapsto9.$$
Added:
Now that I'm thinking, we can directly establishes all group homomorphisms $\psi: \mathbb{Z}_{45}\to\mathbb{Z}_{27}$ by simply observing that $$0=\psi(45)=45\psi(1)\equiv18\psi(1)(\text{mod}27).$$ Then we have only three solutions $\psi(1)=0, 3,$ and $9$ in $\mathbb{Z}_{27}.$ Each of these choices give a group homomorphism.