reality meets eccentricity


Understanding category theory pt. 1: What is category theory?

Categories: ,

Category theory has revolutionized mathematics, first as a tool in algebraic topology and since then as an extremely successful unifying language for most, if not all, of mathematics (well, sort of, if we disregard analysis, which we will).

The success of category theory underlines that mathematics is not about mere arithmetic, it is about structure, and in particular structure-preserving maps. A generalization of these structure preserving maps, called morphisms, is central in category theory. If this sounds rather abstract, then that is because, well, it is. But with abstractness comes generality. And not only that, it can simplify some rather cumbersome proofs to near trivialities.

In order to make sense of what we are talking about, we of course need to know what categories, morphisms, functors and natural transformations are, but knowing that without knowing why we should even care, given the level of abstractness we are dealing with, category theory will seem rather pointless.

It is often said that to study category theory, no prerequisites are required. While this is technically true, I would not consider such a statement being made in good faith. Without a rather comprehensive mathematical background with the corresponding training in thinking abstractly, not to mention knowledge in which areas of mathematics it is used, it will likely seem like an entirely useless exercise in futility.

So, why do we care?

The notion of a category encodes a class of some mathematical object and a structure preserving arrow or morphisms, we shall make this more concrete later. A defining condition of being a category, is that there must be a well-behaved notion of composition of morphisms that corresponds to the notion of composition of functions. Mathematicians like to come up with structure preserving maps between mathematical objects, like continuous maps between topological space or group homomorphisms between groups, so it should not come as a surprise that there are also a notion of maps between categories, a functor. But as a category not only consists of its objects, but also of its arrows, a functor, like other structure preserving maps, needs to meet certain conditions. And indeed, there are even maps between functors, called natural transformations.

These constructions that are outlined above, enable us to relate mathematical obejcts that are, at first glance, very different. In algebraic topology, to each topological space X we can assign a group \pi_1(X), called the fundamental group, which will be our first example of a functor from the category of topological spaces to the category of groups. We denote this functor by \pi_1 : \cat{Top} \to \cat{Group}. Now again, you may ask, why do we care? This is a totally legitimate question. As a basic example, note that above we wrote that functors not only map objects from one category to another, but also its morphisms. The morphisms of \cat{Top} are continuous maps between topological spaces, say a continuous map f : X \to Y from the topological space X to the topological space Y. The morphisms of the category of groups are, not surprisingly, group homomorphisms. This means that \pi_1(f) : \pi_1(X) \to \pi_1(Y) should be a group homomorphism, and indeed it is. An elementary result in category theory says that functors preserve isomorphisms. In the example if f is an isomorphism (which corresponds to homeomorphisms in \cat{Top}), then \pi_1(f) is an isomorphism as well, where the isomorphisms in \cat{Group} are group isomorphisms. This yields a way for us to use group theory to disprove that two topological spaces are homeomorphic. If given two topopical spaces X and Y, the task of disproving that they are homeomorphic, if we are lucky, can be as simple as showing that there are no group isomorphisms between the groups \pi_1(X) and \pi_1(Y). This can make what is often a rather difficult and laborious task, relatively simple and straightforward. However if we get two fundamental groups that are isomorphic, then we are nowhere.

What is a category?

A category \cat{C} consists of a collection of objects \obj\cat{C} and for all objects c,c' \in \obj\cat{C} a collection of morphisms \Hom_{\cat{C}}(c,c') (which may be empty) whose elements are denoted c \to c', such that,

  • For or all objects c \in \obj\cat{C} there is a unique morphism \id_c : c \to c such that for all morphisms f : c' \to c we have \id_c \of f = f and morphisms g : c \to c'' we have g \of \id_{c}=g.
  • For all objects c,c',c''\in \obj\cat{C} and morphisms f : c \to c' and g : c' \to c'' there is a map, a binary operation, \of : \Hom_{\cat{C}}(c,c') \times \Hom_{\cat{C}}(c',c'') \to \Hom_{\cat{C}}(c,c''), such that \of (f,g)=g \of f \in \Hom_{\cat{C}}(c,c'').
  • For all morphisms f: c \to c', g : c' \to c'' and h: c'' \to c''' we have (h \of g ) \of f = h \of (g \of f ).

For simplicity, from now on we will write c \in \cat{C} to denote that c is an object of the category \cat{C}.

So, this looks like, and is, a rather abstract definition. But as hinted above, the power of category theory largely comes from its abstraction.

You might have noticed that the notation for morphisms and the binary operation \of , and the conditions it must satisfy, looks rather a lot like what is used elsewhere in mathematics for functions and composition. This is by no means an accident and \of is, in fact, called composition. The notion of morphisms and their composition is, however, much more general than that of functions between sets with extra structure. It is true that morphisms often represent structure-preserving maps between the objects of a given category whose underlying objects are sets. For example, the morphisms of the category of Abelian groups, \cat{Ab}, are group homomorphisms, in the category of unital rings, \cat{Ring}, they are unit-preserving ring homomorphisms. In the category of sets, \cat{Set}, the morphisms are simply the functions of sets, and the morphisms of the category of topological spaces are continuous functions between topological spaces.

It is important to note, that it is not true in general, that all morphisms represents maps. A simple example of this is if we regard a partially ordered set (X,\leq) as a category with objects the elements of X and for x,y \in X, we have a morphism x\to y if and only if x \leq y. It is a nice little exercise to show that this is indeed a category.

A special type of morphism which we have also mentioned previously, is an isomorphism which is a morphism f : c \to c' in a category \cat{C} where there exsists a morphism g : c' \to c such that g \of f = \id_{c} and f \of g = \id_{c'} and in which case we denote f^{-1} = g and we can write c \iso c'.

What is a functor?

We have alluded to what a functor is, namely a map F between two categories \cat{C} and \cat{D} which maps all objects c\in \cat{C} to F(c)\in \cat{D}, and all morphisms f : c \to c' of \cat{C} to morphisms F(f) : F(c) \to F(c') of \cat{D}. However, if F is contravariant we have F(f): F(c')\to F(c). A functor needs to satisfy two further requirements, however:

  • For all morphisms f: c \to c' and g: c' \to c'' in \cat{C}, we must have F(g \of f)=F(g) \of F(f) or if F is contravariant, F(g \of f)=F(f) \of F(g).
  • For all identity morphisms \id_c of \cat{C} we must have F(\id_c)=\id_{F(c)}.

Satisfying the requirements of being a functor is often referred as being “functorial”.

Digression: Commutative diagrams

Before we get to natural transformations, we first need to know what a commutative diagram is. If we have morphisms f : c \to c' and g: c' \to c'', a way to write the satement h = g \of f, is, that the diagram

Rendered by QuickLaTeX.com

commutes. The intuition of a commutative diagram is that it does not matter if one follows the compositions from c to c' to c'' along g\of f or from c to c'' along h. Similarly we have, that saying that the diagram

Rendered by QuickLaTeX.com

commutes, is the same as the statement g\of f = j \of h.

Commutative diagrams is a highly effective way of visualizing complex compositions of morphisms and their relationships.

What are Natural Transformations?

A natural transformation is, among other things, a morphism between functors, in the category of functors between two functors F: \cat{C} \to \cat{D} and G: \cat{C} \to \cat{D}. We denote a natural transformation from a functor F to G by, for example, \alpha : F \natto G, using the arrow \natto do disambiguate it from a a functor between categories.

To define natural transformations formally, let F,G: \cat{C} \to \cat{D} be two functors. A natural transformation \alpha : F \natto G is a family of morphisms (\alpha_c)_{c\in \cat{C}} in \cat{D} such that for all objects c\in \cat{C} there exists morphisms \alpha_c: F(c) \to G(c), and for all morphisms f : c \to c' in \cat{C}, the diagram

Rendered by QuickLaTeX.com

commutes. If \alpha_c for all c\in \cat{C} are isomorphisms F(c) \iso G(c), then we say that \alpha is a natural isomorphism.

Good things come to those who wait…

We have so far discussed and defined the most basic constructions in category theory. Using these, we shall in later posts dive deeper into what (some) mathematicians is calles abstract nonsense, i.e. category theory.

References

648 {648:FT9YGNDY} 1 chicago-author-date 50 default 430 https://eccentric.dk/wp-content/plugins/zotpress/
%7B%22status%22%3A%22success%22%2C%22updateneeded%22%3Afalse%2C%22instance%22%3Afalse%2C%22meta%22%3A%7B%22request_last%22%3A0%2C%22request_next%22%3A0%2C%22used_cache%22%3Atrue%7D%2C%22data%22%3A%5B%7B%22key%22%3A%22FT9YGNDY%22%2C%22library%22%3A%7B%22id%22%3A648%7D%2C%22meta%22%3A%7B%22creatorSummary%22%3A%22Riehl%22%2C%22parsedDate%22%3A%222016%22%2C%22numChildren%22%3A1%7D%2C%22bib%22%3A%22%26lt%3Bdiv%20class%3D%26quot%3Bcsl-bib-body%26quot%3B%20style%3D%26quot%3Bline-height%3A%201.35%3B%20padding-left%3A%201em%3B%20text-indent%3A-1em%3B%26quot%3B%26gt%3B%5Cn%20%20%26lt%3Bdiv%20class%3D%26quot%3Bcsl-entry%26quot%3B%26gt%3BRiehl%2C%20Emily.%202016.%20%26lt%3Bi%26gt%3BCategory%20Theory%20in%20Context%26lt%3B%5C%2Fi%26gt%3B.%20Aurora%3A%20Dover%20Modern%20Math%20Originals.%20Dover%20Publications.%20%26lt%3Ba%20class%3D%26%23039%3Bzp-ItemURL%26%23039%3B%20href%3D%26%23039%3Bhttps%3A%5C%2F%5C%2Femilyriehl.github.io%5C%2Ffiles%5C%2Fcontext.pdf%26%23039%3B%26gt%3Bhttps%3A%5C%2F%5C%2Femilyriehl.github.io%5C%2Ffiles%5C%2Fcontext.pdf%26lt%3B%5C%2Fa%26gt%3B.%26lt%3B%5C%2Fdiv%26gt%3B%5Cn%26lt%3B%5C%2Fdiv%26gt%3B%22%2C%22data%22%3A%7B%22itemType%22%3A%22book%22%2C%22title%22%3A%22Category%20theory%20in%20context%22%2C%22creators%22%3A%5B%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Emily%22%2C%22lastName%22%3A%22Riehl%22%7D%5D%2C%22abstractNote%22%3A%22%22%2C%22date%22%3A%222016%22%2C%22language%22%3A%22%22%2C%22ISBN%22%3A%22978-0-486-80903-8%22%2C%22url%22%3A%22https%3A%5C%2F%5C%2Femilyriehl.github.io%5C%2Ffiles%5C%2Fcontext.pdf%22%2C%22collections%22%3A%5B%22A6EKE3VU%22%2C%22P6KF5DIR%22%2C%22CR6SZGTJ%22%2C%22E48PVKYH%22%5D%2C%22dateModified%22%3A%222025-07-03T18%3A57%3A43Z%22%7D%7D%5D%7D
Riehl, Emily. 2016. Category Theory in Context. Aurora: Dover Modern Math Originals. Dover Publications. https://emilyriehl.github.io/files/context.pdf.

Leave a Reply

Your email address will not be published. Required fields are marked *