Let $G$, $H$ be finite groups.
For a homomorphism $\varphi \colon$ $G \to H$ we learned that for $g \in G$, $ord(\varphi(g))$ must divide $|G|$ and $|H|$.
So then, (in essence), what we did was look at the common factors of $|G|$ and $|H|$ and set $\varphi(x) = \gamma $ where $x$ is a generator of $G$ and $\gamma \in H$ s.t. $ord(\gamma)$ divides both $|G|$ and $|H|$.
However, I came across an example where this seemed to break-down – I was hoping for some guidance in this case.
For homomorphisms between $C_4$ and $C_2 \times C_2$, we have $|C_4| = |C_2 \times C_2| = 4$.
This implies (with our strategy above) that if $C_4 = \lbrace 1, x, x^2, x^3 \rbrace$, $x^4 = 1$ then $\varphi(x)$ can have order 1, 2 or 4.
However, the example goes on to state that we cannot set $\varphi(x)$ to have an order of 4, as it is unattainable.
Does this mean that my condition of $\varphi(x)$ dividing both $|G|$ and $|H|$ is necessary but not sufficient? For such cases (as in my example) how would I go about correctly stating all the homomorphisms under a time pressure? (i.e. is there a way for me to check, without too much calculation, that setting $\varphi(x)$ to an element with order 4 would not produce a homomorphism?)
I'm sure my mistake is somewhat elementary, any help on this would be much appreciated!
Follow up question: I don't understand why the line $\varphi_i$ is a homomorphism iff ord($\varphi_i$) divides ord(g) is true in this image Link
Yes, it's just a necessary condition.
Consider the homomorphism $\varphi\colon G\to H$ defined by $\varphi(g)=1$, for every $g\in G$. Then $\operatorname{ord}(\varphi(g))=1$, independently of $\operatorname{ord}(g)$.