What’s a subset? That’s easy: if we have two sets A and B, A is a subset of B if every member of A is also a member of B.

We can take the same basic idea, and apply it to something which a tad more structure, to get subgroups. What’s a subgroup? If we have two groups A and B, and the values in group A are a subset of the values in group B, then A is a subgroup of B.

The point of category theory is to take concepts like “subset” and generalize them so that we can apply the same idea in many different domains. In category theory, we don’t ask “what’s a subset?”. We ask, for any structured THING, what does it mean to be a sub-THING? We’re being very general here, and that’s always a bit tricky. We’ll start by building a basic construction, and look at it in terms of sets and subsets, where we already understand the specific concept.

In terms of sets, the most generic way of defining subsets is using functions. Suppose we have a set, A. How can we define all of the subsets of A, *in terms of functions*? We can do it using injective functions, as follows. (As a reminder, a function from X to Y where every value in X is mapped to a *distinct* function in y.)

For the set, A, we can take the set of *all* injective functions *to* A. We’ll call that set of functions **Inj**(A).

Given **Inj**(A), we can define equivalence classes over **Inj**(A), so that and are equivalent if there is an isomorphism between X and Y.

The domain of each function in one of the equivalence classes in **Inj**(A) is a function isomorphic to a subset of A. So each equivalence class of injective functions defines a subset of A.

And there we go: we’ve got a very abstract definition of subsets.

Now we can take that, and generalize that function-based definition to categories, so that it can define a sub-object of any kind of object that can be represented in a category.

Before we jump in, let me review one important definition from before; the monomorphism, or monic arrow.

A *monic arrow* is an arrow such that

in end up at the same object only if they are the same.)

So, basically, the monic arrow is the category theoretic version of an injective function. We’ve taken the idea of what an injective function means, in terms of how functions compose, and when we generalized it, the result is the monic arrow.

Suppose we have a category , and an object . If there are are two monic arrows and , and

there is an arrow such that , then we say (read “f factors through g”). Now, we can take that “≤” relation, and use it to define an equivalence class of morphisms using .

What we wind up with using that equivalence relation is a set of equivalence classes of monomorphisms pointing at A. Each of those equivalence classes of morphisms defines a subobject of A. (Within the equivalence classes are objects which have isomorphisms, so the sources of those arrows are equivalent with respect to this relation.) A subobject of A is the sources of an arrow in one of those equivalence classes.

It’s exactly the same thing as the function-based definition of sets. We’ve created a very general concept of sub-THING, which works exactly the same way as sub-sets, but can be applied to any category-theoretic structure.

John Armstrong“f and g are equivalent if there is an isomorphism between X and Y” THAT MAKES THE TRIANGLE COMMUTE

In Set:

A = {a,b}

X = {x}

Y = {y}

f(x)=a

g(y)=b

X and Y are isomorphic, but these do not represent equivalent subsets.

And down at the bottom, you can always define subobjects to be (equivalence classes of) monics, but not every category-theoretic structure has “enough monics” (this is a technical term) for this definition to mean anything useful.

Michael ChermsideMinor edit: “where every value in X is mapped to a distinct function in y” should read “where every value in X is mapped to a distinct *value* in *Y*”.