TITLE: What are all the homomorphisms between the rings $\mathbb{Z}_{18}$ and $\mathbb{Z}_{15}$?
QUESTION [9 upvotes]: Any homomorphism $φ$ between the rings $\mathbb{Z}_{18}$ and $\mathbb{Z}_{15}$ is completely defined by $φ(1)$. So from
$$0 = φ(0) = φ(18) = φ(18 \cdot 1) = 18 \cdot φ(1) = 15 \cdot φ(1) + 3 \cdot φ(1) = 3 \cdot φ(1)$$
we get that $φ(1)$ is either $5$ or $10$. But how can I prove or disprove that these two are valid homomorphisms?

REPLY [3 votes]: Continuing Akhil M's answer above (the comments under it are getting pushed down out of sight): it is also not hard to systematically find all the idempotents in ${\mathbb Z}/n$. Namely, for example with $n=pq$ with distinct primes $p,q$, $\mathbb Z/n \approx \mathbb Z/p \oplus \mathbb Z/q$, by Sun-Ze's theorem (altho' one might carp about what kind of "sum" it is). So, solving the idempotent condition $x^2=x$ mod $pq$ is equivalent to solving that equation mod $p$ and mod $q$. The integers mod a prime form a field, so we know that there are only the two solutions, the obvious ones, $0,1$. Thus, the idempotents mod $pq$ are $0$-or-$1$ mod $p$ and $0-or-1$ mod $q$. Obviously $0$ and $1$ mod $pq$ work, but/and also $0$ mod $p$ but/and $1$ mod $q$, and vice-versa. In the case at hand, both $6$ and $10$ are non-obvious idempotents.