# The Language of Category Theory (Part I)

So, since Sanath (S.D) already has quite a few posts about higher category theory, I figured someone should probably stop and introduce the notion of category theory. In the 1940’s Eilenberg and Lane introduced the notion of categories and functors as a means of studying algebraic topology. Since then, the language of category theory has found applications in various fields of mathematics, including commutative algebra, algebraic geometry, algebraic topology, and even computer science.

What is a Category?

Before formally introducing the notion of a category, I’d like to give an analogy explaining categories. Suppose I consider the set of all people currently living on earth. I’ll pair these people off by bloodline relationships that I’ll call “morphisms”. So, there’s a morphism $m$ mapping you to your biological mother, a morphism $f$ mapping your biological mother to your biological father, and so on. We can take compositions of these mappings. So, $f \circ m$ maps you to your biological father. Also, these relationships are associative and there exists a morphism $1_s$ that maps you to yourself. Now, take the set of all car brands on this earth. I again have morphisms relating these cars to each other. Say, I map a car brand to a brand that was created before it (chronologically speaking). So, maybe I have the morphism $c$ that takes Lamborghinis to Ferraris. Composition and associativity also hold here, as well as the existence of an identity morphism.

Now, let’s call the collection of all people and bloodline “morphisms” the category $\mathscr{C}_{peo}$ and the collection of all car brands and “morphisms” between them the category $\mathscr{C}_{car}$. We’d like to have a mapping $F: \mathscr{C}_{peo} \to \mathscr{C}_{car}$. But how do we define such a mapping? Well, let’s define a mapping that takes you to a Lamborghini and your mother to a Ferrari. Let’s also say that $F(m) = c$. That is, $F$ takes the morphism between you and your mother to the morphism between the Lamborghini and Ferrari. This is natural, as we’re just mapping people to cars and maps between people to maps between cars. This mapping $F$ is called a Covariant Functor.

We’re now ready to formally introduce a category:

Definition 1: A category $\mathscr{C}$ is a collection consisting of:

• “Objects” denoted by $ob(\mathscr{C})$.
• For any two objects, $X,Y \in ob(\mathscr{C})$ there exists a set of morphisms between them, $\text{Hom}_{\mathscr{C}} (X,Y)$. (i.e. $f \in \text{Hom}_{\mathscr{C}} (X,Y)$) means $f: X \to Y$).
• Compositions of morphisms $\circ$ is well defined. That is, if $f \in \text{Hom}_\mathscr{C} (X,Y)$ and $g \in \text{Hom}_\mathscr{C} (Y,Z)$, then $g \circ f \in \text{Hom}_\mathscr{C} (X,Z)$. In other words, $\circ: \text{Hom}_\mathscr{C} (X,Y) \times \text{Hom}_\mathscr{C} (Y,Z) \to \text{Hom}_\mathscr{C} (X,Z)$ taking $\circ: (g,f) \mapsto g \circ f$.
• For each object $X \in ob(\mathscr{C})$, there exists an identity morphism $1_X : X \to X$. (i.e. $1_X \in \text{Hom}_{\mathscr{C}}(X,X)$.)
• The composition law is unital and associative. Explicitly, this means that, if $f \in \text{Hom}_{\mathscr{C}} (X,Y)$ then $1_Y \circ f = f \circ 1_X \in \text{Hom}_{\mathscr{C}} (X,Y)$. Moreover, if we have two other morphisms $g \in \text{Hom}_{\mathscr{C}} (Y,Z)$ and $h \in \text{Hom}_{\mathscr{C}} (Z,W)$, then $(h \circ g) \circ f = h \circ (g \circ f)$.

Notice that this is simply a formalization of the example given above, and the notion of an object is just an abstract sense of the word. Now that we have a formal definition, it would be cool to have some formal examples, yeah?

Here are a few simple examples:

• $\mathscr{C} = \mathbf{Grps}$ where the objects $X$ are entire groups, so our morphisms are just homomorphisms.
• $\mathscr{C} = \mathbf{Top}$ where the objects are topological spaces, and the morphisms are continuous (with respect to the topology in each space) mappings.
• $\mathscr{C} = \mathbf{Vect}_{\mathbb{K}}$ where the objects are vector spaces over a field $\mathbb{K}$ and the morphisms are linear maps.
• $\mathscr{C} = \mathbf{Sets}$ where the objects are sets and the morphisms are functions in the usual sense.

It should be noted that in these examples, the collection of objects need not form a set. For example, the collection of all topological spaces does not form set. Another (ironic) example is that the collection of objects in $\mathbf{Sets}$ does not form a set. We say that a category is small if the objects in a category form a set. For example, the first example of the people on earth is a small category.

An interesting (although highly unnecessary) formalization of a single finite group as a category. Let $G$ be a finite group. Then we may represent $G$ as a (small) category with a single formal object $\hat{X}$, with morphisms $g \in G$ so that $g: \hat{X} \to \hat{X}$. So what we’re doing here is sort of odd. We’re letting $\hat{X}$ be a “dummy” object, and letting the “morphisms” be the elements of the group, all acting as identity morphisms on our dummy object. Thus, composition of morphisms in this case is just group multiplication.

It should be noted that the language of category theory is a sort of “meta-language” in the sense that nothing in the language of categories allows for one to discuss the properties within objects. For example, a topological space $X \in ob(\mathbf{Top})$ is simply this: the shell of a topological space. Doing category theory is like manipulating planets in the universe without ever seeing the surface of the planets. However, for $X \in ob(\mathbf{Top})$, we may identify the “points” of $X$ with the mappings from one point topological spaces $*$ into $X$. That is, we write $|X| = \text{Hom}_{\mathbf{Top}}(*,X)$.

Another example of this is the category $\mathbf{Ab}$, of abelian groups with morphisms as homomorphisms. We can use only the objects and morphisms of this category to recover the elements of an abelian group $G \in ob(\mathbf{Ab})$ with the Hom-set $|G| = \text{Hom}_\mathbf{Ab} (\mathbb{Z},G)$ and seeing where $1 \in \mathbb{Z}$ maps. This makes sense since, obviously, $\mathbb{Z} \in ob(\mathbf{Ab})$

In mathematics, there’s a common trend with the word “sub”. We take a subset of something, and impose the structure of the larger entity and obtain the notion of a “sub-thing”. As usual, we have the notion of a subcategory.

We call $\mathscr{C}$ a subcategory of $\mathscr{D}$ if

• $ob( \mathscr{C}) \subset ob(\mathscr{D})$
• for $X,Y \in ob(\mathscr{C}) \subset ob(\mathscr{D})$ we have $\text{Hom}_\mathscr{C} (X,Y) \subset \text{Hom}_\mathscr{D} (X,Y)$ with composition of the morphisms in $\mathscr{C}$ induced from $\mathscr{D}$.

We call $\mathscr{C}$full subcategory if, for $X,Y \in ob(\mathscr{C})$, $\text{Hom}_\mathscr{C} (X,Y) = \text{Hom}_\mathscr{D} (X,Y)$.

For example, the category $\mathbf{Ab}$ is a subcategory of $\mathbf{Grps}$. (Verify this quickly).

We should note that in categories, there is no notion of “equivalence” of objects (except for the morphism $1_X$) so it is meaningless to write $X = Y$ for $X,Y \in ob(\mathscr{C})$. What we do have is the notion of an isomorphism. In abstract algebra, the notion of an isomorphism is simply a bijection that preserves the group structure (i.e. the binary operation). Though, in, say, a topological space, we need the morphism to be continuous and preserve the topology of the spaces (i.e. a homeomorphism). Thus, we need a uniform notion that acts as the “isomorphism” in each space. Luckily, these notions all have something in common: when you map “isomorphically” between objects, and take the inverse isomorphism, you get the “identity” morphism on that object. Formally,

We call $f \in \text{Hom}_\mathscr{C}(X,Y)$ an isomorphism (with inverse $g \in \text{Hom}_\mathscr{C}(Y,X)$) if $g \circ f = 1_X$ and $f \circ g = 1_Y$.

In category theory, if two objects are isomorphic, then there is a bijection between the Hom-sets containing each. For example, if $X \simeq Y$ then there is a bijection $\alpha: \text{Hom}_\mathscr{C} (Z,X) \to \text{Hom}_\mathscr{C} (Z,Y)$ as well as a bijection $\beta: \text{Hom}_\mathscr{C} (X,Z) \to \text{Hom}_\mathscr{C} (Y,Z)$. The notion of an isomorphism motivates the definition of a groupoid. A groupoid is simply a category in which all morphisms are isomorphisms. For example, in a groupoid $\mathscr{C}_g$, the one object Hom-sets are groups. That is, for $X \in ob(\mathscr{C}_g)$, $\text{Hom}_{\mathscr{C}_g}(X,X)$ is group. (check this, though it’s straightforward. )

I’ll stop here for now, and end with just a little teaser of what’s to come. Well, in the informal example, we had a mapping $F: \mathscr{C}_{peo} \to \mathscr{C}_{car}$. This is formally known as a functor, or a mapping between categories. In the next post I’ll introduce the notion of a functor and discuss their properties.

Cheers,

J.T.