TITLE: Is projection epimorphism?
QUESTION [5 upvotes]: Let $\mathscr{C}$ be category with finite product, and $A,B$ be objects of $\mathscr{C}$.
And $p: A\times B \to A$ is projection.
Now, is  $p$ epimorphism?
I think it is true, but I can’t proof. Help me, thanks.

REPLY [10 votes]: Not necessarily. For example take $C = \text{Set}$ and take $B$ to be empty (and $A$ to be non-empty).
For a more interesting example, take $C = \text{Aff} = \text{CRing}^{op}$ to be the category of affine schemes and take $A = \text{Spec } \mathbb{F}_2, B = \text{Spec } \mathbb{F}_3$; then the fiber product $A \times B \cong \text{Spec } (\mathbb{F}_2 \otimes \mathbb{F}_3) \cong \text{Spec } 0$ is empty even though $A$ and $B$ themselves aren't, and $p : \emptyset \to \text{Spec } \mathbb{F}_2$ is not an epimorphism because the dual map on commutative rings $\mathbb{F}_2 \to 0$ is not a monomorphism (monomorphisms in commutative rings are precisely the injective maps).
What is true is that if $B$ has a global point (a map $1 \to B$ where $1$ is the terminal object) then $p$ has a section and so is a split epimorphism. In particular it's an epimorphism in $\text{Set}$ for any non-empty $B$, and it's always an epimorphism in any category with a zero object (an object which is both initial and terminal), for example the category of groups.