Monomorphisms and Epimorphisms in the category of small categories

Monomorphisms are embeddings functors (i.e. functors whose both the object-function and the arrow-function are injective).

It easily seen that embeddings are monomorphisms because if $F \colon \mathbf C \to \mathbf D$ is an embedding then for every pair of fucntors $G,H \colon \mathbf X \to \mathbf C$ such that $F \circ G=F \circ H$ then

  • for every $x \in \mathbf X$ we should have $F \circ G(x)=F \circ H(x)$ and since $F$-object part is injective it would follow that $G(x)=H(x)$;

  • in exactly the same way for every $f \colon x \to x'$ in $\mathbf X$ we have that $F \circ G(f)=F\circ H(f)$ and for the injectivity of $F$-arrow part we also have that $G(f)=H(f)$;

so $G=H$.

Now let's suppose $F \colon \mathbf C \to \mathbf D$ is monomorphism.

For every object $c \in \mathbf C$ there's a unique functor $\bar x \colon 1 \to \mathbf C$ (where $1$ is the category with one object ($0$) and one arrow) such that $\bar x(0)=x$.

In similar way for every morphism $f \in \mathbf C(c,c')$ there's a unique functor $\bar f \colon 2 \to \mathbf C$ (where $2$ is the category with two objects, $0$ and $1$, and only one non identity morphism $0 \to 1$) such that $\bar f(0)=c$, $\bar f(1)=c'$ and $\bar f(0 \to 1)=f$.

Then it follows that for every pair of objects $c,c' \in \mathbf C$ if we have $F \circ \bar c(0)=F(c)=F(c')=F \circ \bar c'(0)$ then $F \circ c=F \circ c'$ and so by monomorphism property $\bar c=\bar c'$. From this follows that $$c=\bar c(0)=\bar c'(0)=c'$$ which gives the injectivity of the object part of $F$.

If $f,g \colon c \to c'$ are morphisms of $\mathbf C$ such that $F(f)=F(g)$ it can be proven similarly (using the functor $\bar f$ and $\bar g$) that $f=g$.

From this it follows that also the arrow part of $F$ is injective.

Edit I see that I didn't address the part about epimorphisms in $\mathbf{Cat}$. Let's try to make ammend.

For start it can be shown that every functor that is not sujective on objects cannot be an epimorphism. Indeed if $F \colon \mathbf C \to \mathbf D$ is not surjective we can consider the full subcategory $\mathbf D' \hookrightarrow \mathbf D$ that is spanned by the object in $\text{Im} F$. The consider the pushout of the diagram

pushout

where the morphism from $\mathbf D'$ are the embeddings. Since $F$ factors through $i \colon\mathbf D' \hookrightarrow \mathbf D$ (since it's image is contained in the full subcategory $\mathbf D'$) we have that $G \circ F = H \circ F$.

More in detail there's a functor $\mathcal F \colon \mathbf C \to \mathbf D'$ such that $F=i \circ \mathcal F$ and so

$$G \circ F = G \circ i \circ \mathcal F$$ and $$H \circ F = H \circ i \circ \mathcal F\, .$$

Since $G \circ i= H \circ i$, because of the pushout property, we have that $G \circ F=H \circ F$, nonetheless $G \ne H$.

This basically prove that epimorphism should at least be sujective on objects. Clearly this condition is not sufficient, it's easy to find counter examples.

What can be proven is that $F \colon \mathbf C \to \mathbf D$ is sujective on objects and the graph $\text{Im}F$ contains a set of morphism which are generators for the category $\mathbf D$ then this functor is an epimorphism.

By generators for the category $\mathbf D$ I mean a family of morphisms such that every other morphism in $\mathbf D$ is a composite of these morphisms.

The proof of this is no different from the analog proofs for other categories. Nontheless this is just a sufficient condition as the following example show.

Consider the category $2$ defined as above and $\bar 2$ obtained by $2$ just adding an inverse to the morphism $0 \to 1$.

The embedding $j \colon 2 \to \bar 2$ is an epimorphism since for every $G,H \colon \bar 2 \to X$ such that $G(0\to 1)=G(0 \to 1)$ have to send $1 \to 0$ in *the inverse of $G(0 \to 1)=H(0 \to 1)$.

Of course from this example it becomes clear that one can perfect the previoius said condition by proving that $F \colon \mathbf C \to \mathbf D$ is an epimorphism iff it's surjective on object and every morphism in $\mathbf D$ is a composite of morphism in $\text{Im} F$ and their inverse (if they exist).

Nonetheless I'm not aware if this is a full characterization of epimorphisms in $\mathbf{Cat}$.

Hope this helps.