Injectivity, surjectivity and pullback diagrams

Yes, the statement about monomorphisms is true on any category. Your proof is correct.

As you said, the statement for epimorphisms is not always true. For example, in the category of Hausdorff topological spaces, let $b$ have dense image but not surjective (this is an epimorphism) and let $a$ have image contained in the complement of the image of $b$. Then the fiber product $A\times_{C}B$ is empty, so $p$ won't be an epimorphism unless $A$ was empty.

In abelian categories, pullbacks of epimorphisms are always epimorphisms. More generally, the notion you need is that of a regular category on which every epimorphism is regular (i.e. the coequalizer of some pair of morphisms). In a regular category, regular epimorphisms always pull back to regular epimorphisms by definition.

Besides abelian categories, the category of sets is also regular. Moreover, all epis of sets are regular. This explains your last remark about the category Set.


A simple condition in a category which make epimorphisms stable under pullback is the following:

In a category with a projective generator, epimorphisms are stable under pullback.

Recall that as object $Z$ is a generator if for each pair of distinct parallel morphisms $f,g:X\to Y$ there exists a morphisms $x:Z\to X$ such that $xf\neq xg$. An object $Z$ is projective if and only if for each epimorphism $e:X\to Y$ and each morphism $y:Z\to Y$ there exists a morphism $x:Z\to X$ such that $y=xe$.

This condition is fullfilled, for example:

  • in the category of sets by taking $\{\varnothing\}$ as projective generator;
  • in the cateogry of modules over a ring taking the ring itself as projective generator;
  • in the category of groups taking $\Bbb Z$ as projective generator.

proof. The proof of this fact follows at once by noting that given a projective generator $Z$, a morphism $f:X\to Y$ is an epimorphisms if and only if for all $y:Z\to Y$ there exists $x:Z\to X$ such that $y=xf$.

The only if part is follows since $Z$ is projective. For the if part follows arguing by contradiction: if $f$ is not an epimorphism, then there exists a pair of distinct parallel arrows $u,v:Y\to W$ such that $fu=fv$.

enter image description here

Since $Z$ is a generator, there exists $y:Z\to Y$ such that $yu\neq yv$. Let $x:Z\to X$ such that $xf=y$. Then $$yu=xfu=xfv=yv$$ a contradiction.

Now consider the pullback square below. We claim that $q$ is epic. Let $y:Z\to B$. Then $yb:Z\to C$ and since $a$ is epic, there exists $x:Z\to A$ such that $yb=xa$. Since the square is a pullback, there exists $z:Z\to P$ such that $y=zq$.

enter image description here