[Math] The inclusion of $\mathbb{Z}\to\mathbb{Q}$ is not an epimorphism

epimorphismsring-theory

I have to prove this only in basic ring theory, I have read something in category theory, but its too complex for me at the moment.
The definition of epimorphism that I have is that the function can cancel other functions by the right side, i.e. let $f:X\to Y; g_1,g_2:Y\to Z$ if $g_1\circ f=g_2\circ f \Rightarrow g_1=g_2$.
By the point of the course, we have already proof that any homomorphism is a monomorphism if and only if it is injective.
Clearly, the inclusion function is mono (i.e. injective) but is not surjective.
I need to prove that it isn't an epimorphism either.

Best Answer

The inclusion is an epimorphism, since if $f\colon\mathbb{Q}\to R$ is a unital ring morphism, and $a/b\in\mathbb{Q}$ with $a,b\in\mathbb{Z}$, then $$f(a/b)=f(a)f(b^{-1})=f(a)f(b)^{-1}.$$

So $f$ is determined by its values on $\mathbb{Z}$, which is to say the inclusion $\iota\colon\mathbb{Z}\to\mathbb{Q}$ is right-cancellative, since $f\circ\iota$ is effectively the restriction of $f$ to $\mathbb{Z}$.