# Category Theory

Category theory studies mathematical structure by how objects
**map** to one another, not by what they contain. An object
is opaque; everything you can say about it is said with arrows.


_Figure 001 — A commuting square: two paths from A to D agree, so the diagram commutes.
_

_Figure 002 — Arrows compose head to tail, and the composite is associative.
_

A **category** is objects, arrows between them, and a way to
compose arrows that is associative and has identities. That is the whole
definition — and almost every structure in mathematics is an instance of
it.


Instead of peering inside an object, you characterize it by a
_universal property_: the maps into or out of it that make it the
best solution to a problem, unique up to a single isomorphism.


_Figure 003 — A product: every test object factors through it by one mediating arrow.
_

**Functors** carry one category into another, preserving
composition and identities, so a whole theory can be transported and
compared against another intact.


_Figure 004 — A functor F sends objects to objects and arrows to arrows, same direction.
_

**Natural transformations** compare two functors arrow by
arrow. When their components make every square commute, the comparison is
canonical — independent of any arbitrary choice.


_Figure 005 — A natural transformation links two functors so each naturality square commutes.
_

The core results build on these three levels. The _Yoneda lemma_
says an object is fully known by the arrows into it; **limits**
and colimits unify products, pullbacks, and quotients; and
**adjunctions** pair functors that are optimal inverses of
one another.


From adjunctions come **monads** and cartesian closed
categories — the structures that carry the subject into computer science,
modelling effects, the typed lambda calculus, and the semantics of
programs.


The reward is leverage: prove something once about arrows and it holds in
every category at once, from sets and groups to spaces, logics, and types.


---

## Contents

### 1. Foundations

1. [Categories, Objects, and Arrows](/category-theory/foundations/what-is-a-category)
2. [A Zoo of Categories](/category-theory/foundations/examples-of-categories)
3. [Isomorphisms, Monos, and Epis](/category-theory/foundations/special-morphisms)
4. [Functors: Maps Between Categories](/category-theory/foundations/functors)
5. [Natural Transformations and Functor Categories](/category-theory/foundations/natural-transformations)
6. [Size: Small, Large, Locally Small](/category-theory/foundations/size-and-set-theory)

### 2. Universal Properties and Basic Constructions

1. [Universal Properties, Initial and Terminal Objects](/category-theory/universal-properties/universal-properties)
2. [Products and Coproducts](/category-theory/universal-properties/products-and-coproducts)
3. [Opposite, Product, Slice, and Comma Categories](/category-theory/universal-properties/constructions-on-categories)

### 3. Representables and the Yoneda Lemma

1. [Hom-Functors and Representables](/category-theory/representables-yoneda/representable-functors)
2. [The Yoneda Lemma](/category-theory/representables-yoneda/yoneda-lemma)
3. [The Yoneda Embedding and Its Uses](/category-theory/representables-yoneda/yoneda-consequences)

### 4. Limits and Colimits

1. [Cones and Limits](/category-theory/limits-colimits/limits)
2. [Equalizers and Pullbacks](/category-theory/limits-colimits/products-equalizers-pullbacks)
3. [Colimits: Coproducts, Coequalizers, Pushouts](/category-theory/limits-colimits/colimits)
4. [Computing Limits in Concrete Categories](/category-theory/limits-colimits/computing-limits)
5. [Preservation, Reflection, and Creation of Limits](/category-theory/limits-colimits/limits-and-functors)

### 5. Adjunctions

1. [Adjoint Functors via Hom-Set Bijections](/category-theory/adjunctions/adjunctions)
2. [Units, Counits, and the Triangle Identities](/category-theory/adjunctions/units-and-counits)
3. [Adjunctions from Universal Arrows](/category-theory/adjunctions/adjunctions-via-universal-arrows)
4. [Free Constructions and Free–Forgetful Adjunctions](/category-theory/adjunctions/free-forgetful-adjunctions)

### 6. Adjoints, Representables, and Limits Together

1. [Limits as Adjoints and as Representables](/category-theory/adjoints-limits/limits-via-adjoints)
2. [Limits and Colimits of Presheaves](/category-theory/adjoints-limits/presheaf-limits-colimits)
3. [Right Adjoints Preserve Limits (RAPL)](/category-theory/adjoints-limits/adjoints-preserve-limits)
4. [The Adjoint Functor Theorem](/category-theory/adjoints-limits/adjoint-functor-theorem)

### 7. Monads and Algebras

1. [Monads from Adjunctions](/category-theory/monads-algebras/monads)
2. [Algebras for a Monad](/category-theory/monads-algebras/algebras-eilenberg-moore)
3. [The Kleisli Category and Monads in Programming](/category-theory/monads-algebras/kleisli-and-programming)
4. [Algebras for an Endofunctor and Recursion](/category-theory/monads-algebras/algebras-for-endofunctors)

### 8. Cartesian Closed Categories and Typed Lambda Calculus

1. [Cartesian Closed Categories](/category-theory/cartesian-closed-lambda/cartesian-closed-categories)
2. [Typed Lambda Calculus and CCCs](/category-theory/cartesian-closed-lambda/lambda-calculus-correspondence)
3. [Fixed Points in Cartesian Closed Categories](/category-theory/cartesian-closed-lambda/fixed-points-and-recursion)
