Remark 10.3.0.3. Let $\operatorname{\mathcal{C}}$ be a category which admits pullbacks and let $f: X \rightarrow Y$ be a morphism in $\operatorname{\mathcal{C}}$. Then $f$ is an epimorphism if and only if, for every object $Z \in \operatorname{\mathcal{C}}$, the function
\[ \theta _{Z}: \operatorname{Hom}_{\operatorname{\mathcal{C}}}(Y,Z) \rightarrow \operatorname{Hom}_{\operatorname{\mathcal{C}}}(X,Z) \quad \quad g \mapsto g \circ f \]
is injective. The condition that $f$ is a regular epimorphism is (in general) stronger: it requires also that the image of $\theta _{Z}$ is the collection of morphisms $h: X \rightarrow Z$ which satisfy the identity $h \circ \pi _0 = h \circ \pi _1$; here $\pi _0$ and $\pi _1$ denote the projection maps from $X \times _{Y} X$ to $X$.