No history yet

Category Foundations

The Structure of Structure

In mathematics, we often study collections of things, like sets, groups, or monoids. Typically, the focus is on what's inside these structures. What elements are in this set? What is the group operation? Category theory asks a different kind of question. It's less concerned with the internal details of an object and more interested in how objects relate to each other.

Think of a map. The cities are objects. The roads connecting them are relationships. To get from City A to City C, you might pass through City B. Category theory is the language of this map. It describes the cities (objects) and the routes between them (morphisms), without needing to know the street layout of each city. The focus shifts from the objects themselves to the connections that give the entire system its structure.

A category consists of objects and morphisms (arrows) that describe relationships between these objects.

The Rules of the Game

A category is made up of two basic ingredients: objects and morphisms. Objects are the fundamental items, like dots on a page. Morphisms are the arrows that go from one object to another. If we have an arrow ff from object AA to object BB, we write f:ABf: A \to B.

For a collection of objects and morphisms to be a valid category, it must follow two simple but powerful rules.

  1. Identity: Every object must have an arrow that points back to itself.
  2. Composition: Any two arrows that line up head-to-tail can be combined into a single, direct arrow.

Let's break these down. The identity morphism for an object AA is written as idA:AAid_A: A \to A. It's the "do nothing" arrow. Composing any morphism with an identity morphism doesn't change it.

idBf=fgidB=g\begin{aligned} & id_B \circ f = f \\ & g \circ id_B = g \end{aligned}

Composition is about creating shortcuts. If you have an arrow f:ABf: A \to B and another arrow g:BCg: B \to C, you can compose them to get a new arrow, gf:ACg \circ f: A \to C. This new arrow represents the total journey from AA to CC.

Finally, this composition must be associative. This means if you have three morphisms in a row, f:ABf: A \to B, g:BCg: B \to C, and h:CDh: C \to D, it doesn't matter how you group them. Composing ff and gg first, and then hh, is the same as composing gg and hh first, and then adding ff.

h(gf)=(hg)fh \circ (g \circ f) = (h \circ g) \circ f

Familiar Categories

These abstract rules might feel unfamiliar, but you've been working with categories all along. Many common mathematical structures form categories.

CategoryObjectsMorphisms (Arrows)
SetSetsFunctions between sets
GrpGroupsGroup homomorphisms
MonMonoidsMonoid homomorphisms
PosetPartially ordered setsOrder-preserving maps

Let's take Set. The objects are sets, and the morphisms are functions. For any set AA, there's an identity function idA(x)=xid_A(x) = x that maps every element to itself. Function composition is also associative, as you know from algebra. So, Set is a category.

Similarly, in Grp, the objects are groups. The morphisms aren't just any functions; they are group homomorphisms, which are functions that preserve the group structure. The identity map is a homomorphism, and the composition of two homomorphisms is also a homomorphism. Thus, Grp is also a category.

By focusing on this high-level structure of objects and structure-preserving arrows, category theory allows us to see deep connections between different areas of mathematics that might otherwise seem unrelated.

Quiz Questions 1/5

What is the primary focus of category theory?

Quiz Questions 2/5

What are the two fundamental components that define a category?