# nLab comma category

category theory

## Applications

#### Limits and colimits

limits and colimits

# Contents

## Idea

The comma category of two functors $f:C\to E$ and $g:D\to E$ is like an arrow category of $E$ where all arrows have their source in the image of $f$ and their target in the image of $g$ (and the morphisms between arrows keep track of how these sources and targets are in these images). It is a kind of 2-pullback: a directed refinement of the homotopy pullback of two functors between groupoids.

## Definition

We discuss three equivalent definitions of comma categories

###### Remark

The terminology “comma category” is a holdover from the original notation $\left(f,g\right)$ for such a category, which generalises $\left(x,y\right)$ or $C\left(x,y\right)$ for a hom-set.

Another common notation for the comma category is $\left(f↓g\right)$. The original notation, from which the terminology is derived, is $\left(f,g\right)$, but this is rarely used any more.

### In components

###### Definition

If $f:C\to E$ and $g:D\to E$ are functors, their comma category is the category $\left(f/g\right)$ whose

• objects are triples $\left(c,d,\alpha \right)$ where $c\in C$, $d\in D$, and $\alpha :f\left(c\right)\to g\left(d\right)$ is a morphism in $E$, and whose

• morphisms from $\left({c}_{1},{d}_{1},{\alpha }_{1}\right)$ to $\left({c}_{2},{d}_{2},{\alpha }_{2}\right)$ are pairs $\left(\beta ,\gamma \right)$, where $\beta :{c}_{1}\to {c}_{2}$ and $\gamma :{d}_{1}\to {d}_{2}$ are morphisms in $C$ and $D$, respectively, such that ${\alpha }_{2}.f\left(\beta \right)=g\left(\gamma \right).{\alpha }_{1}$.

$\begin{array}{ccc}f\left({c}_{1}\right)& \stackrel{f\left(\beta \right)}{\to }& f\left({c}_{2}\right)\\ {↓}^{{\alpha }_{1}}& & {↓}^{{\alpha }_{2}}\\ g\left({d}_{1}\right)& \stackrel{g\left(\gamma \right)}{\to }& g\left({d}_{2}\right)\\ \\ \left({c}_{1},{d}_{1},{\alpha }_{1}\right)& \stackrel{\left(\beta ,\gamma \right)}{\to }& \left({c}_{2},{d}_{2},{\alpha }_{2}\right)\end{array}$\array{ f(c_1) &\stackrel{f(\beta)}{\to}& f(c_2) \\ \downarrow^{\alpha_1} && \downarrow^{\alpha_2} \\ g(d_1) &\stackrel{g(\gamma)}{\to}& g(d_2) \\ \\ (c_1,d_1, \alpha_1) &\stackrel{(\beta,\gamma)}{\to}& (c_2,d_2, \alpha_2) }
• composition of morpjhisms is given on components by composition in $C$ and $D$.

### As a fiber product

Let $I=\left\{a\to b\right\}$ be the (directed) interval category and ${E}^{I}=\mathrm{Funct}\left(I,E\right)$ the functor category.

The comma category is the pullback

$\begin{array}{ccc}\left(f/g\right)& \to & {E}^{I}\\ ↓& & {↓}^{{d}_{0}×{d}_{1}}\\ C×D& \stackrel{f×g}{\to }& E×E\end{array}$\array{ (f/g) &\to& E^I \\ \downarrow && \downarrow^{\mathrlap{d_0 \times d_1}} \\ C \times D &\stackrel{f \times g}{\to}& E \times E }

(in the 1-category Cat of categories).

Compare this with the construction at generalized universal bundle and with the definition of loop space object.

### As a 2-pullback

Alternatively, the comma category is the “lax pullback” – or rather the comma object (see the discussion at 2-limit) of the pullback diagram,

$\begin{array}{ccc}& & C\\ & & {↓}^{f}\\ D& \stackrel{g}{\to }& E\end{array}$\array{ && C \\ && \downarrow^f \\ D &\stackrel{g}{\to}& E }

i.e. the universal cone that commutes up to a natural transformation

$\begin{array}{ccc}\left(f/g\right)& \to & C\\ ↓& ⇙& {↓}^{f}\\ D& \stackrel{g}{\to }& E\end{array}$\array{ (f/g) &\to& C \\ \downarrow &\swArrow& \downarrow^f \\ D &\stackrel{g}{\to}& E }

In terms of the imagery of loop spaces objects, the comma category is the category of directed paths in $E$ which start in the image of $f$ and end in the image of $g$.

## Examples

• If $f$ and $g$ are both the identity functor of a category $C$, then $\left(f/g\right)$ is the category ${C}^{2}$ of arrows in $C$.

• If $f$ is the identity functor of $C$ and $g$ is the inclusion $1\to C$ of an object $c\in C$, then $\left(f/g\right)$ is the slice category $C/c$.

• Likewise if $g$ is the identity and $f$ is the inclusion of $c$, then $\left(f/g\right)$ is the coslice category $c/C$.

## Properties

### 2-categorical properties

The comma category $\left(f/g\right)$ comes with a canonical 2-cell in the square

which is universal in the 2-category Cat; that is, it is an example of a 2-limit (in fact, it is a strict 2-limit). Squares with the same universal property in an arbitrary 2-category are called comma squares and their top left vertex is called a comma object.

See at