Is the map into the terminal object an epimorphism?

Let $C$ be a category with a terminal object $1$. Is the unique arrow from an object into $1$ necessarily an epimorphism? If not, is it an epimorphism if $C$ is a topos?


No to both. Let $\mathcal{C}$ be the topos $\mathbf{Set} \times \mathbf{Set}$ and consider the object $(\emptyset, 1)$; the terminal object in $\mathbf{Set} \times \mathbf{Set}$ is $(1, 1)$, but the unique morphism $(\emptyset, 1) \to (1, 1)$ is not an epimorphism. Note $(\emptyset, 1)$ is not an initial object either; if you allow that, then we have a counterexample even in $\mathbf{Set}$: the unique map $\emptyset \to 1$ is not a surjection.


By duality, your question is equivalent to: Is every morphism from the initial object a monomorphism? No, for example in $\mathsf{CRing}$ with initial object $\mathbb{Z}$ this holds only for rings of characteristic $0$.