In my last post, I spent a good bit trying to get you interested in looking at universal properties. Hopefully, you’ve read that post, and are still sufficiently interested to continue, because it’s only going to get harder before we see the light.

We left off at defining these special objects in some category **C** called “initial” and “terminal” objects. Go read the previous post now if you need a refresher on what they are.

Back now? Good. The next object of study is called a *comma category*, a category that, in a sense, examines a particular category by looking at certain kinds of morphisms in it. Take that with a grain of salt, please. Formally, if we have three categories **A**,**B, C, **and functors and , the comma category is the category where

- The objects are triples with , , and is a morphism in
**C**. - The morphisms are pairs with in
**A**and in**B**, such that . - Composition of morphisms is done component-wise. Thus if and , then .

Now, as far as I’ve seen, one most often comes across comma category theory through a select few vast simplifications.

**The Slice Category**

Let **A = 1**, the category with only one object (usually denoted and one morphism, the identity map. Then a functor from **1** to any other category **C** simply “picks out” an object of **C. **That is, is uniquely determined by the image of , say .

In the definition of a comma category, we need three categories. Let **C** be any category, and suppose **B = C. **let be the indentity functor. Then our three categories are **1,C, **and **C.** The comma category is most often written as X/ **C**, and is called the *slice category* and can be seen as the category of “objects of **C** ‘under’ X.” Specifically:

- The objects of X/
**C**are triples , with , with an object of**T**. The objects are usually simplified to , since is the only object in**1**. - The morphisms are , with a morphism in
**C**such that . - Composition is defined in the only natural way (it’s a trivial exercise to check).

One can, of course, define the *co-slice* *category* which is the same as the slice category, except the directions of all the arrows are reversed. These are the “objects ‘over’ X.”

Remember the category of “pointed topological spaces” from before? It turns out that this is actually a comma category! Let be the functor with value any singleton set . Then the category has objects with a topological space and an inclusion of a point into . We can then make the obvious identification . The morphisms here are precisely the basepoint preserving ones.

Here’s another cool example: Let **C ** be a category with an initial object . Then I want to show that is “isomorphic as a category” to **C**. I haven’t yet defined what that means, sorry. It just means that there are functors and such that and . Anyway, let be the functor that sends each pair to the **C**-object , and each morphism to the map . This is another instance of a “forgetful functor,” by the way.

Since is an initial object, for any other **C-**object there is one and only one morphism . With this in mind, we define via , and for any morphism , . It’s then trivial to check that these functors compose to get the identity functors on both sides. Therefore they are isomorphic.

Obviously the dual statement holds for categories **C** with a terminal object and the co-slice category $\textbf{C}/y$. (note: I owe these above cool examples to this fantastic post: http://drexel28.wordpress.com/2012/01/10/comma-categories-pt-i/. You should really visit this guy’s blog.)

**Almost Slice Categories**

Let’s step up the abstraction a bit. Let **C** and **D** be two categories, and let be a functor. Let be the functor that picks out a **C**-object . Then the comma category , written most often as , is the category of “morphisms from to ” (so sayeth the wiki page). You can think of these as (almost) slice categories, in that is now “over” objects of the form for an object in **D*** *instead of just all **C**-objects.

Remember the example of the kernel of a group homomorphism ? We can now almost talk about that whole business of “the largest group that is killed off by .” let **D** be the subcategory of **Grp** whose objects are groups such that for any group homomorphism , the composition is the zero map to . The morphisms are simply those induced by the parent category **Grp**.

Then if we let pick out , and be the functor that sends each object and morphism of **D** to itself, then is the category that simply “pairs off” groups and morphisms $i_K : K \to G$ such that .

What would a terminal object be in ? 🙂 Try to find it!

I think you mean to define your functor from A to C as S. Otherwise I have no clue what the definition of the comma category is.

Yep, good call. I fixed it.