Are all projection maps in a categorical product epic?

Solution 1:

In an arbitrary category, it suffices to have a zero object $0$.

Consider $\pi_i\colon \prod A_j \rightarrow A_i$ and pick an index $n$. Then we have the identity morphism $\mathrm{id}_n\colon A_n\rightarrow A_n$ and to every other object $A_j$ we have the zero morphism $0_{nj}$. By the universal property of the product, we get a morphism $\rho_n\colon A_n\rightarrow \prod A_j$ with $\pi_n\circ \rho_n = \mathrm{id}_n$ and $\pi_j \circ \rho_n = 0_{nj}$ for all other $j$.

Now suppose there exists an object $X$ and $f,g\colon A_n\rightarrow X$ with $f\circ\pi_n = g\circ\pi_n$. Then

$$f\circ\pi_n\circ\rho_n = f\circ\mathrm{id}_n = f$$

and

$$g\circ\pi_n\circ\rho_n = g\circ\mathrm{id}_n = g$$

Since $f\circ\pi_n = g\circ\pi_n$, we get $f=g$.

The Wikipedia page on the product states that it is not true for arbitrary categories (without zero, therefore), but I'm not quick to find an example.

Solution 2:

There are counterexamples even in Set: for any non-empty set $X$, the projection $\emptyset \times X \to X$ is not epimorphic. Assuming the axiom of choice, in Set, all counter-examples involve the empty set.

In a universe of sets where the axiom of choice fails, there are products $\prod_\alpha X_\alpha = \emptyset$ where none of the $X_\alpha$'s are empty sets; these would also give counterexamples.

Solution 3:

By duality, the question is equivlent to: Are coproduct inclusions monic? The category of commutative rings provides many counterexamples, here $\sqcup = \otimes$ and $R \otimes 0 = 0$, so that $R \to R \otimes 0$ is not injective (unless $R=0$). A little bit more interesting, we have $\mathbb{Z}/2 \otimes \mathbb{Z}/3=0$, so that here both coproduct inclusions are not monic.

For the algebro-geometric minded reader: There are many non-empty schemes $X,Y$ such that $X \times Y = \emptyset$, so that the projections are not epic ... epic fail!