Let $f:R\rightarrow S$ be a ring homomorphism. Prove or disprove: if $f$ is onto and $R$ is an integral domain, then $S$ is an integral domain

Let $f:R\rightarrow S$ be a ring homomorphism. Prove or disprove: if $f$ is onto and $R$ is an integral domain, then $S$ is an integral domain.

My attempt: Suppose $s_1s_2=0$ for $s_1,s_2\in S$. Since $f$ is surjective, we know $\exists r_1,r_2$ $\in R$ such that $f(r_1)=s_1$ and $f(r_2)=s_2$. Then,

$0=s_1s_2=f(r_1)f(r_2)=f(r_1r_2)\implies r_1r_2=0$. Since $R$ is an integral domain, $r_1=0$ or $r_2=0$, so either $s_1=f(0)=0$ or $s_2=f(0)=0$, showing $S$ is an integral domain.

Is this a correct line of reasoning? I'm also imagining a counterexample where you map $\mathbb{Z}$ into $\mathbb{Z}/10\mathbb{Z}$ by $f(x)=x\mod{10}$, since $\mathbb{Z}$ is an integral domain, but $\mathbb{Z}/10\mathbb{Z}$ is not.

Any help appreciated!

• Why do you think that $\;f(r_1r_2)=0\;$ implies $\;r_1r_2=0\;$ ? This would be true if $\;f\;$ is 1-1, say....but why in this case? – DonAntonio Mar 25 '17 at 20:48

$$f:\Bbb Z\to \Bbb Z/10\Bbb Z\;,\;\;f(x)=x\pmod{10}$$
Let $R$ be an integral domain and suppose $I$ is an ideal of $R$ that is not prime. Define $f: R \to R/I$ to be the usual quotient map $f(r) = r + I$. Then $f$ is onto, but $R/I$ is not an integral domain ($R/I$ is an integral domain iff $I$ is a prime ideal).