Every ring homomorphism to the integers is surjective

abstract-algebracommutative-algebraring-theory

Let $R \neq 0$ be a commutative, unital ring and $f: R \to \mathbb{Z}$ be a ring homomorphism.

Does this force $f$ to be surjective?

Attempt of Proof:
By the universal property of $\mathbb{Z}$, there is a unique ring homomorphism $g: \mathbb{Z} \to R$. But then $f \circ g: \mathbb{Z} \to \mathbb{Z}$ is the unique ring homomorphism which is already given by $id: \mathbb{Z} \to \mathbb{Z}$. Thus $f \circ g = id$ and therefore $f$ must be surjective.

Does this proof hold? It seems weird that I can nowhere find this result…

Best Answer

The image of a ring homomorphism (preserving $1$) is a subring of the codomain.

Since the only subring of $\mathbb{Z}$ is $\mathbb{Z}$ itself, the statement is proved.

The same is true for ring homomorphisms to $\mathbb{Z}/n\mathbb{Z}$.

Your proof is good as well, but overkill.