Number of homomorphisms $\mathbb Z_3 \times \mathbb Z_3\to\mathbb Z_9$ I had this wonderful idea: $f$ is homomorphism: $G\to H$, $|G| = |\ker f| \cdot |\operatorname{im} f|$, $\ker f$ - subgroup of $G$, and $\operatorname{im} f$ - subgroup of $H$, so their orders must be divisors of orders of their groups. So I looked for divisors of $3\cdot 3$ and $9$: $1$, $3$ and $9$. $9 = 1\cdot 9 = 3\cdot 3 = 9\cdot 1$, so there must be three homomorphisms, but apparently this isn't right answer. Is there a seed of truth in my idea, and which is the right way to solve this? Idea worked beatifully on $\mathbb Z_n\to \mathbb Z_m$.
 A: You can have two different homomorphisms $\mathbb Z_3\times\mathbb Z_3\to\mathbb Z_9$ which have kernels of equal size, for example $f$ defined by $(1,0)\mapsto 3$, $(0,1)\mapsto 0$ and $g$ defined by $(1,0)\mapsto 0$, $(0,1)\mapsto 3$ both have $|\ker f|=|\ker g|= 3$. So counting the number of possible kernel cardinalities is not enough to count all homomorphisms.
Since any homomorphism is defined by the images of a generating set, you need to figure out the possible images for $(1,0)$ and $(0,1)$ that define a homomorphism. Be aware that for example $(1,0)\mapsto 1$ can not give you a homomorphism, do you know why?
Any homomorphism $\varphi:\mathbb Z_3\times\mathbb Z_3\to\mathbb Z_9$ satisfies
$$
0 = \varphi(0,0) = \varphi\left(3\cdot(1,0)\right) = 3\cdot\varphi(1,0),
$$
where $3\cdot g$ is just a notation for $g+g+g$.
Now assume $\varphi(1,0)=1$ then this equation becomes $0=3$, which is wrong even in $\mathbb Z_9$. In general the order of $\varphi(g)$ has to be a divisor of the order of $g$.
A: I would recommend a different approach...
Hint: $(1,0)$ must be sent to $0$ or an element of order 3, and the same holds for $(0,1)$. What are the options?
