A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

2-Categories

Research Depth 98 in the knowledge graph ☐ I know this ☆ Set as goal
2topics build on this
570prerequisites beneath it
See this on the map →
Functor CategoriesNatural Transformations+3 more→→Fibered Categories
2-category 2-morphism horizontal composition vertical composition interchange law Cat bicategory

Core Idea

A 2-category is a category enriched over Cat: it has objects (0-cells), morphisms between objects (1-cells), and morphisms between morphisms (2-cells or 2-morphisms). The 2-cells can be composed in two ways: vertically (composing 2-cells along shared 1-cells, like composing natural transformations) and horizontally (composing 2-cells along shared 0-cells, like whiskering). These two compositions must satisfy the interchange law. The primary example is Cat itself, where objects are categories, 1-cells are functors, and 2-cells are natural transformations. Strict 2-categories require associativity and unit laws to hold on the nose; the weaker notion of bicategory allows them to hold only up to coherent isomorphism.

How It's Best Learned

Take Cat as the running example. Identify the 0-cells (small categories), 1-cells (functors), and 2-cells (natural transformations). Practice vertical composition (composing two natural transformations α: F ⇒ G and β: G ⇒ H) and horizontal composition (whiskering a natural transformation with a functor). Verify the interchange law on a concrete example. Then consider the bicategory of spans as a non-strict example.

Common Misconceptions

Explainer

An ordinary category has objects and morphisms between objects. A 2-category adds a third level: morphisms between morphisms, called 2-cells or 2-morphisms. You already know the paradigmatic example from your prerequisites: in the functor category [C, D], objects are functors and morphisms are natural transformations. A 2-category makes this structure explicit and formalizes two independent ways of composing 2-cells that coexist in [C, D] and in Cat itself.

Take Cat as the running example throughout. Its 0-cells (objects) are small categories, its 1-cells (morphisms between objects) are functors F: C → D, and its 2-cells (morphisms between 1-cells) are natural transformations α: F ⇒ G between functors with the same source and target. Vertical composition of 2-cells stacks them end-to-end along a shared 1-cell: if α: F ⇒ G and β: G ⇒ H are natural transformations between the same two categories, their vertical composite β ∘ α: F ⇒ H is the natural transformation whose component at each object X is β_X ∘ α_X. This is exactly the composition you know from functor categories. Each hom-category Hom(C, D) is itself a category (with natural transformations as morphisms), and vertical composition is the composition in that category.

Horizontal composition combines 2-cells side by side across different hom-categories. If α: F ⇒ G is a natural transformation between functors C → D, and β: H ⇒ K is a natural transformation between functors D → E, the horizontal composite β ★ α: H∘F ⇒ K∘G is a natural transformation between functors C → E. In Cat, this is whiskering: (β ★ α)_X = β_{GX} ∘ H(α_X) = K(α_X) ∘ β_{FX} (these are equal by naturality of β). The identity 2-cell for horizontal composition on a functor F is the identity natural transformation id_F.

The interchange law (β₂ ∘ β₁) ★ (α₂ ∘ α₁) = (β₂ ★ α₂) ∘ (β₁ ★ α₁) says that composing vertically then horizontally gives the same result as composing horizontally then vertically. Visually: arrange four 2-cells in a 2×2 grid; you can compose the rows first (two vertical composites) then compose the results horizontally — or compose the columns first (two horizontal composites) then compose vertically — and the answer must agree. In Cat, this follows from naturality, but as an axiom in an abstract 2-category it is an independent condition that must be verified.

The strict vs. weak distinction becomes significant when you move beyond Cat. In a strict 2-category, all associativity and unit laws for 1-cell composition hold on the nose as equalities. In a bicategory, they hold only up to specified 2-cell isomorphisms (associators and unitors) satisfying coherence conditions analogous to Mac Lane's pentagon and triangle identities for monoidal categories. The category of spans in a category with pullbacks, profunctors between categories, and cobordisms between manifolds are all naturally bicategories. The coherence theorem guarantees every bicategory is equivalent (as a bicategory) to a strict 2-category, so you can often "strictify" for computational purposes — but the natural presentation of many important examples is inherently weak.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Cartesian Products and Relations → Partial Orders → Binary Relations → Equivalence Relations → Injective, Surjective, and Bijective Functions → Categories and Morphisms → Functors → Commutative Diagrams in Category Theory → Commutative Diagrams and Composition → Natural Transformations → 2-Categories and Weak Functors → Natural Isomorphisms Between Functors → Isomorphisms in Categories → Universal Properties → Initial and Terminal Objects → Products and Coproducts → Equalizers and Coequalizers → Limits and Colimits → Pullbacks and Pushouts → Adjoint Functors → Free Objects → Projective Objects and Projective Covers → Homological Dimension in Categories → Exact Sequences in Categories → Ext Functors as Derived Hom → Tor Functors as Derived Tensor Product → Derived Functors → Derived Categories and Derived Equivalences → Localization of Categories → 2-Categories

Longest path: 99 steps · 570 total prerequisite topics

Prerequisites (5)

Leads To (1)