While I'm studying Hungerford's algebra, I have a subtle problem, but not easy for me.
In exercise 1 in page 206, if $m$ divides $n$, then we can regard $\mathbb{Z}/m\mathbb{Z}$ as a $\mathbb{Z}/n\mathbb{Z}$-module under the usual scalar multiplication. I've solved it. But, moreover I want to verify the necessary and sufficient condition about it.
When I checked the well-definedness about the multiplication, I cannot recognize where the condition '$m$ divides $n$' was used crucially.
I want your solution or hints. Thanks in advance.
Hint:
If $M$ is an abelian group and $R$ is a ring, then a (unital) $R$-module structure on $M$ is the same information as a (unital) ring homomorphism $R\to\mathrm{End}(M)$ (a ring homomorphism $R\to S$ is unital when $1_R$ goes to $1_S$, usually this is given as a part of the definition of ring homomorphism, and an $R$-module structure on $M$ is unital when $1_Rm=m$ for any $m\in M$, which is usually given as a part of the definition of module)
Show that, considering $\mathbb{Z}/m\mathbb{Z}$ as an abelian group, $\mathrm{End}(\mathbb{Z}/m\mathbb{Z})\cong\mathbb{Z}/m\mathbb{Z}$.
Now, show that there is a unital ring homomorphism $\mathbb{Z}/n\mathbb{Z}\to\mathbb{Z}/m\mathbb{Z}$ if and only if $m\mid n$ (remember, unital means $1\in\mathbb{Z}/n\mathbb{Z}$ must go to $1\in\mathbb{Z}/m\mathbb{Z}$). (Of course, there always exists a non-unital ring homomorphism from any ring $R$ to any ring $S$, namely the map that sends everything to $0_S$.)