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. The name persists even though 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 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.
Suppose that
l{A}
l{B}
l{C}
S
T
lA\xrightarrow{ S }lC\xleftarrow{ T }lB
We can form the comma category
(S\downarrowT)
(A,B,h)
A
l{A}
B
l{B}
h:S(A) → T(B)
l{C}
(A,B,h)
(A',B',h')
(f,g)
f:A → A'
g:B → B'
lA
lB
Morphisms are composed by taking
(f',g')\circ(f,g)
(f'\circf,g'\circg)
(A,B,h)
(idA,idB)
See main article: Overcategory. The first special case occurs when
l{C}=l{A}
S
l{B}=bf{1}
*
T(*)=A*
A*
l{A}
lA\xrightarrow{ idl{A
In this case, the comma category is written
(l{A}\downarrowA*)
A*
A*
(A,*,h)
(A,h)
h:A → A*
h
\piA
(f,id*)
(A,\piA)
(A',\piA')
f:A → A'
See main article: Overcategory. The dual concept to a slice category is a coslice category. Here,
l{C}=l{B}
S
bf{1}
T
bf{1}\xrightarrow{ B* }lB\xleftarrow{ idl{B
In this case, the comma category is often written
(B*\downarrowl{B})
B*=S(*)
l{B}
S
B*
B*
(B,\iotaB)
\iotaB:B* → B
(B,\iotaB)
(B',\iotaB')
g:B → B'
S
T
l{C}
l{A}=l{B}=l{C}
l{C}\xrightarrow{ idl{C
In this case, the comma category is the arrow category
l{C} →
l{C}
l{C}
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
T
s
(s\downarrowT)
s
T
(s\downarrowT)
s → T(G)
G
s
An object of
(s\downarrowT)
s
T
T
s
(S\downarrowt)
S
t
S
t
Another special case occurs when both
S
T
bf{1}
S(*)=A
T(*)=B
(S\downarrowT)
(A\downarrowB)
A
B
An inserter category is a (non-full) subcategory of the comma category where
l{A}=l{B}
f=g
S\circ\pi1
T\circ\pi2
\pi1
\pi2
l{A} x l{B}
For each comma category there are forgetful functors from it.
S\downarrowT\tolA
(A,B,h)\mapstoA
(f,g)\mapstof
S\downarrowT\tolB
(A,B,h)\mapstoB
(f,g)\mapstog
S\downarrowT\to{lC} →
(A,B,h)\mapstoh
(f,g)\mapsto(Sf,Tg)
Several interesting categories have a natural definition in terms of comma categories.
\scriptstyle{(\bull\downarrowSet)}
\scriptstyle{\bull}
\scriptstyle{Set
\scriptstyle{(\bull\downarrowTop)}
R
\scriptstyle{(R\downarrowRing)}
f:R\toS
R
S
h:S\toT
\scriptstyle{(Set\downarrowD)}
\scriptstyle{D:Set → Set
s
s x s
(a,b,f)
a
b
f:a → (b x b)
b
a
f
b x b
(g,h):(a,b,f) → (a',b',f')
f'\circg=D(h)\circf
S
A
(S\downarrowA)
A
S
A
A
(B,\piB)
B
\piB
B
A
Limits and colimits in comma categories may be "inherited". If
l{A}
l{B}
T:l{B} → l{C}
S\colonl{A} → l{C}
(S\downarrowT)
(S\downarrowT) → l{A}
(S\downarrowT) → l{B}
l{A}
l{B}
S:l{A} → l{C}
(S\downarrowT)
For example, note that in the above construction of the category of graphs as a comma category, the category of sets is complete and cocomplete, and the identity functor is continuous and cocontinuous. Thus, the category of graphs is complete and cocomplete.
The notion of a universal morphism to a particular colimit, or from a limit, can be expressed in terms of a comma category. Essentially, we create a category whose objects are cones, and where the limiting cone is a terminal object; then, each universal morphism for the limit is just the morphism to the terminal object. This works in the dual case, with a category of cocones having an initial object. For example, let
l{C}
F:l{C} → l{C} x l{C}
c
(c,c)
f
(f,f)
(a,b)
F
(c,c)
\rho:(a,b) → (c,c)
\rho':(a,b) → (d,d)
\sigma:c → d
F(\sigma)\circ\rho=\rho'
((a,b)\downarrowF)
l{C}
Lawvere showed that the functors
F:l{C} → l{D}
G:l{D} → l{C}
(F\downarrowidl{D})
(idl{C}\downarrowG)
idl{D}
idl{C}
l{D}
l{C}
l{C} x l{D}
If the domains of
S,T
S\downarrowT
A=B,A'=B',f=g
S\toT
S(A)\toT(A)
η:S\toT
S,T:lA\tolC
lA\to(S\downarrowT)
A
(A,A,ηA)
f=g
(f,g)
S\toT
lA\to(S\downarrowT)
S\downarrowT