# Category Theory/Printable version

Category Theory

The current, editable version of this book is available in Wikibooks, the open-content textbooks collection, at
https://en.wikibooks.org/wiki/Category_Theory

Permission is granted to copy, distribute, and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 3.0 License.

# Definition, examples

Definition (category):

A category ${\displaystyle {\mathcal {C}}}$ is a class of objects, together with a class of so-called morphisms, each of which have a domain and a target, and a composition of morphisms, such that the following set of axioms hold, if for any two objects ${\displaystyle A}$ and ${\displaystyle B}$ of ${\displaystyle {\mathcal {C}}}$ the subclass of morphisms with domain ${\displaystyle A}$ and target ${\displaystyle B}$ is denoted ${\displaystyle \operatorname {Hom} (A,B)}$:

1. Whenever either ${\displaystyle A\neq A'}$ or ${\displaystyle B\neq B'}$, ${\displaystyle \operatorname {Hom} (A,B)}$ and ${\displaystyle \operatorname {Hom} (A',B')}$ are disjoint
2. For any objects ${\displaystyle A,B,C}$ of ${\displaystyle {\mathcal {C}}}$ and any morphisms ${\displaystyle f:A\to B}$ and ${\displaystyle g:B\to C}$, there exists a morphism ${\displaystyle h=g\circ f\in \operatorname {Hom} (A,C)}$, called the composition of ${\displaystyle f}$ and ${\displaystyle g}$
3. Composition is associative, ie. ${\displaystyle f\circ (g\circ h)=(f\circ g)\circ h}$
4. Whenever ${\displaystyle A}$ is an object of ${\displaystyle {\mathcal {C}}}$, then there exists a unique morphism ${\displaystyle 1_{A}\in \operatorname {Hom} (A,A)}$

## Exercises

1. If ${\displaystyle f\circ g}$ is injective, prove that ${\displaystyle g}$ is injective.

# Natural transformations

Definition (natural transformation):

Let ${\displaystyle {\mathcal {A}},{\mathcal {B}}}$ be categories, and let ${\displaystyle F,G:{\mathcal {A}}\to {\mathcal {B}}}$ be two functors. A natural transformation between these two functors is a collection of morphisms of ${\displaystyle {\mathcal {B}}}$, one for each object ${\displaystyle A}$ of ${\displaystyle {\mathcal {A}}}$, namely ${\displaystyle f_{A}:F(A)\to G(A)}$, such that for all morphisms ${\displaystyle g:A\to A'}$ of ${\displaystyle {\mathcal {A}}}$, the following diagram commutes:

diagram placeholder

# Old content

One further basic notion in the theory of categories, or, as it may be said, a basic item of categorical language, will now be introduced. This is the notion of a natural transformation of functors from one category to another. Indeed, the whole language and apparatus of categories and functors were developed initially by the U.S. mathematicians Samuel Eilenberg and Saunders MacLane in order to render precise the intuitive concept of naturality. First an example will be given, the example that may be said to have motivated the definition.

## Motivating example

Let ${\displaystyle \mathbb {V} }$ be a vector space over some field ${\displaystyle F}$, and let ${\displaystyle \mathbb {V} ^{*}}$ be the dual space of ${\displaystyle \mathbb {V} }$; that is, the space of linear functionals on ${\displaystyle \mathbb {V} }$. There is then a linear transformation ${\displaystyle T:\mathbb {V} \to \mathbb {V} ^{**}}$ that is given. There is an intuitive feeling that the linear transformation ${\displaystyle T}$ is natural because its description only involves the terms u and f. Now if ${\displaystyle \mathbb {V} }$ is finite-dimensional, then it is known that ${\displaystyle T}$ is an isomorphism in the category of vector spaces over ${\displaystyle F}$ and linear transformations. One way of proving that ${\displaystyle T}$ is then an isomorphism is to show that ${\displaystyle \mathbb {V} }$ and ${\displaystyle \mathbb {V} ^{**}}$ are isomorphic and then to observe that ${\displaystyle T}$ is one–one. The usual proof that ${\displaystyle \mathbb {V} }$ and ${\displaystyle \mathbb {V} ^{**}}$ are isomorphic would be to proceed by establishing an isomorphism between ${\displaystyle \mathbb {V} }$ and ${\displaystyle \mathbb {V} ^{*}}$, in the case when ${\displaystyle \mathbb {V} }$ is finite-dimensional. Now if a base ${\displaystyle (e_{1},\dots ,e_{N})}$ for ${\displaystyle \mathbb {V} }$ is given, then a basis for ${\displaystyle \mathbb {V} ^{*}}$ may be set up, called the dual basis, by defining ${\displaystyle e_{i}^{*}}$ to be that linear functional on ${\displaystyle \mathbb {V} }$ given by certain rules (see 350). Then the correspondence ${\displaystyle e_{i}\leftrightarrow e_{i}^{*}}$ sets up an isomorphism between ${\displaystyle \mathbb {V} }$ and ${\displaystyle \mathbb {V} ^{*}}$.

On the other hand, this isomorphism does not look natural, because it depends on the choice of bases. Of course, the argument above could be generalized to set up a linear transformation from ${\displaystyle \mathbb {V} }$ to ${\displaystyle \mathbb {V} }$* even if ${\displaystyle \mathbb {V} }$ is not finite-dimensional over ${\displaystyle F}$, but, again, this transformation would not appear to be natural. What is required is a formal and precise expression of the feeling that, for finite-dimensional vector spaces ${\displaystyle \mathbb {V} }$ over the field ${\displaystyle F}$, ${\displaystyle \mathbb {V} }$ and ${\displaystyle \mathbb {V} ^{**}}$ are naturally isomorphic, while ${\displaystyle \mathbb {V} }$ and ${\displaystyle \mathbb {V} ^{*}}$ are isomorphic in some unnatural way. Eilenberg and MacLane solved this problem in their seminal article, “General Theory of Natural Equivalences,” published in 1945, which laid the foundation of the theory of categories.

## Duality

For any category ${\displaystyle C}$ a new category ${\displaystyle C^{op}}$ can be formed by interchanging the domains and codomains of the morphisms of ${\displaystyle C}$. More precisely, in the category ${\displaystyle C^{op}}$ the objects are simply those of ${\displaystyle C}$ and the effect of interchange of domains is expressed in an equation (see 359). Moreover, the composition in ${\displaystyle C^{op}}$ is simply that of ${\displaystyle C}$, suitably interpreted. ${\displaystyle C^{op}}$ is called the category opposite to ${\displaystyle C}$; notice that ${\displaystyle C^{op^{op}}}$ = ${\displaystyle C}$. This apparently trivial operation leads to highly significant results when specific categories are used. In the general setting it enables any concept in the language of categories to be dualized. For example, the coproduct in ${\displaystyle C}$ is simply the product in ${\displaystyle C^{op}}$. Any theorem that holds in an arbitrary category has a dual form. For example, the theorem asserting that the product in an arbitrary category is associative may be effectively restated as asserting that the coproduct in an arbitrary category is associative. In the special cases, however, the second statement looks very different from the first. For example, in the category of sets, the coproduct becomes the disjoint union; in the category of groups it is the free product; and in a pre-ordered set regarded as a category, the coproduct is the least upper bound. In particular, for the set of natural numbers, ordered by divisibility, the coproduct is the LCM. Thus, the same universal argument that led to the deduction that the GCD is associative also indicates that the LCM is associative. The duality principle has very wide ramifications indeed. Here it is merely noted that the important concept of a contravariant functor ${\displaystyle F:{\mathcal {C}}\to {\mathcal {D}}}$ may be most simply defined as a functor ${\displaystyle F:{\mathcal {C}}^{op}\to {\mathcal {D}}}$. Thus the association of the dual vector space ${\displaystyle \mathbb {V} ^{*}}$ with ${\displaystyle \mathbb {V} }$ yields a contravariant functor from ${\displaystyle \mathbb {V} }$ to ${\displaystyle \mathbb {V} }$ itself.

## Definition of natural transformation

Suppose ${\displaystyle \Phi }$, ${\displaystyle \Psi }$ are two functors, both from the category ${\displaystyle {\mathcal {C}}}$ to the category ${\displaystyle {\mathcal {D}}}$.

Then a natural transformation ${\displaystyle \eta :\Phi \to \Psi }$ is a rule that assigns to each object A of category ${\displaystyle {\mathcal {C}}}$ a morphism ${\displaystyle \eta _{A}:\Phi (A)\to _{\mathcal {D}}\Psi (A)}$.

The morphisms ${\displaystyle \eta _{A}}$involved must be subject to the condition that the diagram

should be commutative for every ${\displaystyle f:A\to _{\mathcal {C}}B}$ (note ${\displaystyle f}$ is a morphism in the category ${\displaystyle {\mathcal {C}}}$); that is, ${\displaystyle \Psi (f)\circ \eta _{A}=\eta _{B}\circ \Phi (f)}$ (note the commutative diagram is drawn in category ${\displaystyle {\mathcal {D}}}$).

## Natural isomorphisms

Further, if ${\displaystyle \eta _{A}}$ is invertible for each A, then ${\displaystyle \eta }$ is said to be natural isomorphism (or a natural equivalence). It is clear that if ${\displaystyle \eta }$ is a natural equivalence from functors ${\displaystyle \Phi }$ to ${\displaystyle \Psi }$, then ${\displaystyle \eta ^{-1}}$, given by an equation (see 352), is a natural equivalence from functors ${\displaystyle \Psi }$ to ${\displaystyle \Phi }$. Thus the term equivalence used here is fully justified. Indeed, the functors from ${\displaystyle {\mathcal {C}}}$ to ${\displaystyle {\mathcal {D}}}$ may be collected into equivalence classes according to the existence of a natural equivalence between them.

## Examples

This definition can be tested against the example. Consider two functors from K-Vect to K-Vect, in which K-Vect is the category of vector spaces over the field K and linear transformations. One functor is the identity functor. The other functor is the double dual functor ** that associates with every vector space V its double dual V** and with every linear transformation f : UV in the linear transformation f**: U** → V** (see 353). A linear transformation T: VV** was described above. It is easy to check that T is a natural transformation from the identity functor to the functor **. If the subcategory f of K-Vect that consists of finite-dimensional vector spaces over K and their linear transformations is considered, then it turns out that the functor ** transforms f into itself; and the natural transformation T, restricted to f, is then a natural equivalence. Further examples of natural transformations of functors can be given:

• The category of Abelian groups and homomorphisms is considered. With every Abelian group may be associated its torsion subgroup. The torsion subgroup AT of the Abelian group A consists of those elements of A that are of finite order. A homomorphism from A to B must necessarily send AT to BT. Thus a functor f is obtained from to (or to T, the category of torsion Abelian groups and their homomorphisms), by associating with every Abelian group A the Abelian group FA = AT. Now AT is a subgroup of A. Thus there is always an embedding iA of AT in A. It is easy to see that i is a natural transformation from the torsion functor f to the identity functor. Further, the quotient group Afr = A/AT may be considered. It is a torsion-free Abelian group. This gives a functor g from to (or from to fr, the category of torsion-free Abelian groups) by associating with the Abelian group A the Abelian group GA = Afr. Then the projection of A onto Afr yields a natural transformation from the identity functor to the torsion-free functor g.
• With every group may be associated its commutator subgroup. It is then not difficult to see that the embedding of the commutator subgroup in the group is a natural transformation from the commutator subgroup functor to the identity functor. On the other hand, the centre of every group may be associated with the group. Here, however, there is not a functor because a homomorphism from one group to another does not necessarily map the centre of the first group to the centre of the second. On the other hand, if the category of groups and surjective homomorphisms (a surjective homomorphism is one in which the image coincides with the codomain) is considered, then in this category the centre is a functor. It is a functor, however, from the category of groups and surjective homomorphisms to the category of groups and all homomorphisms, because a surjective homomorphism does not necessarily map the centre surjectively. Then the embedding of the centre of a group in the group may be regarded as a natural transformation from the centre functor to the inclusion functor, both of which are functors from the category of groups and surjective homomorphisms to the category of groups and homomorphisms.
• In algebraic topology, the singular homology groups and the homotopy groups of a pointed topological space (X, x) are considered. A Hurewicz homomorphism (see 354) exists, from the homotopy groups to the homology groups. Then pn and hn, n ≥ 2, are functors from the category of pointed spaces and pointed continuous functions to the category of Abelian groups, and the Hurewicz homomorphism is a natural transformation of functors.

## The Yoneda lemma

Let ${\displaystyle {\mathcal {C}}}$ be a locally small category, let ${\displaystyle X}$ be an object in ${\displaystyle {\mathcal {C}}}$, let ${\displaystyle K:{\mathcal {C}}\to \mathbf {Set} }$, let ${\displaystyle h^{X}}$ denote the covariant Hom functor, and let ${\displaystyle {\text{Nat}}(F,G)}$ denote the natural transformations from ${\displaystyle F}$ to ${\displaystyle G}$. Then ${\displaystyle {\text{Nat}}(h^{X},K)\cong KX}$. In addition, if ${\displaystyle K}$ is another Hom functor ${\displaystyle h^{W}}$, then ${\displaystyle {\text{Nat}}(h^{X},h^{W})\cong {\text{Hom}}_{\mathcal {C}}(W,X)}$.

# (Co-)cones and (co-)limits

Definition (cone):

Let ${\displaystyle {\mathcal {C}}}$ be a category and let ${\displaystyle G=(V,A)}$ be a diagram in ${\displaystyle {\mathcal {C}}}$. A cone over ${\displaystyle G}$ is an object ${\displaystyle a}$ of ${\displaystyle {\mathcal {C}}}$, together with morphisms ${\displaystyle \phi _{a,b}:a\to b}$ for each ${\displaystyle b\in V}$, so that for each ${\displaystyle \psi :b\to b'\in A}$ (so that ${\displaystyle b,b'\in V}$) we have

${\displaystyle \phi _{a,b'}=\psi \circ \phi _{a,b}}$.

Definition (limit):

Let ${\displaystyle {\mathcal {C}}}$ be a category, let ${\displaystyle G=(V,A)}$ be a diagram in ${\displaystyle {\mathcal {C}}}$ and let

Definition (diagonal):

Let ${\displaystyle {\mathcal {C}}}$ be a category, and let ${\displaystyle X}$ be an object of ${\displaystyle {\mathcal {C}}}$. Further, suppose that the object ${\displaystyle X\times X}$ and the morphisms ${\displaystyle \pi _{1}:X\times X\to X}$ and ${\displaystyle \pi _{2}:X\times X\to X}$ constitute a product of ${\displaystyle X}$ with itself in ${\displaystyle {\mathcal {C}}}$. Then the diagonal (also called "diagonal morphism") is the unique morphism

${\displaystyle \Delta :X\to X\times X}$

such that ${\displaystyle \pi _{1}\circ \Delta =\pi _{2}\circ \Delta =\operatorname {Id} _{X}}$.

Definition (anti-diagonal):

Let ${\displaystyle {\mathcal {C}}}$ be a category, and let ${\displaystyle X}$ be an object of ${\displaystyle {\mathcal {C}}}$. Further, suppose that the object ${\displaystyle X\sqcup X}$ and the morphisms ${\displaystyle \iota _{1}:X\to X\sqcup X}$ and ${\displaystyle \iota _{2}:X\to X\sqcup X}$ constitute a coproduct of ${\displaystyle X}$ with itself in ${\displaystyle {\mathcal {C}}}$. Then the anti-diagonal (also called "anti-diagonal morphism") is the unique morphism

${\displaystyle \nabla :X\sqcup X\to X}$

such that ${\displaystyle \nabla \circ \iota _{1}=\nabla \circ \iota _{2}=\operatorname {Id} _{X}}$.

## Exercises

1. Let ${\displaystyle {\mathcal {D}}}$ be a category such that every two objects of ${\displaystyle {\mathcal {D}}}$ have a product. Suppose further that ${\displaystyle {\mathcal {C}}}$ is another category, and that ${\displaystyle T:{\mathcal {C}}\to {\mathcal {D}}}$ is a functor. Let ${\displaystyle Y}$ be an object of ${\displaystyle {\mathcal {D}}}$. Use the universal property of the product in order to show that there exists a functor ${\displaystyle S_{Y}:{\mathcal {C}}\to {\mathcal {D}}}$ that sends an object ${\displaystyle X}$ of ${\displaystyle {\mathcal {C}}}$ to the object ${\displaystyle T(X)\times Y}$ of ${\displaystyle {\mathcal {D}}}$.
2. Prove that any morphism ${\displaystyle g:Y\to Z}$ in ${\displaystyle {\mathcal {D}}}$ gives rise to a natural transformation ${\displaystyle S_{Y}\to S_{Z}}$.
3. Can we weaken the assumption that every two objects of ${\displaystyle {\mathcal {D}}}$ have a product? (Hint: Consider the image of the class function on objects associated to the functor ${\displaystyle T}$.)

Let ${\displaystyle {\mathcal {A}},{\mathcal {B}}}$ be categories. A pair of adjoint functors consists of two functors ${\displaystyle L:{\mathcal {A}}\to {\mathcal {B}}}$ and ${\displaystyle R:{\mathcal {B}}\to {\mathcal {A}}}$ (where ${\displaystyle L}$ is the left adjoint and ${\displaystyle R}$ is the right adjoint) such that the two bifunctors

${\displaystyle \operatorname {Hom} _{\mathcal {B}}(L\cdot ,\cdot )}$ and ${\displaystyle \operatorname {Hom} _{\mathcal {A}}(\cdot ,R\cdot )}$

from ${\displaystyle ({\mathcal {A}},{\mathcal {B}})}$ to ${\displaystyle \operatorname {Set} }$ are naturally isomorphic to each other.

Proposition (left adjoint functors preserve epimorphisms):

Let ${\displaystyle {\mathcal {A}},{\mathcal {B}}}$ be categories, and let ${\displaystyle L:{\mathcal {A}}\to {\mathcal {B}}}$ and ${\displaystyle R:{\mathcal {B}}\to {\mathcal {A}}}$ be an adjoint pair of functors. Suppose that ${\displaystyle x,y\in A}$ and ${\displaystyle f\in \operatorname {Hom} _{\mathcal {A}}(X,Y)}$ is an epimorphism. Then ${\displaystyle Lf:LX\to LY}$ is also an epimorphism.

Proof: Let ${\displaystyle g,h:LY\to Z}$ be arrows in ${\displaystyle {\mathcal {B}}}$ so that ${\displaystyle g\circ Lf=h\circ Lf}$. ${\displaystyle \Box }$

Proposition (right adjoint functors preserve monomorphisms):

# Subcategories

Definition (subcategory):

Let ${\displaystyle {\mathcal {C}}}$ be a category. Then a subcategory ${\displaystyle {\mathcal {D}}=(\operatorname {Ob} ({\mathcal {D}}),\operatorname {Mor} ({\mathcal {D}}))}$ of ${\displaystyle {\mathcal {C}}}$ is a category such that ${\displaystyle \operatorname {Ob} ({\mathcal {D}})\subseteq \operatorname {Ob} ({\mathcal {C}})}$ and ${\displaystyle \operatorname {Mor} ({\mathcal {D}})\subseteq \operatorname {Mor} ({\mathcal {C}})}$.

Definition (full):

A subcategory ${\displaystyle {\mathcal {D}}}$ of a category ${\displaystyle {\mathcal {C}}}$ is called full iff for all ${\displaystyle a,b\in {\mathcal {D}}}$, we have

${\displaystyle \operatorname {Hom} _{\mathcal {D}}(a,b)=\operatorname {Hom} _{\mathcal {C}}(a,b)}$.

Proposition (limits are preserved when restricting to a full subcategory):

Let ${\displaystyle {\mathcal {C}}}$ be a category, let ${\displaystyle J:{\mathcal {J}}\to {\mathcal {C}}}$ be a diagram in ${\displaystyle {\mathcal {C}}}$, and let ${\displaystyle {\mathcal {D}}}$ be a full subcategory of ${\displaystyle {\mathcal {C}}}$. Suppose that ${\displaystyle (L,(\phi _{\alpha })_{\alpha \in A})}$ is a limit over ${\displaystyle J}$ in ${\displaystyle {\mathcal {C}}}$ such that ${\displaystyle L}$ and all targets of the ${\displaystyle \phi _{\alpha }}$ are in ${\displaystyle {\mathcal {D}}}$. Then ${\displaystyle (L,(\phi _{\alpha })_{\alpha \in A})}$ is a limit over ${\displaystyle J}$ in ${\displaystyle {\mathcal {D}}}$.

Proof: Certainly, the underlying cone of ${\displaystyle (L,(\phi _{\alpha })_{\alpha \in A})}$ is contained within ${\displaystyle {\mathcal {D}}}$, because the subcategory is full. Now let another cone ${\displaystyle (Q,(\psi _{\alpha })_{\alpha \in A})}$ in ${\displaystyle {\mathcal {D}}}$ over the diagram ${\displaystyle J}$ (which, analogously, is a diagram in ${\displaystyle {\mathcal {D}}}$) be given. By the universal property of ${\displaystyle (L,(\phi _{\alpha })_{\alpha \in A})}$ in ${\displaystyle {\mathcal {C}}}$, there exists a unique morphism ${\displaystyle f:Q\to L}$ which satisfies ${\displaystyle \psi _{\alpha }=\phi _{\alpha }\circ f}$ for all ${\displaystyle \alpha \in A}$. Since ${\displaystyle {\mathcal {D}}}$ is full, ${\displaystyle f}$ is in ${\displaystyle {\mathcal {D}}}$. ${\displaystyle \Box }$

Analogously, we have:

Proposition (colimits are preserved when restricting to a full subcategory):

Let ${\displaystyle {\mathcal {C}}}$ be a category, let ${\displaystyle J:{\mathcal {J}}\to {\mathcal {C}}}$ be a diagram in ${\displaystyle {\mathcal {C}}}$, and let ${\displaystyle {\mathcal {D}}}$ be a full subcategory of ${\displaystyle {\mathcal {C}}}$. Suppose that ${\displaystyle (C,(\phi _{\alpha })_{\alpha \in A})}$ is a colimit over ${\displaystyle J}$ in ${\displaystyle {\mathcal {C}}}$ such that ${\displaystyle C}$ and all domains of the ${\displaystyle \phi _{\alpha }}$ are in ${\displaystyle {\mathcal {D}}}$. Then ${\displaystyle (C,(\phi _{\alpha })_{\alpha \in A})}$ is a colimit over ${\displaystyle J}$ in ${\displaystyle {\mathcal {D}}}$.

Proof: This follows from its "dual" proposition, reversing all arrows in its statement and proof except the direction of the diagram functor. ${\displaystyle \Box }$

# Categories of ordered sets

Definition (category of preordered sets):

The category ${\displaystyle {\textbf {Ord}}}$ of preordered sets is the category whose objects ${\displaystyle \operatorname {Ob} ({\textbf {Ord}})}$ are given by the preordered sets and whose morphisms are given by the order homomorphisms.

Definition (category of posets):

The category ${\displaystyle {\textbf {Pos}}}$ of posets is the category whose objects are the posets and whose morphisms are the order homomorphisms.

Directly from the definitions, we have:

Proposition (posets form full subcategory of preordered sets):

${\displaystyle {\textbf {Pos}}}$ is a full subcategory of ${\displaystyle {\textbf {Ord}}}$.

Proposition (products in the category of preordered sets):

Let ${\displaystyle (S_{\alpha })_{\alpha \in A}}$ be a family of preordered sets. Then a product of this family in the category ${\displaystyle {\textbf {Ord}}}$ is given by the set ${\displaystyle \prod _{\alpha \in A}S_{\alpha }}$ together with the product order, where the projections are given by the functions

${\displaystyle p_{\beta }:\prod _{\alpha \in A}S_{\alpha }\to S_{\beta },p_{\beta }((s_{\alpha })_{\alpha \in A})=s_{\beta }}$.

Proof: The functions ${\displaystyle p_{\beta }}$ are order homomorphisms, because if ${\displaystyle \beta \in A}$ and ${\displaystyle (s_{\alpha })_{\alpha \in A}\leq (t_{\alpha })_{\alpha \in A}}$, then ${\displaystyle p_{\beta }((s_{\alpha })_{\alpha \in A})=s_{\beta }\leq t_{\beta }=p_{\beta }((t_{\alpha })_{\alpha \in A})}$ by definition. Thus, we have a cone. Moreover, if the order homomorphisms ${\displaystyle q_{\alpha }:Q\to S_{\alpha }}$ define another cone, then as for the set product, the function given by

${\displaystyle f:Q\to \prod _{\alpha \in A},f(x)=(q_{\alpha }(x))_{\alpha \in A}}$

is the unique function from ${\displaystyle Q}$ to ${\displaystyle \prod _{\alpha \in A}S_{\alpha }}$ such that ${\displaystyle q_{\alpha }=p_{\alpha }\circ f}$ for all ${\displaystyle \alpha \in A}$, and it is an order homomorphism, because if ${\displaystyle x\leq y}$, then for all ${\displaystyle \alpha \in A}$ we have ${\displaystyle q_{\alpha }(x)\leq q_{\alpha }(y)}$. ${\displaystyle \Box }$

Proposition (coproducts in the category of preordered sets):

Let ${\displaystyle (S_{\alpha })_{\alpha \in A}}$ be a family of preordered sets. Then a coproduct of this family in the category ${\displaystyle {\textbf {Ord}}}$ is given by the parallel composition of the ${\displaystyle S_{\alpha }}$, where the inclusions are given by the functions

${\displaystyle i_{\beta }:S_{\beta }\to \bigsqcup _{\alpha \in A}S_{\alpha },i_{\beta }(s_{\beta })=(s_{\beta },\beta )}$.

Proof: The ${\displaystyle i_{\beta }}$ are order homomorphisms by definition of the parallel order, so that we do have a cocone. Suppose now that the maps ${\displaystyle j_{\alpha }:S_{\alpha }\to D}$ define another cocone in the category ${\displaystyle {\textbf {Ord}}}$. Then the unique function ${\displaystyle f:\bigsqcup _{\alpha \in A}S_{\alpha }\to D}$ such that ${\displaystyle f\circ i_{\alpha }=j_{\alpha }}$ for all ${\displaystyle \alpha \in A}$ is given by

${\displaystyle f:\bigsqcup _{\alpha \in A}S_{\alpha }\to D,f((s,\alpha ))=j_{\alpha }(s)}$

as in set theory, and it is an order homomorphism because if ${\displaystyle (s,\beta )\leq (t,\beta )}$, then ${\displaystyle s\leq _{\beta }t}$ by def. of the parallel order and consequently ${\displaystyle f((s,\beta ))=j_{\beta }(s)\leq j_{\beta }(t)=f((t,\beta ))}$. ${\displaystyle \Box }$

Proposition (products and coproducts in the category of posets):

In the category ${\displaystyle \mathbf {Pos} }$, products and coproducts are given by the respective products and coproducts in the category ${\displaystyle \mathbf {Ord} }$.

Proof: This follows since limits and colimits are preserved when restricting to a full subcategory. ${\displaystyle \Box }$

Definition (biproduct):

Let ${\displaystyle {\mathcal {C}}}$ be a category, and let ${\displaystyle (X_{\alpha })_{\alpha \in A}}$ be a family of objects in ${\displaystyle {\mathcal {C}}}$. A biproduct of ${\displaystyle (X_{\alpha })_{\alpha \in A}}$ is an object of ${\displaystyle {\mathcal {C}}}$ that is usually denoted as

${\displaystyle \bigoplus _{\alpha \in A}X_{\alpha }}$

and for which there exist arrows

${\displaystyle \iota _{\alpha }:X_{\alpha }\to \bigoplus _{\alpha \in A}X_{\alpha }}$ and ${\displaystyle \pi _{\alpha }:\bigoplus _{\alpha \in A}X_{\alpha }\to X_{\alpha }}$

for all ${\displaystyle \alpha \in A}$ that have the following properties:

1. ${\displaystyle \alpha \neq \beta \Rightarrow \pi _{\alpha }\circ \iota _{\beta }=0}$ and ${\displaystyle \forall \alpha \in A:\pi _{\alpha }\circ \iota _{\alpha }=\operatorname {Id} _{X_{\alpha }}}$
2. ${\displaystyle \bigoplus _{\alpha \in A}X_{\alpha }}$, together with the morphisms ${\displaystyle (\iota _{\alpha })_{\alpha \in A}}$, constitutes a coproduct in the category ${\displaystyle {\mathcal {C}}}$
3. ${\displaystyle \bigoplus _{\alpha \in A}X_{\alpha }}$, together with the morphisms ${\displaystyle (\pi _{\alpha })_{\alpha \in A}}$, constitutes a product in the category ${\displaystyle {\mathcal {C}}}$

An additive category is a category ${\displaystyle {\mathcal {C}}}$ that satisfies each of the following requirements:

1. Every morphism in ${\displaystyle {\mathcal {C}}}$ has a kernel and a cokernel
2. For every two objects ${\displaystyle X,Y}$ of ${\displaystyle {\mathcal {C}}}$, there exists a biproduct ${\displaystyle X\oplus Y}$
3. For every two objects ${\displaystyle X,Y}$ of ${\displaystyle {\mathcal {C}}}$, the assignment ${\displaystyle (f,g)\mapsto h}$, where ${\displaystyle h:X\to Y}$ is the morphism that arises from postcomposing the morphism ${\displaystyle X{\overset {\Delta }{\to }}X\oplus X{\overset {f\times g}{\to }}Y\oplus Y}$ (where ${\displaystyle \Delta }$ shall denote the diagonal) with the anti-diagonal ${\displaystyle \nabla :Y\oplus Y\to Y}$, turns ${\displaystyle \operatorname {Hom} (X,Y)}$ into an abelian group

# Abelian categories

Proposition (object in abelian category is decomposed into sum by subobject):

Let ${\displaystyle {\mathcal {C}}}$ be an abelian category, and let ${\displaystyle X\in {\mathcal {C}}}$ be an object. Let ${\displaystyle f:Y\to X}$ be a subobject, and let ${\displaystyle Z=\operatorname {Coker} f}$ be the corresponding quotient object. Moreover, denote ${\displaystyle g=\operatorname {coker} f}$. Then there exists a unique isomorphism ${\displaystyle \theta :X\to Y\oplus Z}$ such that

${\displaystyle \pi _{Z}\circ \theta =g}$ and ${\displaystyle \theta ^{-1}\circ \iota _{Y}=f}$.

Proof: ${\displaystyle Y\oplus Z}$ is a biproduct. First we apply the universal property of a product in order to obtain a morphism

${\displaystyle \phi :X\to Y\oplus Z}$ such that ${\displaystyle \pi _{Z}\circ \phi =g}$ and ${\displaystyle \pi _{Y}\circ \phi =0}$.

Then we apply the universal property of a coproduct in order to obtain a morphism

${\displaystyle \chi :Y\oplus Z\to X}$ such that ${\displaystyle \chi \circ \iota _{Y}=f}$ and ${\displaystyle \chi \circ \iota _{Y}=0}$.

Moreover, we get a morphism ${\displaystyle Y\otimes X\to Y\otimes 0}$ from the projection to ${\displaystyle Y}$, and a morphism ${\displaystyle 0\otimes Z\to Y\oplus Z}$ from the inclusion of ${\displaystyle Z}$. The latter morphism is the kernel of ${\displaystyle {\tilde {f}}:Y\oplus Z\to X}$, and the cokernel of that kernel is ${\displaystyle \Box }$

# Categories

This is the Categories chapter of Category Theory.

## Definition

A category ${\displaystyle {\mathcal {C}}}$ consists of four kinds of data subject to three axioms, as listed below:

### Data

Objects
${\displaystyle {\mathcal {C}}}$ has objects denoted by ${\displaystyle A}$, ${\displaystyle B}$, ${\displaystyle C}$,…
Morphisms
For each ordered pair of objects ${\displaystyle A}$, ${\displaystyle B}$ in ${\displaystyle {\mathcal {C}}}$, there is a class of morphisms or arrows from ${\displaystyle A}$ to ${\displaystyle B}$. The notation ${\displaystyle f:A\to B}$ means that ${\displaystyle f}$ is a morphism from ${\displaystyle A}$ to ${\displaystyle B}$. The class of all morphisms from ${\displaystyle A}$ to ${\displaystyle B}$ is denoted by ${\displaystyle {\text{Hom}}_{\mathcal {C}}(A,B)}$ or sometimes simply ${\displaystyle {\mathcal {C}}(A,B)}$.
Composition
For each ordered triple of objects ${\displaystyle A}$, ${\displaystyle B}$, ${\displaystyle C}$ in ${\displaystyle {\mathcal {C}}}$, there is a law of composition: If ${\displaystyle f:A\to B}$ and ${\displaystyle g:B\to C}$, then the composite of ${\displaystyle f}$ and ${\displaystyle g}$ is a morphism ${\displaystyle gf:A\to C}$
Identity
For each object ${\displaystyle A}$ there is a designated identity morphism on ${\displaystyle A}$, notated as ${\displaystyle 1_{A}}$, from ${\displaystyle A}$ to ${\displaystyle A}$.

### Axioms

These data satisfy the following three axioms, of which the first is in the nature of a convention, while the remaining two are more substantial:

Unique typing
${\displaystyle {\text{Hom}}(A_{1},B_{1})}$ and ${\displaystyle {\text{Hom}}(A_{2},B_{2})}$ are disjoint unless ${\displaystyle A_{1}=A_{2}}$, ${\displaystyle B_{1}=B_{2}}$.
Associative Law
${\displaystyle h(gf)=(hg)f}$ if the composites are defined. Note that if one composite is defined, the other is necessarily defined.
Identity is a “neutral element”
For the identity morphism ${\displaystyle 1_{B}:B\to B}$ associated to each object ${\displaystyle B}$, two equations must hold for each pair of objects ${\displaystyle A}$ and ${\displaystyle C}$ and each pair of arrows ${\displaystyle f:A\to B}$, ${\displaystyle g:B\to C}$:
• ${\displaystyle 1_{B}\,f=f}$
• ${\displaystyle g\,1_{B}=g}$

### Terminology and fine points

• If ${\displaystyle f:A\to B}$ in a category, ${\displaystyle A}$ is called the domain or source of ${\displaystyle f}$, and ${\displaystyle B}$ is called the codomain or target of ${\displaystyle f}$.
• ${\displaystyle {\text{Hom}}(A,B)}$ is called a hom class (or a hom set if it is indeed a set). In general a hom set may be empty, but for any object ${\displaystyle A}$, ${\displaystyle {\text{Hom}}(A,A)}$ is not empty because it contains the identity morphism.
• The hom class ${\displaystyle {\text{Hom}}(A,B)}$ may be denoted by ${\displaystyle {\text{Hom}}_{\mathcal {C}}(A,B)}$ or ${\displaystyle {\mathcal {C}}(A,B)}$ if it is necessary to specify which category is referred to.
• An object in a category need not be a set; the object need not have anything called elements.
• Morphisms may also be called maps. This does not mean that every morphism in any category is a set function (see #Baby examples and #Preorders). Arrow is a less misleading name.
• The composite ${\displaystyle gf}$ may be written ${\displaystyle g\circ f}$.
• It might be more natural to write the composite of ${\displaystyle f:A\to B}$ and ${\displaystyle g:B\to C}$ as ${\displaystyle fg}$ instead of ${\displaystyle gf}$ but the usage given here is by far the most common. This stems from the fact that if the arrows are set functions and ${\displaystyle x\in A}$, then ${\displaystyle (gf)(x)=g(f(x))}$. Thus ${\displaystyle gf}$ is best read as "do ${\displaystyle g}$ after ${\displaystyle f}$".

### Large and small

The definition says that a category 'has' objects and 'has' morphisms. This means that for any category ${\displaystyle {\mathcal {C}}}$ and ${\displaystyle X}$ is any mathematical object, the statement '${\displaystyle X}$ is an object of ${\displaystyle {\mathcal {C}}}$' is either true or false, and similarly for the statement '${\displaystyle X}$ is a morphism of ${\displaystyle {\mathcal {C}}}$'. The objects (or arrows) of a category need not constitute a set. If they do, the category is said to be small. If they don't, the category is large.

The requirement that the collection of morphisms from ${\displaystyle A}$ to ${\displaystyle B}$ be a set makes a category locally small. In this book, all categories are locally small.

### Discrete

A category is discrete if every morphism is an identity.

### Preorder

A category ${\displaystyle {\mathcal {P}}}$ is a preorder if for every pair of objects ${\displaystyle P,P'}$, there exists at most one morphism ${\displaystyle f:P\to P'}$.

## Examples of categories

### Baby examples

These examples are trivial and maybe uninteresting. But do not underestimate the power of baby examples. For one thing, they are sometimes counterexamples to possible theorems.

0 (the empty category)
This category has no objects and no morphisms.
1
The category 1 has one object and one morphism, which must necessarily be the object's identity arrow.
1+1
This category has two objects and two morphisms: the identities on each object.
2
This category has two objects and three morphisms. The third morphism goes from one object to the other.
Remarks
• The objects of these baby categories are nodes in a graph (not sets) and the morphisms are arrows in the graph (not functions).
• For these baby categories we don't have to say what the composition operation does: it is always forced.
• It is impolite to say that categorists think that 1 + 1 is not equal to 2.

### The category of sets

The category of sets, denoted by Set, is this category:

• The objects are all sets
• A morphism from a set ${\displaystyle A}$ to a set ${\displaystyle B}$ is a function with domain ${\displaystyle A}$ and codomain ${\displaystyle B}$.
• The composition is the usual composition: If ${\displaystyle f:A\to B}$ and ${\displaystyle g:B\to C}$ then ${\displaystyle gf:A\to C}$ is defined by ${\displaystyle gf(x)=g(f(x))}$ for all ${\displaystyle x\in A}$.
• The identity morphism ${\displaystyle 1_{A}}$ on a set ${\displaystyle A}$ is the identity function defined by ${\displaystyle 1_{A}(x)=x}$ for ${\displaystyle x\in A}$.
Terminology and fine points
• In order to preserve the unique typing in a function definition, it is necessary to include its codomain. For example, ${\displaystyle 1_{A}:A\to A}$ is a different function from the inclusion function ${\displaystyle i:A\to B}$ to some set ${\displaystyle B}$ properly including ${\displaystyle A}$.
• In most approaches to the foundations of math, the collection of all sets is not a set. This makes Set a large category. However, it is still locally small since the class of all functions between two sets, ${\displaystyle A}$ and ${\displaystyle B}$ is a subclass of the power set of their Cartesian product ${\displaystyle A\times B}$ which is by definition a set.

### Mathematical structures as categories

#### Preorders

A preorder ${\displaystyle \preccurlyeq }$ on a set ${\displaystyle A}$ is a reflexive and transitive relation on ${\displaystyle A}$, which means that for all ${\displaystyle a\in A}$, ${\displaystyle a\preccurlyeq a}$ and for all ${\displaystyle a}$, ${\displaystyle b}$, ${\displaystyle c}$ in ${\displaystyle A}$, if ${\displaystyle a\preccurlyeq b}$ and ${\displaystyle b\preccurlyeq c}$, then ${\displaystyle a\preccurlyeq c}$.

A preorder "is" a category in the following sense: Given a preorder (${\displaystyle A}$, ${\displaystyle \preccurlyeq }$) the category structure is this:

• The objects of the category are the elements of ${\displaystyle A}$.
• There is exactly one morphism from ${\displaystyle a}$ to ${\displaystyle b}$ if and only if ${\displaystyle a\preccurlyeq b}$.

The existence of identities is forced by reflexivity and the composition law is forced by transitivity. It follows that the category structure has the property that there is at most one morphism from any object ${\displaystyle a}$ to any object ${\displaystyle b}$.

Conversely, suppose you have a category with set ${\displaystyle A}$ of objects, with the property that there is at most one morphism between any two objects. Define a relation ${\displaystyle \preccurlyeq }$ on ${\displaystyle A}$ by requiring that ${\displaystyle a\preccurlyeq b}$ if and only if there is a morphism from ${\displaystyle a}$ to ${\displaystyle b}$. Then (${\displaystyle A}$, ${\displaystyle \preccurlyeq }$) is a preorder.

The statements in the two preceding paragraphs describe an equivalence of categories between the category of small categories with at most one morphism between any two objects and all functors between such categories, and the category of preorders and order-preserving maps.

Remark: Given a preorder, the morphisms of the corresponding category exist by definition. There is exactly one morphism from ${\displaystyle a}$ to ${\displaystyle b}$ if and only if ${\displaystyle a\preccurlyeq b}$. This is an axiomatic definition; in a model a morphism from ${\displaystyle a}$ to ${\displaystyle b}$ could be anything, for example the pair (${\displaystyle a}$, ${\displaystyle b}$). In no sense is the morphism required to be a function.

#### Groups

Every group ${\displaystyle G}$ can be viewed as a category ${\displaystyle {\mathcal {G}}}$ as follows: ${\displaystyle {\mathcal {G}}}$ has one single object; call it ${\displaystyle e}$. Therefore it has only one homset ${\displaystyle {\text{Hom}}_{\mathcal {G}}(e,e)}$, which is defined to be the underlying set of the group ${\displaystyle G}$ (in other words, the arrows are the group elements.) We take as composition the group multiplication. It follows that the identity element of ${\displaystyle G}$ is ${\displaystyle 1_{e}}$. Notice that in the category ${\displaystyle {\mathcal {G}}}$, every morphism is an isomorphism (invertible under composition). Conversely, any one-object category in which all arrows are isomorphisms can be viewed as a group; the elements of the group are the arrows and the multiplication is the composition of the category. This describes an equivalence between the category of groups and homomorphisms and the category of small categories with a single object in which every morphism is an isomorphism.

This can be generalized in two ways.

A category ${\displaystyle {\mathcal {G}}}$ is called a groupoid if every morphism is an isomorphism. Thus a groupoid can be called "a group with many objects."

A monoid is a set with an associative binary operation that has an identity element. By the same technique as for groups, any monoid "is" a category with exactly one object and any category with exactly one object "is" a monoid.

#### Matrices

This is a good example of a category whose objects are not sets and whose arrows are not functions. ${\displaystyle \mathbf {Matr} _{K}}$ is the category whose objects are the positive integers and whose arrows ${\displaystyle A:n\to m}$ are ${\displaystyle m\times n}$ matrices where composition is matrix multiplication, for any commutative ring ${\displaystyle K}$. For any object ${\displaystyle n}$, ${\displaystyle 1_{n}=I_{n}}$, the ${\displaystyle n\times n}$ identity matrix.

### Categories of sets with structure

finite sets and functions; denoted FinSet.
monoids and morphisms; denoted Mon.
groups and homomorphisms; denoted Grp.
abelian groups and homomorphisms; denoted Ab.
rings and unit-preserving homomorphisms; denoted Rng.
commutative rings and unit-preserving homomorphisms; denoted CRng.
left modules over a ring ${\displaystyle R}$ and linear maps; denoted ${\displaystyle R}$-Mod.
right modules over a ring ${\displaystyle R}$ and linear maps; denoted Mod-${\displaystyle R}$.
modules over a commutative ring ${\displaystyle K}$ and linear maps; denoted ${\displaystyle K}$-Mod.
subsets of Euclidean space of 3 dimensions and Euclidean movements
subsets of Euclidean space of n dimensions and continuous functions
topological spaces and continuous functions; denoted Top.
topological spaces and homotopy classes of functions; denoted Toph.
Remarks

The law of composition is not specified explicitly in describing these categories. This is the custom when the objects have underlying set-structure, the morphisms are functions of the underlying sets (transporting the additional structure), and the law of composition is merely ordinary function-composition. Indeed, sometimes even the specification of the morphisms is suppressed if no confusion would arise—thus one speaks of the category of groups.

The examples of sets with structure suggest a conceptual framework. For example, the concept of group may be regarded as constituting a first-order abstraction or generalization from various concrete, familiar realizations such as the additive group of integers, the multiplicative group of nonzero rationals, groups of permutations, symmetry groups, groups of Euclidean motions, and so on. Then, again, the notion of a category constitutes a second-order abstraction, the concrete realizations of which consist of such first-order abstractions as the category of groups, the category of rings, the category of topological spaces, and so on.

## Properties of objects and morphisms

### Isomorphisms

A morphism ${\displaystyle f:A\to B}$ in a category is said to be an isomorphism if there is a morphism ${\displaystyle g:B\to A}$ in the category with ${\displaystyle gf=1_{A}}$, ${\displaystyle fg=1_{B}}$. It is easy to prove that ${\displaystyle g}$ is then uniquely determined by ${\displaystyle f}$. The morphism ${\displaystyle g}$ is called the inverse of f, written ${\displaystyle g=f^{-1}}$. It follows that ${\displaystyle f=g^{-1}}$. If there is an isomorphism from ${\displaystyle A}$ to ${\displaystyle B}$, we say ${\displaystyle A}$ is isomorphic to ${\displaystyle B}$, and it is easy to prove that "isomorphism" is an equivalence relation on the objects of the category.

#### Examples

• A function from ${\displaystyle A}$ to ${\displaystyle B}$ in the category of sets is an isomorphism if and only if it is bijective.
• A homomorphism of groups is an isomorphism if and only if it is bijective.
• The isomorphisms of the category of topological spaces and continuous maps are the homeomorphisms. In contrast to the preceding example, a bijective continuous map from one topological space to another need not be a homeomorphism because its inverse (as a set function) may not be continuous. An example is the identity map on the set of real numbers, with the domain having the discrete topology and the codomain having the usual topology.

### Monomorphisms and Epimorphisms

A morphism ${\displaystyle f}$ in a category ${\displaystyle {\mathcal {C}}}$ is a monomorphism if, for any morphisms ${\displaystyle g}$ and ${\displaystyle h}$, if ${\displaystyle fg}$ and ${\displaystyle fh}$ are defined and ${\displaystyle fg=fh}$ then ${\displaystyle g=h}$.

A morphism ${\displaystyle f}$ in a category ${\displaystyle {\mathcal {C}}}$ is an epimorphism if, for any morphisms ${\displaystyle g}$ and ${\displaystyle h}$, if ${\displaystyle gf}$ and ${\displaystyle hf}$ are defined and ${\displaystyle gf=hf}$ then ${\displaystyle g=h}$.

### Initial and terminal objects

${\displaystyle T}$ is said to be a terminal (or final) object when ${\displaystyle X\to T}$ is a unique morphism for any ${\displaystyle X}$ in ${\displaystyle {\mathcal {C}}}$. The law of composition ensures that if ${\displaystyle T}$ and ${\displaystyle T'}$ are terminal objects in ${\displaystyle {\mathcal {C}}}$, they are isomorphic, i.e., ${\displaystyle T(')}$ is unique up to isomorphism. In the categories of sets, groups, and topological spaces, the terminal objects are singletons, trivial groups, and one-point spaces, respectively. "b" is the terminal object in 2 as depicted above.

## Constructions on categories

### Subcategories

A subcategory ${\displaystyle {\mathcal {S}}}$ of a category ${\displaystyle {\mathcal {C}}}$ is a category in which:

• The class of objects of ${\displaystyle {\mathcal {S}}}$ is contained in the class of objects of ${\displaystyle {\mathcal {C}}}$.
• The class of arrows of ${\displaystyle {\mathcal {S}}}$ is contained in the class of arrows of ${\displaystyle {\mathcal {C}}}$.
• For every arrow ${\displaystyle f}$ in ${\displaystyle {\mathcal {S}}}$, the domain and codomain of ${\displaystyle f}$ are in ${\displaystyle {\mathcal {S}}}$.
• For every object ${\displaystyle s}$ in ${\displaystyle {\mathcal {S}}}$, the identity arrow ${\displaystyle 1_{s}}$ is in ${\displaystyle {\mathcal {S}}}$.
• For every pair of arrows ${\displaystyle f,g}$ in ${\displaystyle {\mathcal {S}}}$, the arrow ${\displaystyle g\circ f}$ is in ${\displaystyle {\mathcal {S}}}$ where it is defined.

### Opposite category

Given a category ${\displaystyle {\mathcal {C}}}$, the opposite (or dual) category ${\displaystyle {\mathcal {C}}^{\text{op}}}$ has the same objects as ${\displaystyle {\mathcal {C}}}$ and for every arrow ${\displaystyle f:a\to b}$ in ${\displaystyle {\mathcal {C}}}$, the arrow ${\displaystyle f^{\text{op}}:b\to a}$ is in ${\displaystyle {\mathcal {C}}^{\text{op}}}$. In other words, it has the same objects, and arrows are reversed.

### The product of two categories

Given two categories ${\displaystyle {\mathcal {B}}}$ and ${\displaystyle {\mathcal {C}}}$, the product category, denoted ${\displaystyle {\mathcal {B}}\times {\mathcal {C}}}$, is given by the following data:

• The objects of ${\displaystyle {\mathcal {B}}\times {\mathcal {C}}}$ are ${\displaystyle (b,c)}$ where ${\displaystyle b}$ is an object of ${\displaystyle {\mathcal {B}}}$ and ${\displaystyle c}$ is an object of ${\displaystyle {\mathcal {C}}}$.
• The arrows of ${\displaystyle {\mathcal {B}}\times {\mathcal {C}}}$ are ${\displaystyle (f,g)}$ where ${\displaystyle f}$ is an arrow of ${\displaystyle {\mathcal {B}}}$ and ${\displaystyle g}$ is an arrow of ${\displaystyle {\mathcal {C}}}$.
• Composition is given by ${\displaystyle (f',g')\circ (f,g)=(f'\circ f,g'\circ g)}$.

The product ${\displaystyle {\mathcal {C}}\times \mathbf {2} }$ is called the cylinder category, denoted ${\displaystyle {\text{Cyl}}({\mathcal {C}})}$.

### Arrow categories

• A functor category ${\displaystyle {\mathcal {B}}^{\mathcal {C}}}$ is a category whose objects are functors ${\displaystyle T:{\mathcal {C}}\to {\mathcal {B}}}$ and arrows are natural transformations.
• A functor category ${\displaystyle {\mathcal {C}}^{\mathbf {2} }}$ is called an arrow category, denoted ${\displaystyle {\mathcal {C}}^{\rightarrow }}$. Its objects are arrows ${\displaystyle f:a'\to b'}$ in ${\displaystyle {\mathcal {C}}}$ and its arrows are pairs of arrows ${\displaystyle (h,k):f\to f'}$ such that ${\displaystyle f'\circ h=k\circ f}$.

### Comma categories

• Given categories and functors ${\displaystyle T:{\mathcal {E}}\to {\mathcal {C}}}$ and ${\displaystyle S:{\mathcal {D}}\to {\mathcal {C}}}$, the comma category ${\displaystyle (T\downarrow S)}$ has objects ${\displaystyle (e,d,f)}$ where ${\displaystyle e}$ is an object in ${\displaystyle {\mathcal {E}}}$, ${\displaystyle d}$ is an object in ${\displaystyle {\mathcal {D}}}$, and ${\displaystyle f:Te\to Sd}$ is an arrow in ${\displaystyle {\mathcal {C}}}$. Its arrows are ${\displaystyle (k,h):(e,d,f)\to (e',d',f')}$ where ${\displaystyle k:e\to e'}$ is an arrow in ${\displaystyle {\mathcal {E}}}$ and ${\displaystyle h:d\to d'}$ is an arrow in ${\displaystyle {\mathcal {D}}}$ such that ${\displaystyle Sh\circ f=f'\circ Tk}$. Composition is given by ${\displaystyle (k,h)\circ (k',h')=(k\circ k',h\circ h')}$. The identity is ${\displaystyle 1_{(e,d,f)}=(1_{e},1_{d})}$.

#### Special types of comma categories

Using the definition of comma category above, assume that we have ${\displaystyle {\mathcal {D}}=\mathbf {1} }$, ${\displaystyle {\mathcal {E}}={\mathcal {C}}}$, and ${\displaystyle T=1_{\mathcal {C}}}$. Let ${\displaystyle 1}$ denote the object in ${\displaystyle \mathbf {1} }$. Then ${\displaystyle S1=A}$ for some object ${\displaystyle A}$ in ${\displaystyle {\mathcal {C}}}$. In this case, we write the comma category as ${\displaystyle ({\mathcal {C}}\downarrow A)}$ and call it the slice category of ${\displaystyle A}$ (or the category of objects over ${\displaystyle A}$).

Now assume, instead, that we have ${\displaystyle {\mathcal {E}}=\mathbf {1} }$, ${\displaystyle {\mathcal {D}}={\mathcal {C}}}$, and ${\displaystyle S=1_{\mathcal {C}}}$. Let ${\displaystyle 1}$ denote the object in ${\displaystyle \mathbf {1} }$. Then ${\displaystyle T1=A}$ for some object ${\displaystyle A}$ in ${\displaystyle {\mathcal {C}}}$. In this case, we write the comma category as ${\displaystyle (A\downarrow {\mathcal {C}})}$ and call it the coslice category of ${\displaystyle A}$ (or the category of objects under ${\displaystyle A}$).

Finally, if we have ${\displaystyle {\mathcal {E}}={\mathcal {D}}={\mathcal {C}}}$ and ${\displaystyle T=S=1_{\mathcal {C}}}$, then the comma category ${\displaystyle (1_{\mathcal {C}}\downarrow 1_{\mathcal {C}})={\mathcal {C}}^{\rightarrow }}$.