# Comma category

In mathematics, a comma category (a special case being a slice category) is a construction in category theory. It provides another way of looking at morphisms: instead of simply relating objects of a category to one another, morphisms become objects in their own right. This notion was introduced in 1963 by F. W. Lawvere (Lawvere, 1963 p.36), although the technique did not become generally known until many years later. Several mathematical concepts can be treated as comma categories. Comma categories also guarantee the existence of some limits and colimits. The name comes from the notation originally used by Lawvere, which involved the comma punctuation mark. Although standard notation has changed since the use of a comma as an operator is potentially confusing, and even Lawvere dislikes the uninformative term "comma category" (Lawvere, 1963 p.13), the name still persists.

## Definition

The most general comma category construction involves two functors with the same codomain. Often one of these will have domain 1 (the one-object one-morphism category). Some accounts of category theory consider only these special cases, but the term comma category is actually much more general.

### General form

${\displaystyle {\mathcal {A}}\xrightarrow {\;\;S\;\;} {\mathcal {C}}\xleftarrow {\;\;T\;\;} {\mathcal {B}}}$

We can form the comma category ${\displaystyle (S\downarrow T)}$ as follows:

Morphisms are composed by taking ${\displaystyle (g,h)\circ (g',h')}$ to be ${\displaystyle (g\circ g',h\circ h')}$, whenever the latter expression is defined. The identity morphism on an object ${\displaystyle (\alpha ,\beta ,f)}$ is ${\displaystyle (\mathrm {id} _{\alpha },\mathrm {id} _{\beta })}$.

### Slice category

The first special case occurs when ${\displaystyle {\mathcal {A}}={\mathcal {C}}}$, ${\displaystyle S}$ is the identity functor, and ${\displaystyle {\mathcal {B}}={\textbf {1}}}$ (the category with one object ${\displaystyle *}$ and one morphism). Then ${\displaystyle T(*)=A}$ for some object ${\displaystyle A}$ in ${\displaystyle {\mathcal {C}}}$. In this case, the comma category is written ${\displaystyle ({\mathcal {C}}\downarrow A)}$, and is often called the slice category over ${\displaystyle A}$ or the category of objects over ${\displaystyle A}$. The objects ${\displaystyle (\alpha ,*,f)}$ can be simplified to pairs ${\displaystyle (\alpha ,f)}$, where ${\displaystyle f:\alpha \rightarrow A}$. Sometimes, ${\displaystyle f}$ is denoted ${\displaystyle \pi _{\alpha }}$. A morphism from ${\displaystyle (B,\pi _{B})}$ to ${\displaystyle (B',\pi _{B'})}$ in the slice category is then an arrow ${\displaystyle g:B\rightarrow B'}$ making the following diagram commute:

### Coslice category

The dual concept to a slice category is a coslice category. Here, ${\displaystyle S}$ has domain 1 and ${\displaystyle T}$ is an identity functor. In this case, the comma category is often written ${\displaystyle (A\downarrow {\mathcal {C}})}$, where ${\displaystyle A}$ is the object of ${\displaystyle {\mathcal {C}}}$ selected by ${\displaystyle S}$. It is called the coslice category with respect to ${\displaystyle A}$, or the category of objects under ${\displaystyle A}$. The objects are pairs ${\displaystyle (B,i_{B})}$ with ${\displaystyle i_{B}:A\rightarrow B}$. Given ${\displaystyle (B,i_{B})}$ and ${\displaystyle (B',i_{B'})}$, a morphism in the coslice category is a map ${\displaystyle h:B\rightarrow B'}$ making the following diagram commute:

### Arrow category

${\displaystyle S}$ and ${\displaystyle T}$ are identity functors on ${\displaystyle {\mathcal {C}}}$ (so ${\displaystyle {\mathcal {A}}={\mathcal {B}}={\mathcal {C}}}$). In this case, the comma category is the arrow category ${\displaystyle {\mathcal {C}}^{\rightarrow }}$. Its objects are the morphisms of ${\displaystyle {\mathcal {C}}}$, and its morphisms are commuting squares in ${\displaystyle {\mathcal {C}}}$.[1]

### Other variations

In the case of the slice or coslice category, the identity functor may be replaced with some other functor; this yields a family of categories particularly useful in the study of adjoint functors. For example, if ${\displaystyle T}$ is the forgetful functor mapping an abelian group to its underlying set, and ${\displaystyle s}$ is some fixed set (regarded as a functor from 1), then the comma category ${\displaystyle (s\downarrow T)}$ has objects that are maps from ${\displaystyle s}$ to a set underlying a group. This relates to the left adjoint of ${\displaystyle T}$, which is the functor that maps a set to the free abelian group having that set as its basis. In particular, the initial object of ${\displaystyle (s\downarrow T)}$ is the canonical injection ${\displaystyle s\rightarrow T(G)}$, where ${\displaystyle G}$ is the free group generated by ${\displaystyle s}$.

An object of ${\displaystyle (s\downarrow T)}$ is called a morphism from ${\displaystyle s}$ to ${\displaystyle T}$ or a ${\displaystyle T}$-structured arrow with domain ${\displaystyle s}$ in.[1] An object of ${\displaystyle (S\downarrow t)}$ is called a morphism from ${\displaystyle S}$ to ${\displaystyle t}$ or a ${\displaystyle S}$-costructured arrow with codomain ${\displaystyle t}$ in.[1]

Another special case occurs when both ${\displaystyle S}$ and ${\displaystyle T}$ are functors with domain 1. If ${\displaystyle S(*)=A}$ and ${\displaystyle T(*)=B}$, then the comma category ${\displaystyle (S\downarrow T)}$, written ${\displaystyle (A\downarrow B)}$, is the discrete category whose objects are morphisms from ${\displaystyle A}$ to ${\displaystyle B}$.

## Properties

For each comma category there are forgetful functors from it.

## Examples of use

### Some notable categories

Several interesting categories have a natural definition in terms of comma categories.

## References

1. {{#invoke:citation/CS1|citation |CitationClass=book }}
2. See I. 2.16.1 in Francis Borceux (1994), Handbook of Categorical Algebra 1, Cambridge University Press. ISBN 0-521-44178-1.