## 2-Categories

Here’s another example of an enriched category. This one is extremely important, and to a certain extent it’s been my goal in my coverage of category theory. It’s also a very basic chunk of what they talk about over at the *n-Category Café*.

The monoidal category we use is . If set-theoretical questions make you nervous, read this as “small categories”. It does work out for general categories, though. We know that is cartesian, and thus monoidal. We can take pairwise products of categories, and the terminal category is — the category with one object and one (identity) morphism. The “underlying” functor gives the collection of objects in a given category.

Okay, so what’s a category enriched over ? We’ve got a collection of objects, and for each pair of objects in we have a *category* of morphisms. In each of these we have a collection of objects (called “1-morphisms”), and for each pair of 1-morphisms in we have a collection of morphisms (called “2-morphisms”).

Wow, that looks confusing. Okay, let’s say it again a little differently. We have:

- a collection of objects (“0-morphisms”)
- collections of 1-morphisms that go from one object to another
- collections of 2-morphisms that go from one 1-morphism between a pair of objects to another 1-morphism between the same pair of objects

There’s also a “composition” functor between the categories of 1-morphisms. This takes a 1-morphism from to and one from to and gives a composite 1-morphism from to . Since it’s a functor, it also acts on 2-morphisms. If is a 2-morphism in (that is, both and go from to ) and is a 2-morphism in , then we get a composite 2-morphism . Of course, we also can take and and get a composite 2-morphism by using the composition in the category . The composition functor is associative.

For each object there’s an identity 1-morphism . And then *it* has an identity 2-morphism . The 1-morphism acts as the identity for the composition functor , and it’s easy enough to verify that is not only the identity for the composition in , but it’s also the identity for the composition of 2-morphisms.

We call this structure a “2-category”, or more specifically a “strict 2-category”. We’ll get to weak ones eventually.

So do we know any good examples? Sure. The first is itself! Here the objects are categories, the 1-morphisms are functors between categories, and the 2-morphisms are natural transformations between functors. In fact we already saw right when we defined a natural transformation that given a pair of categories we have a category of functors between them, which is halfway to having a 2-category right there! And then we know we have both compositions of 2-morphisms because those are just the “horizonatal” and “vertical” compositions we first needed when we talked about units and counits of adjunctions.

Speaking of adjunctions, they give another 2-category: . The objects here again are categories, but now the 1-morphisms are adjunctions between categories. And then we have conjugate pairs between adjunctions, with the “horizontal” and “vertical” compositions between them as our 2-morphisms.

And as a last example, what’s a 2-category with one object? Well, we have our object , and a category . Any two 1-morphisms (the objects of this category) can be composed with each other by , and there’s an identity 1-morphism. Now let’s just shift our language and say “object” instead of “1-morphism”, “morphism” instead of “2-morphism”, instead of , and instead of . What we’re left with is exactly the definition of a strict monoidal category! That is: just as a category with one object is a monoid, so a 2-category with one object is a monoidal category!

There are a lot of 2-categories out there, and we’ll be mentioning many more as the time goes on.

I’m curious as to where you’re heading on this blog. What sort of categorical questions are you really interested in? I mean besides the obvious: weak n-cat definitions etc.

Comment by Kea | August 16, 2007 |

I don’t really have a fixed goal, but once I’ve done a bunch about enriched categories in general it’s on to abelian categories and homological algebra.

Comment by John Armstrong | August 16, 2007 |

[...] Enriched Categories So we know that — the collection of all categories — forms a 2-category with functors as 1-morphisms and with natural transformations as 2-morphisms. It shouldn’t [...]

Pingback by The 2-category of Enriched Categories « The Unapologetic Mathematician | August 17, 2007 |

[...] Of course along with 2-categories, we must have 2-functors to map from one to [...]

Pingback by 2-functors « The Unapologetic Mathematician | August 18, 2007 |

[...] we were talking about enriched categories we mentioned the case of 2-categories, where between each pair of objects we have a hom-category and so on. We also mentioned that if a [...]

Pingback by Weak 2-Categories « The Unapologetic Mathematician | October 4, 2007 |

Quite a nice exposition – I’d made several attempts on the one in Barr & Wells (1999:136-143) without really getting it, but this helped a lot. But I can’t find it said here that the “composition” functor is associative (tho this is implied in the later post on weak 2-categories). Well but maybe loading in too many finicky details at the start contributes to people not getting the idea.

When I felt I understood this stuff better, it also seemed to me that the really basic idea was that natural transformations (as long as set-theoretical sizes can be kept under control) serve as category arrows in two directions at once. The rest feels like details needed to get some sensible behavior.

Comment by MathOutsider | October 21, 2007 |

MO: Well, yes. Natural transformations do compose in two directions. In fact, I even said so explicitly.. somewhere back in the archives.

Comment by John Armstrong | October 21, 2007 |

Oops, found the sentence “the composition functor is associative. Maybe just put `associative’ in front of “composition” in the first sentence of the paragraph?

Comment by MathOutsider | October 21, 2007 |

Re 7, yes I’m sure you did say it, the point was not supposed to be about bare content but about emphasis.

Comment by MathOutsider | October 21, 2007 |

[...] with only one object. So we should really be thinking about the category of algebras as a full sub-2-category of the 2-category of categories enriched over [...]

Pingback by The Category of Representations of a Hopf Algebra « The Unapologetic Mathematician | November 18, 2008 |

[...] thing because it could get too complicated. But since when would I, of all people, shy away from 2-categories? In case it wasn’t obvious then, it’s because we’re actually going to extend in [...]

Pingback by Homotopies as 2-Morphisms « The Unapologetic Mathematician | November 30, 2011 |

[...] we’ve seen that differentiable manifolds, smooth maps, and homotopies form a 2-category, but it’s not the only 2-category around. The algebra of differential forms — together [...]

Pingback by The Poincaré Lemma (setup) « The Unapologetic Mathematician | December 2, 2011 |