Finding All Ring Homomorphisms from $\Bbb Z_m$ to $\Bbb Z_n$

I was working through Abstract Algebra : A Geometric Approach (by Theodore Shifrin) and I came across this exercise that I am struggling with.

($$ℤ_m$$ means integers mod m)

Find All Ring Homomorphisms:

$$ϕ:ℤ_m \longrightarrow ℤ_n$$ (your answer will depend on the relationship between m and n).

Here is what I have so far:

If $$\gcd(m,n) = 1$$:

then the only homomorphism is trivial: $$ϕ(x) = 0$$

If $$m < n$$, then:

$$ϕ(0) = 0\;$$ and $$\;ϕ(x) = k$$ , such that $$k^2 ≡ k\pmod n$$ and $$2k ≡ 0\pmod n$$.

I'm not sure how much of this is correct, or what to do in the case m>n.

Any help would be greatly appreciated!

• In any of these rings, once you know $f(1)$, you know the entire homomorphism $f$. (That's because $k=\sum_{i=1}^k 1$, so $f(k) = \sum_{i=1}^k f(1)$.) So what are the possibilities for $f(1)$? – Robert Shore Apr 9 at 22:02
• wouldn't the possible values for $f(1)$ be $0,...,n-1$ ? I am confused as to how this will help find a generalization – Scott B. Apr 9 at 22:17
• Not all of those values are possible because $m=0 \Rightarrow mf(1)=0$. – Robert Shore Apr 9 at 22:22
• I don't know what $x$ means in your formula. You should think about two cases: $m<n$ and $m>n$, and divisibility will be crucial. Remember that the definition I take in the text requires a ring homomorphism $\phi\colon R\to S$ to map $1_R$ to $1_S$. – Ted Shifrin Apr 13 at 18:21