In mathematics, a comma 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, such as the special case of a slice category. 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 disliked the uninformative term "comma category" (Lawvere, 1963 p. 13).
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
Suppose that <math>\mathcal{A}</math>, <math>\mathcal{B}</math>, and <math>\mathcal{C}</math> are categories, and <math>S</math> and <math>T</math> (for source and target) are functors:
<div class="center">center|frameless|120x120px</div>
We can form the comma category <math>(S \downarrow T)</math> as follows:
- The objects are all triples <math>(A, B, h)</math> with <math>A</math> an object in <math>\mathcal{A}</math>, <math>B</math> an object in <math>\mathcal{B}</math>, and <math>h : S(A)\rightarrow T(B)</math> a morphism in <math>\mathcal{C}</math>.
- The morphisms from <math>(A, B, h)</math> to <math>(A', B', h')</math> are all pairs <math>(f, g)</math> where <math>f : A \rightarrow A'</math> and <math>g : B \rightarrow B'</math> are morphisms in <math>\mathcal A</math> and <math>\mathcal B</math> respectively, such that the following diagram commutes:
100x100px|frameless|center|Comma Diagram
Morphisms are composed by taking <math>(f', g') \circ (f, g)</math> to be <math>(f' \circ f, g' \circ g)</math>, whenever the latter expression is defined. The identity morphism on an object <math>(A, B, h)</math> is <math>(\mathrm{id}_{A}, \mathrm{id}_{B})</math>.
Slice category
The first special case occurs when <math>\mathcal{C} = \mathcal{A}</math>, the functor <math>S</math> is the identity functor, and <math>\mathcal{B}=\textbf{1}</math> (the category with one object <math>*</math> and one morphism). Then <math>T(*) = A_*</math> for some object <math>A_*</math> in <math>\mathcal{A}</math>.
<div class="center">center|frameless|150x150px</div>
In this case, the comma category is written <math>(\mathcal{A} \downarrow A_*)</math>, and is often called the slice category over <math>A_*</math> or the category of objects over <math>A_*</math>. The objects <math>(A, *, h)</math> can be simplified to pairs <math>(A, h)</math>, where <math>h : A \rightarrow A_*</math>. Sometimes, <math>h</math> is denoted by <math>\pi_A</math>. A morphism <math>(f,\mathrm{id}_*)</math> from <math>(A, \pi_A)</math> to <math>(A', \pi_{A'})</math> in the slice category can then be simplified to an arrow <math>f : A \rightarrow A'</math> making the following diagram commute:
107x107px|frameless|center|Slice Diagram
Coslice category
The dual concept to a slice category is a coslice category. Here, <math>\mathcal{C} = \mathcal{B}</math>, <math>S</math> has domain <math>\textbf{1}</math> and <math>T</math> is an identity functor.
<div class="center">
frameless|150x150px
</div>
In this case, the comma category is often written <math>(B_*\downarrow \mathcal{B})</math>, where <math>B_*=S(*)</math> is the object of <math>\mathcal{B}</math> selected by <math>S</math>. It is called the coslice category with respect to <math>B_*</math>, or the category of objects under <math>B_*</math>. The objects are pairs <math>(B, \iota_B)</math> with <math>\iota_B : B_* \rightarrow B</math>. Given <math>(B, \iota_B)</math> and <math>(B', \iota_{B'})</math>, a morphism in the coslice category is a map <math>g : B \rightarrow B'</math> making the following diagram commute:
105x105px|frameless|center|Coslice Diagram
Arrow category
<math>S</math> and <math>T</math> are identity functors on <math>\mathcal{C}</math> (so <math>\mathcal{A} = \mathcal{B} = \mathcal{C}</math>).
<div class="center">
frameless|150x150px
</div>
In this case, the comma category is the arrow category <math>\mathcal{C}^\rightarrow</math>. Its objects are the morphisms of <math>\mathcal{C}</math>, and its morphisms are commuting squares in <math>\mathcal{C}</math>.
120x120px|frameless|center|Arrow Diagram
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 <math>T</math> is the forgetful functor mapping an abelian group to its underlying set, and <math>s</math> is some fixed set (regarded as a functor from 1), then the comma category <math>(s \downarrow T)</math> has objects that are maps from <math>s</math> to a set underlying a group. This relates to the left adjoint of <math>T</math>, 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 <math>(s \downarrow T)</math> is the canonical injection <math>s\rightarrow T(G)</math>, where <math>G</math> is the free group generated by <math>s</math>.
An object of <math>(s \downarrow T)</math> is called a morphism from <math>s</math> to <math>T</math> or a <math>T</math>-structured arrow with domain <math>s</math>. and the projection functors <math>(S\downarrow T) \rightarrow \mathcal{A}</math> and <math>(S\downarrow T) \rightarrow \mathcal{B}</math> are continuous. Similarly, if <math>\mathcal{A}</math> and <math>\mathcal{B}</math> are cocomplete, and <math>S : \mathcal{A} \rightarrow \mathcal{C}</math> is cocontinuous, then <math>(S \downarrow T)</math> is cocomplete, and the projection functors are cocontinuous.
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 <math>\mathcal{C}</math> be a category with <math>F : \mathcal{C} \rightarrow \mathcal{C} \times \mathcal{C}</math> the functor taking each object <math>c</math> to <math>(c, c)</math> and each arrow <math>f</math> to <math>(f, f)</math>. A universal morphism from <math>(a, b)</math> to <math>F</math> consists, by definition, of an object <math>(c, c)</math> and morphism <math>\rho : (a, b) \rightarrow (c, c)</math> with the universal property that for any morphism <math>\rho' : (a, b) \rightarrow (d, d)</math> there is a unique morphism <math>\sigma : c \rightarrow d</math> with <math>F(\sigma) \circ \rho = \rho'</math>. In other words, it is an object in the comma category <math>((a, b) \downarrow F)</math> having a morphism to any other object in that category; it is initial. This serves to define the coproduct in <math>\mathcal{C}</math>, when it exists.
Adjunctions
William Lawvere showed that the functors <math>F : \mathcal{C} \rightarrow \mathcal{D}</math> and <math>G : \mathcal{D} \rightarrow \mathcal{C}</math> are adjoint if and only if the comma categories <math>(F \downarrow id_\mathcal{D})</math> and <math>(id_\mathcal{C} \downarrow G)</math>, with <math>id_\mathcal{D}</math> and <math>id_\mathcal{C}</math> the identity functors on <math>\mathcal{D}</math> and <math>\mathcal{C}</math> respectively, are isomorphic, and equivalent elements in the comma category can be projected onto the same element of <math>\mathcal{C} \times \mathcal{D}</math>. This allows adjunctions to be described without involving sets, and was in fact the original motivation for introducing comma categories.
Natural transformations
If the domains of <math>S, T</math> are equal, then the diagram which defines morphisms in <math>S\downarrow T</math> with <math>A=B, A'=B', f=g</math> is identical to the diagram which defines a natural transformation <math>S\to T</math>. The difference between the two notions is that a natural transformation is a particular collection of morphisms of type of the form <math>S(A)\to T(A)</math>, while objects of the comma category contains all morphisms of type of such form. A functor to the comma category selects that particular collection of morphisms. This is described succinctly by an observation by S.A. Huq
that a natural transformation <math>\eta:S\to T</math>, with <math>S, T:\mathcal A \to \mathcal C</math>, corresponds to a functor <math>\mathcal A \to (S\downarrow T)</math> which maps each object <math>A</math> to <math>(A, A, \eta_A)</math> and maps each morphism <math>f=g</math> to <math>(f, g)</math>. This is a bijective correspondence between natural transformations <math>S\to T</math> and functors <math>\mathcal A \to (S\downarrow T)</math> which are sections of both forgetful functors from <math>S\downarrow T</math>.
