Category theory
Category theory is a branch of mathematics that studies structures through the maps between them, not through what they are made of. A category is a system of related objects, such as sets or spaces, together with maps between those objects that can be chained together.[1]
Samuel Eilenberg and Saunders Mac Lane introduced categories in a paper published in 1945.[2]
The same few ideas appear across mathematics, so category theory serves as a shared language for much of it.[3][2] They describe constructions such as products (objects that combine other objects) and free constructions. These patterns show up in several fields:
- algebra
- topology
- geometry
- logic
- computer science
The basic idea
Many parts of mathematics study objects of one kind together with the maps that respect their structure.[3]
- Sets come with functions.
- Groups come with homomorphisms.
- Topological spaces come with continuous maps.
Category theory keeps only the objects, the maps, and the rule for chaining maps.
Many properties can be stated using maps alone. For example, a function into the Cartesian product of two sets is fixed by its two components, one into and one into . The same description works for topological spaces and for groups.[3]
Mac Lane described the subject as "learning how to live without elements, using arrows instead."[3]
Definition of a category
Objects, morphisms, and composition
- A collection of objects.
- For each pair of objects and , a collection of morphisms from to , written . Morphisms are also called maps or arrows.
- A composition rule. Given and , it gives a morphism (first , then ).
- For each object , an identity morphism .
These parts must satisfy two laws. For all , and :[1]
The first law (associativity) says that a chain of morphisms has one composite, however it is grouped. The second (the identity laws) says that composing with an identity changes nothing.
Isomorphisms and commutative diagrams
An isomorphism is a morphism that can be undone. A morphism is an isomorphism if there is a with and . Objects joined by an isomorphism are called isomorphic.[1]
This one definition covers many familiar cases:[4]
- bijections of sets
- isomorphisms of groups
- homeomorphisms of spaces (continuous maps with a continuous inverse)
Category theorists draw morphisms as arrows in diagrams. A diagram commutes when any two paths of arrows with the same start and end have the same composite.[4]
Proving facts by following arrows around such diagrams is called diagram chasing. It is a proof method that category theory introduced.[4]
Examples
The most familiar categories have sets with extra structure as objects and structure-preserving functions as morphisms.[1]
| Category | Objects | Morphisms |
|---|---|---|
| Set | sets | functions |
| Grp | groups | group homomorphisms |
| Ring | rings | ring homomorphisms |
| Vect | vector spaces over a field | linear maps |
| Top | topological spaces | continuous maps |
A category does not have to be made of sets with structure. There is a category with one object and only its identity morphism.[1] Some familiar structures are themselves small categories, meaning categories whose objects and morphisms form sets:[5][6][4]
- A monoid is a category with one object. Its elements are the morphisms, and composition is the monoid operation.
- A group is a category with one object in which every morphism is an isomorphism.
- A preorder, such as a partially ordered set, is a category with at most one morphism between any two objects. There is a morphism exactly when .
- A groupoid is a category in which every morphism is an isomorphism.
Functors
A functor is a map between categories. A functor sends each object of to an object of , and each morphism to a morphism . It must preserve composition and identities:[6]
Functors appear throughout mathematics:
- A forgetful functor drops structure. For example, it sends each monoid to its underlying set and each monoid homomorphism to its underlying function.[6]
- The fundamental group is a functor from spaces to groups. Using it, the Brouwer fixed-point theorem (every continuous map from a closed disk to itself has a fixed point) reduces to a simple fact in algebra.[4]
- Taking derivatives is a functor: the chain rule of multivariable calculus says that the derivative of a composite is the composite of the derivatives.[4]
- If groups are viewed as one-object categories, a group homomorphism is exactly a functor between them.[6]
Functors compose, so small categories and the functors between them form a category of their own, called Cat.[6]
A functor can also show that two categories are essentially the same. Such an equivalence of categories links finite-dimensional vector spaces with a category whose objects are natural numbers and whose morphisms are matrices.[4]
Natural transformations
A natural transformation is a map between two functors. Leinster calls natural transformations "maps between maps between categories."[1] Given functors , a natural transformation picks a morphism for each object , called its component at .[7]
The components must fit together. For every morphism in :[7]
This condition is called naturality. It says that the square of arrows below commutes.
Eilenberg and Mac Lane created these ideas to make the word "natural" precise. Mathematicians used it to mean "defined without arbitrary choices."[4]
Vector spaces give an example. The dual space of a vector space over a field is the space of linear maps , and the double dual is the dual of that space. For a finite-dimensional , matching with its dual space needs a choice of basis, but matching with its double dual needs no choice, so only the second is natural.[4]
Natural transformations compose component by component. The functors from to and the natural transformations between them form a functor category.[7]
A natural transformation whose components are all isomorphisms is a natural isomorphism.[5]
Universal properties
A universal property describes an object by how morphisms go into it or out of it. By the Yoneda lemma (see below), an object is fully described by such a property.[4] This lets mathematicians define and prove things without picking a particular construction.
The tensor product of vector spaces is an example. It is defined by declaring that linear maps out of match bilinear maps out of (maps that are linear in each input when the other is held fixed). Its symmetry and associativity can then be proved without reference to any particular construction.[4]
Products
The Cartesian product of sets shows the pattern. The set comes with projections and . For any set and functions and , there is exactly one function with[3]
Namely, sends to the pair .[3] A product in any category is an object with two morphisms that has this same property.
Limits and colimits
Limits and colimits are universal constructions built from a whole diagram of objects. Limits build new objects by imposing equations on existing ones.[4]
- Limits include products, pullbacks and inverse limits.
- Colimits include coproducts, coequalizers and direct limits.
Ordered sets give a simple case. In a partially ordered set viewed as a category, the supremum (least upper bound) of a set of elements is a colimit, and the infimum (greatest lower bound) is a limit.[4]
Duality
Reversing every arrow in a category gives another category, its opposite category. The axioms for a category stay true when arrows are reversed.[4] So any theorem proved for all categories also holds in their opposites, which yields a dual theorem with no extra work.[4]
The coproduct is the dual of the product. It has the product's universal property with every arrow reversed. In Set the coproduct is the disjoint union, and in Grp it is the free product of groups.[8]
Adjoint functors
Adjoint functors are pairs of functors that point in opposite directions and match morphisms in a precise way. Functors and are adjoint when there is a one-to-one correspondence[3][5]
that is natural in the objects of and of . Then is the left adjoint and the right adjoint, written .[5]
Free constructions are standard examples. The functor that sends a set to the free group on is left adjoint to the forgetful functor from groups to sets.[5] A homomorphism from the free group to a group is the same as a function from to the underlying set . Groups, rings, modules and many other algebraic structures have such free and forgetful pairs.[4]
The Cartesian product is also a right adjoint. It is right adjoint to the diagonal functor that sends a set to the pair .[3]
Daniel Kan introduced adjoint functors in a paper published in 1958.[2]
Kan showed that adjoint functors include limits and colimits as special cases.[2]
Mac Lane summed up their reach with the slogan "Adjoint functors arise everywhere."[3]
The Yoneda lemma
The Yoneda lemma says that an object is determined by the morphisms into it. Riehl calls it "arguably the most important result in category theory."[4]
Fix a category whose morphisms between any two objects form a set (a locally small category). Each object gives a representable functor , which sends an object to the set . For every functor , the lemma states[9]
Here is the set of natural transformations, and the one-to-one correspondence is natural in . It sends a natural transformation to the element of .[9]
Several consequences follow:
- The Yoneda embedding is full and faithful (it matches morphisms one to one with natural transformations between the representable functors). So sits inside a category of set-valued functors (presheaves).[9]
- Objects and are isomorphic if and only if their representable functors are naturally isomorphic.[9]
- Riehl points to a related classical antecedent: every group is isomorphic to a subgroup of a permutation group (Cayley's theorem).[4]
- Modern algebraic geometry starts from the observation that a commutative ring can be identified with the functor it represents.[4]
Further structures
The basic notions combine into richer structures, each with its own theory.
- A monad is a functor from a category to itself that encodes an algebraic structure. Beck's theorem uses monads to tell which categories are categories of algebras.[4][3]
- An abelian category has enough structure to prove the standard lemmas about diagrams of maps used in homological algebra, without chasing elements.[3]
- A monoidal category has a tensor product of objects.[3]
- A Kan extension extends a functor along another functor to a functor from to , in a universal way, when such an extension exists.[10] Representable functors, limits, colimits, adjoint functors and monads are special cases of it.[4]
- Higher category theory adds morphisms between morphisms, and so on upward. It is to category theory what higher-dimensional geometry is to plane geometry.[2]
Toposes
A topos can be viewed both as a generalized space and as a generalized universe of sets. The two views arose independently around 1963.[11]
| View | Origin | Motivating idea |
|---|---|---|
| Generalized space | Alexander Grothendieck | toposes as categories of sheaves, from reworking sheaf theory for algebraic geometry |
| Generalized universe of sets | William Lawvere | a search for axioms for the category of sets |
Lawvere and Myles Tierney, working together at Dalhousie University, then gave axioms for an elementary topos.[11]
In its final form, an elementary topos is a category with three features, subject to a few simple axioms:[11]
- finite limits (limits of finite diagrams)
- a function object for any two objects, playing the role of the set of all functions from to
- a power object for each object, playing the role of the set of all subsets of
Every Grothendieck topos is an elementary topos, but not every elementary topos is a Grothendieck topos.[11]
History
Origins
Eilenberg and Mac Lane defined categories, functors and natural transformations in "General Theory of Natural Equivalences," published in 1945 in the Transactions of the American Mathematical Society.[2] They saw categories as less central. Their basic concepts were functors and natural transformations, and categories served only as the domains and ranges of functors.[2]
Mac Lane later recalled that categories were accepted slowly, or dismissed as "general abstract nonsense" (see abstract nonsense).[12]
Growth into a field
In the decade after 1945, categories came into use in algebraic topology and homological algebra.[2] Key steps followed:
- 1957: Grothendieck's paper "Sur quelques points d'algèbre homologique" (the Tohoku paper) used categories to build general theories, which he applied to fields such as algebraic geometry.[2]
- 1958: Kan's paper on adjoint functors appeared.[2]
- 1963: Lawvere began a program for a purely categorical foundation of mathematics, starting with axioms for the category of sets.[11]
- 1964: Lawvere published his Elementary Theory of the Category of Sets.[2]
- 1971: Mac Lane's textbook Categories for the Working Mathematician first appeared.[13]
With these developments, category theory became a field of research in its own right.[2]
Recent developments
From the 1980s on, category theory took root in theoretical computer science. There it helps develop new logical systems and the semantics of programming (the study of what programs mean).[2]
Higher categories have reached physics.[2] In 2013 the Univalent Foundations Program, building on ideas of Voevodsky and others, published the book Homotopy Type Theory.[2]
Applications
Category theory is used both inside mathematics and in other fields.
- Topology and algebra. Functorial invariants (data assigned to spaces in a way that respects maps), such as the fundamental group and homology, are often easier to compute than older numerical invariants, and they carry more information.[4] Khovanov homology, a functor used to study knots, refines the Jones polynomial.[4]
- Logic. Categorical logic studies logic by categorical means. Its results include topos models of constructive mathematics and topos proofs that the continuum hypothesis is independent of the usual axioms of set theory.[2]
- Programming languages. The Curry-Howard-Lambek correspondence gives an equivalence between typed lambda calculi and Cartesian closed categories.[14] Monads are used to handle computational effects such as side effects, as with the monads of functional programming.[4]
- Physics. Higher-dimensional categories are used to study quantum groups and quantum field theory.[2] Categorical quantum mechanics applies categories to the foundations of quantum theory.[2]
- Science and engineering. Applied category theory uses categorical structures to model databases, electric circuits, and dynamical systems.[15]
Foundations and open questions
Size
Categories such as Set are too large to be sets themselves. Questions of size, especially the line between sets and proper classes (collections too large to be sets), play a key role in category theory.[16]
A category whose objects and morphisms form sets is called small.[5] There are several ways to make size formal, and the choice affects which constructions are allowed.[16]
Categorical foundations
Some category theorists propose categories as a foundation for mathematics in place of set theory. Proposals include:[2]
- Lawvere's category of categories
- Mac Lane's suggestion of certain toposes
- Lambek's free topos
One objection is that categories are usually defined as sets, so they cannot give a deeper foundation. The debate remains open.[2]
Higher categories
The foundations of higher category theory are still being worked out. Mathematicians now understand $(\infty, 1)$-categories, one kind of higher category, well, and important results have been proved with them.[2]
A suitable language and definite axioms for arbitrary higher-dimensional categories have not yet been given. Homotopy type theory is a related approach based on homotopy theory.[2]
References
- Basic Category Theory, Tom Leinster, Cambridge University Press, 2014.
- Category Theory, Jean-Pierre Marquis, Stanford Encyclopedia of Philosophy, 2019.
- Categories for the Working Mathematician, 2nd edition, Saunders Mac Lane, Springer, 1998.
- Category Theory in Context, Emily Riehl, Dover, 2016.
- Category Theory, Part III lecture notes, University of Cambridge, 2016.
- Basic Category Theory (Chapter 4 of Category Theory for Scientists), David I. Spivak, MIT OpenCourseWare, 2013.
- Lecture 9: Natural Transformations and Universal Properties, Max S. New, University of Michigan, 2023.
- Coproduct, Wolfram MathWorld, 2024.
- Lecture Notes: Introduction to Categorical Logic, Steven Awodey and Andrej Bauer, Carnegie Mellon University, 2009.
- Kan Extensions (seminar notes), Gideon Chiusole, 2019.
- Sheaves in Geometry and Logic: A First Introduction to Topos Theory, Saunders Mac Lane and Ieke Moerdijk, Springer, 1992.
- Concepts and Categories in Perspective, Saunders Mac Lane, American Mathematical Society, 1988.
- Categories for the Working Mathematician, 1st edition, Saunders Mac Lane, Springer, 1971.
- A Generalization of the Curry-Howard Correspondence, arXiv, 2016.
- Seven Sketches in Compositionality: An Invitation to Applied Category Theory, Brendan Fong and David I. Spivak, arXiv, 2018.
- Set Theory for Category Theory, Michael A. Shulman, arXiv, 2008.
