This post is mainly mathematical. We left it out of our introduction to categories for brevity, but we should lay these definitions down and some examples before continuing on to universal properties and doing more computation. The reader should feel free to skip this post and return to it later when the words “isomorphism,” “monomorphism,” and “epimorphism” come up again. Perhaps the most important part of this post is the description of an isomorphism.

## Isomorphisms, Monomorphisms, and Epimorphisms

Perhaps the most important paradigm shift in category theory is the focus on morphisms as the main object of study. In particular, category theory stipulates that the only knowledge one can gain about an object is in how it relates to other objects. Indeed, this is true in nearly all fields of mathematics: in groups we consider all isomorphic groups to be the same. In topology, homeomorphic spaces are not distinguished. The list goes on. The only way to do determine if two objects are “the same” is by finding a morphism with special properties. Barry Mazur gives a more colorful explanation by considering the meaning of the number 5 in his essay, “When is one thing equal to some other thing?” The point is that categories, more than existing to be a “foundation” for all mathematics as a formal system (though people are working to make such a formal system), exist primarily to “capture the essence” of mathematical discourse, as Mazur puts it. A category defines objects and morphisms, but literally *all* of the structure of a category lies in its morphisms. And so we study them.

The strongest kind of morphism we can consider is an *isomorphism*. An isomorphism is the way we say two objects in a category are “the same.” We don’t usually care whether two objects are equal, but rather whether some construction is unique up to isomorphism (more on that when we talk of universal properties). The choices made in defining morphisms in a particular category allow us to strengthen or weaken this idea of “sameness.”

**Definition: **A morphism in a category is an *isomorphism *if there exists a morphism so that both ways to compose and give the identity morphisms on the respective objects. That is,

and .

The most basic (usually obvious, but sometimes very deep) question in approaching a new category is to ask what the isomorphisms are. Let us do this now.

In the morphisms are set-functions, and it is not hard to see that any two sets of equal cardinality have a bijection between them. As all bijections have two-sided inverses, two objects in are isomorphic if and only if they have the same cardinality. For example, all sets of size 10 are isomorphic. This is quite a weak notion of “sameness.” In contrast, there is a wealth of examples of groups of equal cardinality which are not isomorphic (the smallest example has cardinality 4). On the other end of the spectrum, a poset category has no isomorphisms except for the identity morphisms. The poset categories still have useful structure, but (as with objects within a category) the interesting structure is in how a poset category relates to *other categories*. This will become clearer later when we look at functors, but we just want to dissuade the reader from ruling out poset categories as uninteresting due to a lack of interesting morphisms.

Consider the category of ML types with ML functions as morphisms. An isomorphism in this category would be a function which has a two-sided inverse. Can the reader think of such a function?

Let us now move on to other, weaker properties of morphisms.

**Definition: **A morphism is a *monomorphism *if for every object and every pair of morphisms the condition implies .

The reader should parse this notation carefully, but truly think of it in terms of the following commutative diagram:

Whenever this diagram commutes and is a monomorphism, then we conclude (by definition) that . Remember that a diagram *commuting* just means that all ways to compose morphisms (and arrive at morphisms with matching sources and targets) result in an identical morphism. In this diagram, commuting is the equivalent of claiming that , since there are only two nontrivial ways to compose.

The idea is that monomorphisms allow one to “cancel” from the left side of a composition (although, confusingly, this means the cancelled part is on the *right* hand side of the diagram).

The corresponding property for cancelling on the right is defined identically.

**Definition: **A morphism is an *epimorphism* if for every object and every pair of morphism the condition implies .

Again, the relevant diagram.

Whenever is an epimorphism and this diagram commutes, we can conclude .

Now one of the simplest things one can do when considering a category is to identify the monomorphisms and epimorphisms. Let’s do this for a few important examples.

## Monos and Epis in Various Categories

In the category , monomorphisms and epimorphisms correspond to injective and surjective functions, respectively. Lets see why this is the case for monomorphisms. Recall that an injective function has the property that implies . With this property we can show is a monomorphism because if then the injective property gives us immediately that . Conversely, if is a monomorphism and , we will construct a set and two convenient functions to help us show that . In particular, pick to be the one point set , and define . Then *as functions* . Indeed, there is only one value in the domain, so saying this amounts to saying , which we know is true by assumption. By the monomorphism property , so .

Now consider epimorphisms. It is clear that a surjective map is an epimorphism, but the converse is a bit trickier. We prove by contraposition. Instead of now picking the “one-point set,” for our , we must choose something which is one element *bigger* than . In particular, define , where is with one additional point added (which we declare to not already be in ). Then if is not surjective, and there is some which is missed by , we define and otherwise. We can also define to be the identity on , so that , but . So epimorphisms are exactly the surjective set-maps.

There is one additional fact that makes the category of sets well-behaved: a morphism in is an isomorphism if and only if it is both a monomorphism and an epimorphism. Indeed, isomorphisms are set-functions with two-sided inverses (bijections) and we know from classical set theory that bijections are exactly the simultaneous injections and surjections. A warning to the reader: not all categories are like this! We will see in a moment an example of a nontrivial category in which isomorphisms are not the same thing as simultaneous monomorphisms and epimorphisms.

The category is very similar to in regards to monomorphisms and epimorphisms. The former are simply injective group homomorphisms, while the latter are surjective group homomorphisms. And again, a morphisms is an isomorphism if and only if it is both a monomorphism and an epimorphism. We invite the reader to peruse the details of the argument above and adapt it to the case of groups. In both cases, the hard decision is in choosing when necessary. For monomorphisms, the “one-point group” does not work because we are constrained to send the identity to the identity in any group homomorphism. The fortuitous reader will avert their eyes and think about which group would work, and otherwise we suggest trying . After completing the proof, the reader will see that the trick is to find a for which only one “choice” can be made. For epimorphisms, the required is a bit more complex, but we invite the reader to attempt a proof to see the difficulties involved.

Why do these categories have the same properties but they are acquired in such different ways? It turns out that although these proofs seem different in execution, they are the same in nature, and they follow from properties of the category as a whole. In particular, the “one-point object” (a singleton set for and for ) is more categorically defined as the “free object on one generator.” We will discuss this more when we get to universal properties, but a “free object on generators” is roughly speaking an object for which any morphism with source must make exactly “choices” in its definition. With sets that means choices for the images of elements, for groups that means consistent choices for images of group elements. On the epimorphism side, the construction is a sort of “disjoint union object” which is correctly termed a “coproduct.” But momentarily putting aside all of this new and confusing terminology, let us see some more examples of morphisms in various categories.

Our recent primer on rings was well-timed, because the category of rings (with identity) is an example of a not-so-well-behaved category. As with sets and groups, we do have that monomorphisms are equivalent to injective ring homomorphisms, but the argument is trickier than it was for groups. It is not obvious which “convenient” object to choose here, since maps yield no choices: 1 maps to 1, 0 maps to 0, and the properties of a ring homomorphism determine everything else (in fact, the abelian group structure and the fact that units are preserved is enough). This makes into what’s called an “initial object” in ; more on that when we study universal properties. In fact, we invite the reader to return to this post after we talk about the universal property of polynomial rings. It turns out that is a suitable choice for , and the “choice” made is where to send the indeterminate .

On the other hand, things go awry when trying to apply analogous arguments to epimorphisms. While it is true that every surjective ring homomorphism is an epimorphism (it is already an epimorphism in , and the argument there applies), there are ring epimorphisms which are *not* surjections! Consider the inclusion map of rings . The map is not surjective, but it is an epimorphism. Suppose are two parallel ring morphisms, and they agree on (they will always do so, since there is only one ring homomorphism ). Then must also agree on , because if with , then

Because the map above is also an injection, the category of rings is a very naturally occurring example of a category which has morphisms that are both epimorphisms and monomorphisms, but not isomorphisms.

There are instances in which monomorphisms and epimorphisms are trivial. Take, for instance any poset category. There is at most one morphism between any two objects, and so the conditions for an epimorphism and monomorphism vacuously hold. This is an extreme example of a time when simultaneous monomorphisms and epimorphisms are not the same thing as isomorphisms! The only isomorphisms in a poset category are the identity morphisms.

## Morals about Good and Bad Categories

The inspection of epimorphisms and monomorphisms is an important step in the analysis of a category. It gives one insight into how “well-behaved” the category is, and picks out the objects which are special either for their useful properties or confounding trickery.

This reminds us of a quote of Alexander Grothendieck, one of the immortal gods of mathematics who popularized the use of categories in mainstream mathematics.

A good category containing some bad objects is preferable to a bad category containing only good objects.

I suppose the thesis here is that the having only “good” objects yields less interesting and useful structure, and that one should be willing to put up with the bad objects in order to have access to that structure.

Next time we’ll jump into a discussion of universal properties, and start constructing some programs to prove that various objects satisfy them.

Until then!

There is something I don’t understand. If homo-, epi-, and isomorphisms are the closest thing to equality that is used in categories, what does the “=” mean in the definitions then? It seems to be used always on morphisms, how is equality between them defined then?

LikeLike

The concept of an isomorphism is the only thing that replaces equality, and we have to be clear here: isomorphism is the best concept of equality we have for objects. Morphisms, on the other hand, are just elements of sets, so equality is what you think it is (on the other hand, computing equality of morphisms is difficult or impossible for most categories).

One can also call two objects “equal,” and it still means what you think it does (as in they are identically the same thing). The point is that equality is far too strict a condition to be useful. For instance, in the category of types (in your favorite programming language) there could conceivably be a type for Big-Endian integers and Little-Endian integers. They would be isomorphic as types (there is an obvious isomorphism between them), but not *equal* as types. This makes things awkward if we want to think of “integers” as a unique type.

One of the major paradigm shifts of category theory is to accomodate this: all of the constructions we will define in category theory are only unique up to isomorphism. As such, by saying isomorphism is the best replacement for equality, I don’t mean “closest to equality” but rather “most appropriate.”

LikeLike

Hey Jeremy,

I think you have a few small typos above. In your paragraph beginning with “Why do these categories have the same properties but they are acquired in such different ways?”, you have some LaTeX that went awry.

Later, when talking about the category of rings, you had “There are ring epimorphisms which are not isomorphisms!” I believe you meant they are not surjections 🙂

I think it also bears mentioning that not all epic monos are isos. That fact really surprised me (and bothered me a bit) when I first learned it!

Regarding poset categories, I think you can make a very general statement about “boring things” in mathematics. Boring things are often very useful as sanity checks. If a statement fails for the boring things, then it surely can’t hold for more interesting ones 🙂 (And in this particular case, you can use any poset category to prove that the existence of a non-iso epimono).

Keep up the good work. This is a nice-looking primer series so far 🙂

LikeLike

Thanks for the tips. I mentioned that there are epis and monos that are not isos (I said this for posets and the example Z -> Q).

I think that poset categories are extremely useful not so much as being nice counterexamples (though you pointed out that they are and I wholeheartedly agree with the sentiment) but in how they are used to build more complicated constructions. For instance, in computational topology an A-persistence object is a functor from a poset category A to a category B, and if A and B satisfy some mild properties then the category of A-persistence objects (for a fixed B) is an abelian category. Also, though I believe most people in denotational semantics don’t phrase things in categorical terms, domains and Scott domains are poset categories with some extra properties (e.g. having limits, though I can’t remember the others off the top of my head).

Thanks for reading!

LikeLike