foundations of category theory
Categories and Morphisms
Overview
A category is a mathematical structure consisting of objects and morphisms (arrows) between them, satisfying identity and associativity laws. Category theory — sometimes called 'abstract nonsense' — provides a universal language that unifies disparate branches of mathematics by focusing on structure-preserving maps rather than the elements of individual structures. Morphisms generalize functions, group homomorphisms, continuous maps, and linear maps under one roof.
Intuition
Think of a category as a directed graph where nodes are 'objects' and edges are 'morphisms', with the extra rule that you can always compose two compatible arrows to get a third, and every node has a special self-loop (the identity). The magic of categories is that you completely ignore what objects are made of — a group, a topological space, and a set are all just 'objects'; what matters is only how they relate to each other via morphisms. This shift from substance to relationship is the deepest philosophical innovation of category theory.
Formal Definition
A category \(\mathcal{C}\) consists of: (1) a collection of objects \(\text{Ob}(\mathcal{C})\); (2) for each pair of objects \(A, B\), a collection of morphisms \(\text{Hom}(A,B)\) (also written \(\mathcal{C}(A,B)\)); (3) for each triple \(A, B, C\), a composition law \(\circ\); and (4) for each object \(A\), an identity morphism \(\text{id}_A\). These must satisfy two axioms:
Composition is associative whenever defined
Identity morphisms act as two-sided units for composition
Composition is defined precisely when the codomain of f equals the domain of g
Notation
| Notation | Meaning |
|---|---|
| Collection of objects of category C | |
| Set of morphisms from A to B | |
| f is a morphism with domain A and codomain B | |
| Composite of f then g | |
| Identity morphism on object A | |
| A and B are isomorphic objects |
Properties
Isomorphism
Example: In \(\text{Set}\), isomorphisms are bijections. In \(\text{Grp}\), they are group isomorphisms.
Monomorphism
Example: In \(\text{Set}\), monomorphisms are injections.
Epimorphism
Example: In \(\text{Set}\), epimorphisms are surjections. In \(\text{Ring}\), the inclusion \(\mathbb{Z} \hookrightarrow \mathbb{Q}\) is epic but not surjective.
Endomorphism and Automorphism
Example: In \(\text{Vect}_k\), endomorphisms of \(k^n\) are \(n \times n\) matrices; automorphisms are invertible matrices.
Worked Examples
Objects: all sets. Morphisms: for sets \(A, B\), define \(\text{Hom}(A,B)\) to be all functions \(f: A \to B\).
Composition: given \(f: A \to B\) and \(g: B \to C\), define \((g \circ f)(x) = g(f(x))\). Function composition is well-defined and its output is again a function.
Associativity: for \(f: A \to B\), \(g: B \to C\), \(h: C \to D\) and any \(x \in A\):
Identity: for each set \(A\), define \(\text{id}_A(x) = x\). Then \(f \circ \text{id}_A = f\) and \(\text{id}_B \circ f = f\) for any \(f: A \to B\).
All axioms are satisfied, so \(\text{Set}\) is a category.
Answer: \(\text{Set}\) satisfies associativity and identity axioms, hence forms a valid category.
Practice Problems
Let \(\text{Vect}_k\) be the category of vector spaces over a field \(k\) with linear maps as morphisms. Prove that the monomorphisms in \(\text{Vect}_k\) are precisely the injective linear maps.
Describe the category \(\text{Pos}\) of partially ordered sets with order-preserving maps. What are the isomorphisms?
Prove that if \(f: A \to B\) is both a monomorphism and an epimorphism in a category \(\mathcal{C}\), it need not be an isomorphism. Give an explicit counterexample.
Common Mistakes
Objects in a category must be sets with extra structure.
Objects can be anything — sets, spaces, propositions, processes. A category can even have a single object. The definition is purely about morphisms and composition laws.
A bimorphism (mono + epi) is always an isomorphism.
This holds in balanced categories like Set, but fails in general. In Ring, \(\mathbb{Z} \to \mathbb{Q}\) is bimorphic but not an isomorphism.
The composite \(g \circ f\) means 'apply g then f'.
The standard convention is \(g \circ f\) means 'apply f first, then g'. So \((g \circ f)(x) = g(f(x))\). Some authors write morphisms on the right and use \(f;g\) for the opposite convention.
Quiz
Historical Background
Category theory was invented by Samuel Eilenberg and Saunders Mac Lane in their 1945 paper 'General Theory of Natural Equivalences', motivated by algebraic topology. They needed a rigorous framework to express the idea that two constructions (homology theories) were 'naturally' equivalent — not just isomorphic in an arbitrary way. The theory grew rapidly, with Grothendieck's use in algebraic geometry, Lawvere's categorical foundations of logic, and eventually topos theory. Today it underpins much of modern pure mathematics and theoretical computer science.
- 1945
Eilenberg and Mac Lane introduce categories, functors, and natural transformations
Samuel Eilenberg, Saunders Mac Lane
- 1952
Mac Lane and others develop homological algebra using categorical language
- 1957
Grothendieck introduces abelian categories and the Tohoku paper revolutionizes algebraic geometry
Alexander Grothendieck
- 1963
Lawvere's thesis on functorial semantics launches categorical logic
F. William Lawvere
- 1971
Mac Lane publishes 'Categories for the Working Mathematician', the standard reference
Summary
- A category consists of objects and morphisms satisfying associativity and identity axioms — no inner structure of objects is assumed.
- Key examples: Set (sets, functions), Grp (groups, homomorphisms), Top (spaces, continuous maps), Vect_k (vector spaces, linear maps), and one-object categories corresponding to monoids/groups.
- Isomorphisms, monomorphisms, and epimorphisms are defined purely in terms of the composition law, generalizing bijections, injections, and surjections.
- In general categories, mono + epi does not imply isomorphism — this only holds in 'balanced' categories.
- Every group is a one-object groupoid; every preorder is a category with at most one morphism between any two objects.
References
- BookMac Lane, S. Categories for the Working Mathematician, 2nd ed. Springer, 1998.
- BookAwodey, S. Category Theory, 2nd ed. Oxford University Press, 2010.
- WebsitenLab — category
Mathematics