Simple question (I seem have asked a few like this...)
What is $\mbox{Hom}(\mathbb{Z}/2,\mathbb{Z}/n)$? (for $n \ne 2$)
Simple question (I seem have asked a few like this...)
What is $\mbox{Hom}(\mathbb{Z}/2,\mathbb{Z}/n)$? (for $n \ne 2$)
If $f:G\rightarrow H$ is a group homomorphism, then $\text{ord}(f(g))\mid\text{ord}(g)$ for all $g\in G$ because $g^n=e_G$ implies $f(g)^n=f(g^n)=f(e_G)=e_H$.
Thus, if $f:\mathbb{Z}/(2)\rightarrow H$ is a homomorphism, we know that $f(0+(2))=e_H$ because $f$ is a homomorphism, and $f(1+(2))$ must be an element of order dividing 2 in $H$. In fact, given any element $h\in H$ of order dividing 2, we can define a homomorphism $f:\mathbb{Z}/(2)\rightarrow H$ by $f(0+(2))=e_H$ and $f(1+(2))=h$.
Thus, for any group $H$, the homomorphisms $f:\mathbb{Z}/(2)\rightarrow H$ are in bijection with the elements of order dividing 2 in $H$. These are the elements of order 2, along with the identity $e_H$ (which is the only element of order 1, obviously). This explains Theo's suggestion above.
Hint: An element $a+(n)$ of $\mathbb{Z}/(n)$ is of order 2 when $a+(n)\neq 0+(n)$, but $2(a+(n))=2a+(n)=0+(n),$ or in other words, $a\not\equiv0\bmod n$ but $2a\equiv 0\bmod n.$ For which $n$ does such an $a$ exist?
More generally $\operatorname{Hom}{(\mathbb{Z}/m,\mathbb{Z}/n)}$ is cyclic of order $\operatorname{gcd}(m,n)$. I strongly recommend you to try to prove this on your own. In case of emergency, google for hom z nz z mz
.
Try to find the neccessary condition for such a homomorphism first.
If f is a homomorphism from Z/2 to Z/n then clearly f maps the zero element of Z/2 to the zero element of Z/n. Can it map 1 to an arbitrary element of Z/n? No, the mapping should be such that f is a homomorphism. Assuming it is, and $f(1) = x$, clearly $0 = f(0) = f(1+1) = f(1) + f(1) = x + x$ should hold, following which $2x = 0$ in Z/n. So this is a neccessary condition.
It is easy to see that this condition is sufficient as well. So the homomorphisms may be counted in number by counting all such x. This amounts to counting all solutions to the congruence $2x = 0$ in Z/n.
Clearly as $gcd(2,n)|0$ so solutions always exist and they will be gcd(2,n) (which may be either 1 or 2, depending upon whether n is odd or even repectively) in number. So Hom(Z/2,Z/n) will have either 1 or 2 elements. In either case, it will be cyclic because all groups of order 1 and 2 are.