Monics and epics

Given a category we define a monic mm as:

BmAXf,gBmf=mg    f=gB \xrightarrow{m} A \\ X \xrightarrow {f, g} B \\ m \circ f = m \circ g \implies f = g

and an epic ee as:

AeBBf,gXfe=ge    f=gA \xrightarrow {e} B \\ B \xrightarrow {f, g} X \\ f \circ e = g \circ e \implies f = g

where ff and gg are parallel morphisms. Note that since I don't have fancier LaTeX at my disposal I'm separating the two morphisms ff and gg by a comma which should be interpreted as two separate morphisms (arrows) between the two objects.

Here's a picture:

To make the idea more familiar let's consider the category SetSet which is the category of structured sets and total functions between those sets.

If mm is injective as a function then it is monic as a morphism (also called a monomorphism).

Similarly if ee is surjective as a function then it is epic as a morphism (also called an epimorphism).

There is a one-to-one correspondence between the two relations when considering the category SetSet and the "real" set but in general this does not hold for arbitrary categories.