# Category Theory

In many of the previous posts on this blog, we have seen that whenever there is some special property on our sets, then there are special kinds of functions between these sets that in some way “respect” this special property. For example, for topological spaces (see Basics of Topology and Continuous Functions), there are special kinds of functions called continuous functions that in some way respect the topology. Similarly, for vector spaces and modules (see Vector Spaces, Modules, and Linear Algebra), there are special kinds of functions between them called linear transformations that respect the closure under addition and scalar multiplication.

For groups, we also have the concept of a homomorphism (not to be confused with the concept of a homeomorphism in topology), which is a function $f$ between groups such that whenever $ab=c$ in the domain it is guaranteed that $f(a)f(b)=f(c)$ in the range. A homomorphism is therefore a function between groups that respects the law of composition of the groups.

We now introduce in this post a kind of “language” that expresses these ideas in a neat way, with a mechanism that allows us to relate two different kinds of these special sets; this is useful, for example in algebraic topology, where we study topological spaces using groups. Information about topological spaces are reflected as information about groups.

In Homotopy Theory, we learned about the fundamental group of a space, formed by looking at loops starting and ending at a chosen basepoint, and identifying loops that can be deformed into one another under an equivalence relation. For a circle, the fundamental group is the abelian group of integers under addition, which intuitively corresponds to the number of times a loop winds around the circle taking into account the direction (clockwise or counterclockwise).

We now consider a torus. We can think of a torus as being constructed by “gluing” circles to every point of some other “base” circle. We can refer to these circles that are being glued to the “base” circle as the “fiber” circles. Thus the points of the torus can be specified by giving a pair of numbers, one referring to a coordinate of a point of the “base” circle, and the other a coordinate of a point of the “fiber” circle at that point on the base. More formally, we refer to the torus $T^{2}$ as the Cartesian product $S^{1}\times S^{1}$ of two circles.

The fundamental group of the torus is given by the set of ordered pairs of integers, one corresponding to the number of times a loop winds around the “body” of the torus, and the other corresponding to the number of times this same loop winds around the “hole” of the torus, once again taking into account the direction. The pair of integers can then be given a group structure by addition “componentwise”. This group of pairs of integers is an example of a direct product of groups and is written $\mathbb{Z}\times \mathbb{Z}$ (Since the groups involved are all abelian, this is also sometimes referred to as an example of a direct sum and written $\mathbb{Z}\oplus \mathbb{Z}$).

That the torus is a Cartesian product of two circles and its fundamental group is a direct product of two copies of the fundamental groups of the circle is an example of how information about topological spaces is reflected as information about groups.

We now introduce the language of category theory. We quote from the book Sheaves in Geometry and Logic: A First Introduction to Topos Theory by Saunders Mac Lane and Ieke Moerdijk:

A category $\mathbf{C}$ consists of a collection of objects (often denoted by capital letters, $A, B, C, ..., X, ...$) a collection of morphisms (or maps or arrows) ($f, g, ...$), and four operations; two of the operations associate with each morphism $f$ of $\mathbf{C}$ its domain $\text{dom}(f)$ or $\text{d}_{0}(f)$ and its codomain  $\text{cod}(f)$ or $\text{d}_{1}(f)$, respectively, both of which are objects of $\mathbf{C}$. One writes $f: C\rightarrow D$ or $f: C\xrightarrow{f} D$ to indicate that $f$ is a morphism on $\mathbf{C}$ with domain $C$ and codomain $D$, and one says that $f$ is a morphism from $C$ to $D$. The other two operations are an operation which associates with an object $C$ of $\mathbf{C}$ a morphism $1_{C}$ (or $\text{id}_{C}$) called the identity morphism of $C$ and an operation of composition which associates to any pair $(f,g)$ of $\mathbf{C}$ such that $\text{d}_{0}(f)=\text{d}_{1}(f)$ another morphism $f\circ g$, their composite. These operations are required to satisfy the following axioms.

(i) $\text{d}_{0}(1_{C})=C=\text{d}_{1}(1_{C})$

(ii) $\text{d}_{0}(f\circ g)=\text{d}_{0}(g), \text{d}_{1}(f\circ g)=\text{d}_{1}(f),$

(iii) $1_{D}\circ f=f, f\circ 1_{D}=f,$

(iv) $(f\circ g)\circ h=f\circ (g\circ h)$

In (ii)-(iv), we assume that the compositions make sense; thus (ii) is required to hold for any pair of arrows $f$ and $g$ with $\text{d}_{0}(f)=\text{d}_{1}(g)$, and (iii) is required to hold for any two objects $C$ and $D$ of $\mathbf{C}$ and any morphism $f$ from $C$ to $D$, etc.

Many of the concepts we have already discussed form categories. We have, for example the categories

$\mathbf{Sets}$, where the objects are sets and the morphisms are functions,

$\mathbf{Top}$, where the objects are topological spaces and the morphisms are continuous functions,

$\mathbf{Top_{*}}$, where the objects are topological spaces with selected points, one for each space, called basepoints and the morphisms are continuous functions that take basepoints to basepoints,

$\mathbf{Vct_{K}}$, where the objects are vector spaces with field of scalars $K$ and the morphisms are linear transformations,

$\mathbf{R-Mod}$, where the objects are modules with ring of scalars $R$ and the morphisms are linear transformations, and

$\mathbf{Grp}$, where the objects are groups and the morphisms are homomorphisms.

Note that sometimes the notation for these categories varies depending on the author.

We now introduce the concept of a functor. From the same book as above,

Given two categories $\mathbf{C}$ and $\mathbf{D}$, a functor from $\mathbf{C}$ to $\mathbf{D}$ is an operation $F$ which assigns to each object $C$ of $\mathbf{C}$ an object $F(C)$ of $\mathbf{D}$, and to each morphism $f$ of ${C}$ a morphism $F(f)$ of $\mathbf{D}$, in such a way that $F$ respects the domain and codomain as well as the identities and the composition: $F(\text{d}_{0}(f))=\text{d}_{0}(F(f))$$F(\text{d}_{1}(f))=\text{d}_{1}(F(f))$$F(1_{C})=1_{F(C)}$, and $F((f\circ g))=F(f)\circ F(g)$, whenever this makes sense.

We have already discussed an example of a functor, namely the functor from the category $\mathbf{Top_{*}}$ to the category $\mathbf{Grp}$ which assigns to a topological space with a basepoint its fundamental group, and to basepoint-preserving continuous functions (continuous functions that take basepoint to basepoint) between these topological spaces homomorphisms between their fundamental groups.

In physics the concept of categories and functors is also used in topological quantum field theory. Roughly, the idea is that in classical mechanics (including relativity) the physics is expressed in terms of manifolds (shapes that have no sharp edges) while in quantum mechanics the physics is expressed in terms of vector spaces. So topological quantum field theory studies functors from the category whose objects are manifolds and whose morphisms are cobordisms (a cobordism between two manifolds is a manifold existing one dimension higher whose boundary is made up of those two original manifolds – this is used to express the idea of one manifold transforming into the other, with the one extra dimension of the cobordism representing time) to the category of vector spaces.

Going back to category theory, we discuss some more important concepts. The opposite category $\mathbf{C^{op}}$ of a category $\mathbf{C}$ is the category whose objects are the same as that of $\mathbf{C}$ but whose morphisms are in the opposite direction of the morphisms of $\mathbf{C}$. A contravariant functor from  $\mathbf{C}$ to $\mathbf{D}$ is just a functor from  $\mathbf{C^{op}}$ to $\mathbf{D}$.

We recall from our discussion in Presheaves that the classical notion of a presheaf on a topological space $X$ is given by a set $\mathcal{F}(U)$ (sometimes with the extra structure of groups, rings, or modules) for every open subset $U$ of $X$ and functions called restriction maps $\rho_{UV}: \mathcal{F}(U)\rightarrow \mathcal{F}(V)$ for every inclusion of open subsets of $X$ $i: V\rightarrow U$ (we have written it this way instead of the more common $V\subseteq U$ to make it look more symmetric) satisfying certain properties related to identity and composition. We now generalize this classical notion and simply define a presheaf on $\mathbf{C}$ as just a contravariant functor from $\mathbf{C}$ to $\mathbf{Sets}$.

We introduce one more concept in category theory, that of a natural transformation between functors. Quoting once more from the book of Mac Lane and Moerdijk,

Let $F$ and $G$ be two functors from a category $\mathbf{C}$ to a category $\mathbf{D}$. A natural transformation $\alpha$ from $F$ to $G$, written $\alpha: F\rightarrow G$, is an operation associating with each object $C$ of $\mathbf{C}$ a morphism $\alpha_{C}:FC\rightarrow GC$ of $\mathbf{D}$, in such a way that, for any morphism $f: C'\rightarrow C$ in $\mathbf{C}$, $G(f)\circ \alpha_{C'}=\alpha_{C}\circ F(f)$. The morphism $\alpha_{C}$ is called the component of $\alpha$ at $C$.

We have seen that a presheaf on $\mathbf{C}$ is a contravariant functor from a category $\mathbf{C}$ to the category of sets $\mathbf{Sets}$ . We can now define the category of all presheaves on $\mathbf{C}$, written $\mathbf{\hat{C}}$, as the category whose objects are functors $P: \mathbf{C^{op}}\rightarrow \mathbf{Sets}$ on $\mathbf{C}$, and whose morphisms are natural transformations $\theta: P\rightarrow P'$ between such functors. $\mathbf{\hat{C}}$ is an example of what is called a functor category, and in this context it is also sometimes written as $\mathbf{Sets^{C^{op}}}$.

We have now seen some basic constructions in category theory. There are many more. It can perhaps be said that in category theory the emphasis is on looking at the “relationships” or “interactions” between objects, as opposed to looking “inside” of these objects, as is the case with set theory. This allows us to make analogies between seemingly different objects, as what we have seen with topological spaces and groups. We end this post with a couple of quotes:

“Good mathematicians see analogies between theorems or theories. The very best ones see analogies between analogies.”

-Stefan Banach (as quoted by Stanislaw Ulam)

“If there is one thing in mathematics that fascinates me more than anything else (and doubtless always has), it is neither ‘number’ nor ‘size’, but always form.”

-Alexander Grothendieck

References:

Category Theory on Wikipedia

Functor on Wikipedia

Natural Transformation on Wikipedia

Topological Quantum Field Theory on Wikipedia

Categories for the Working Mathematician by Saunders Mac Lane

Sheaves in Geometry and Logic: A First Introduction to Topos Theory by Saunders Mac Lane and Ieke Moerdijk

## 12 thoughts on “Category Theory”

1. Pingback: Simplices | Theories and Theorems