## 4.14 Limits and colimits

Let $\mathcal{C}$ be a category. A *diagram* in $\mathcal{C}$ is simply a functor $M : \mathcal{I} \to \mathcal{C}$. We say that $\mathcal{I}$ is the *index category* or that $M$ is an $\mathcal{I}$-diagram. We will use the notation $M_ i$ to denote the image of the object $i$ of $\mathcal{I}$. Hence for $\phi : i \to i'$ a morphism in $\mathcal{I}$ we have $M(\phi ) : M_ i \to M_{i'}$.

Definition 4.14.1. A *limit* of the $\mathcal{I}$-diagram $M$ in the category $\mathcal{C}$ is given by an object $\mathop{\mathrm{lim}}\nolimits _\mathcal {I} M$ in $\mathcal{C}$ together with morphisms $p_ i : \mathop{\mathrm{lim}}\nolimits _\mathcal {I} M \to M_ i$ such that

for $\phi : i \to i'$ a morphism in $\mathcal{I}$ we have $p_{i'} = M(\phi ) \circ p_ i$, and

for any object $W$ in $\mathcal{C}$ and any family of morphisms $q_ i : W \to M_ i$ (indexed by $i \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{I})$) such that for all $\phi : i \to i'$ in $\mathcal{I}$ we have $q_{i'} = M(\phi ) \circ q_ i$ there exists a unique morphism $q : W \to \mathop{\mathrm{lim}}\nolimits _\mathcal {I} M$ such that $q_ i = p_ i \circ q$ for every object $i$ of $\mathcal{I}$.

Limits $(\mathop{\mathrm{lim}}\nolimits _\mathcal {I} M, (p_ i)_{i\in \mathop{\mathrm{Ob}}\nolimits (\mathcal{I})})$ are (if they exist) unique up to unique isomorphism by the uniqueness requirement in the definition. Products of pairs, fibre products, and equalizers are examples of limits. The limit over the empty diagram is a final object of $\mathcal{C}$. In the category of sets all limits exist. The dual notion is that of colimits.

Definition 4.14.2. A *colimit* of the $\mathcal{I}$-diagram $M$ in the category $\mathcal{C}$ is given by an object $\mathop{\mathrm{colim}}\nolimits _\mathcal {I} M$ in $\mathcal{C}$ together with morphisms $s_ i : M_ i \to \mathop{\mathrm{colim}}\nolimits _\mathcal {I} M$ such that

for $\phi : i \to i'$ a morphism in $\mathcal{I}$ we have $s_ i = s_{i'} \circ M(\phi )$, and

for any object $W$ in $\mathcal{C}$ and any family of morphisms $t_ i : M_ i \to W$ (indexed by $i \in \mathop{\mathrm{Ob}}\nolimits (\mathcal{I})$) such that for all $\phi : i \to i'$ in $\mathcal{I}$ we have $t_ i = t_{i'} \circ M(\phi )$ there exists a unique morphism $t : \mathop{\mathrm{colim}}\nolimits _\mathcal {I} M \to W$ such that $t_ i = t \circ s_ i$ for every object $i$ of $\mathcal{I}$.

Colimits $(\mathop{\mathrm{colim}}\nolimits _\mathcal {I} M, (s_ i)_{i\in \mathop{\mathrm{Ob}}\nolimits (\mathcal{I})})$ are (if they exist) unique up to unique isomorphism by the uniqueness requirement in the definition. Coproducts of pairs, pushouts, and coequalizers are examples of colimits. The colimit over an empty diagram is an initial object of $\mathcal{C}$. In the category of sets all colimits exist.

As an application of the notions of limits and colimits we define products and coproducts.

Definition 4.14.6. Suppose that $I$ is a set, and suppose given for every $i \in I$ an object $M_ i$ of the category $\mathcal{C}$. A *product* $\prod _{i\in I} M_ i$ is by definition $\mathop{\mathrm{lim}}\nolimits _\mathcal {I} M$ (if it exists) where $\mathcal{I}$ is the category having only identities as morphisms and having the elements of $I$ as objects.

An important special case is where $I = \emptyset $ in which case the product is a final object of the category. The morphisms $p_ i : \prod M_ i \to M_ i$ are called the *projection morphisms*.

Definition 4.14.7. Suppose that $I$ is a set, and suppose given for every $i \in I$ an object $M_ i$ of the category $\mathcal{C}$. A *coproduct* $\coprod _{i\in I} M_ i$ is by definition $\mathop{\mathrm{colim}}\nolimits _\mathcal {I} M$ (if it exists) where $\mathcal{I}$ is the category having only identities as morphisms and having the elements of $I$ as objects.

An important special case is where $I = \emptyset $ in which case the coproduct is an initial object of the category. Note that the coproduct comes equipped with morphisms $M_ i \to \coprod M_ i$. These are sometimes called the *coprojections*.

Lemma 4.14.8. Suppose that $M : \mathcal{I} \to \mathcal{C}$, and $N : \mathcal{J} \to \mathcal{C}$ are diagrams whose colimits exist. Suppose $H : \mathcal{I} \to \mathcal{J}$ is a functor, and suppose $t : M \to N \circ H$ is a transformation of functors. Then there is a unique morphism

\[ \theta : \mathop{\mathrm{colim}}\nolimits _\mathcal {I} M \longrightarrow \mathop{\mathrm{colim}}\nolimits _\mathcal {J} N \]

such that all the diagrams

\[ \xymatrix{ M_ i \ar[d]_{t_ i} \ar[r] & \mathop{\mathrm{colim}}\nolimits _\mathcal {I} M \ar[d]^{\theta } \\ N_{H(i)} \ar[r] & \mathop{\mathrm{colim}}\nolimits _\mathcal {J} N } \]

commute.

**Proof.**
Omitted.
$\square$

Lemma 4.14.9. Suppose that $M : \mathcal{I} \to \mathcal{C}$, and $N : \mathcal{J} \to \mathcal{C}$ are diagrams whose limits exist. Suppose $H : \mathcal{I} \to \mathcal{J}$ is a functor, and suppose $t : N \circ H \to M$ is a transformation of functors. Then there is a unique morphism

\[ \theta : \mathop{\mathrm{lim}}\nolimits _\mathcal {J} N \longrightarrow \mathop{\mathrm{lim}}\nolimits _\mathcal {I} M \]

such that all the diagrams

\[ \xymatrix{ \mathop{\mathrm{lim}}\nolimits _\mathcal {J} N \ar[d]^{\theta } \ar[r] & N_{H(i)} \ar[d]_{t_ i} \\ \mathop{\mathrm{lim}}\nolimits _\mathcal {I} M \ar[r] & M_ i } \]

commute.

**Proof.**
Omitted.
$\square$

Lemma 4.14.10. Let $\mathcal{I}$, $\mathcal{J}$ be index categories. Let $M : \mathcal{I} \times \mathcal{J} \to \mathcal{C}$ be a functor. We have

\[ \mathop{\mathrm{colim}}\nolimits _ i \mathop{\mathrm{colim}}\nolimits _ j M_{i, j} = \mathop{\mathrm{colim}}\nolimits _{i, j} M_{i, j} = \mathop{\mathrm{colim}}\nolimits _ j \mathop{\mathrm{colim}}\nolimits _ i M_{i, j} \]

provided all the indicated colimits exist. Similar for limits.

**Proof.**
Omitted.
$\square$

Lemma 4.14.11. Let $M : \mathcal{I} \to \mathcal{C}$ be a diagram. Write $I = \mathop{\mathrm{Ob}}\nolimits (\mathcal{I})$ and $A = \text{Arrows}(\mathcal{I})$. Denote $s, t : A \to I$ the source and target maps. Suppose that $\prod _{i \in I} M_ i$ and $\prod _{a \in A} M_{t(a)}$ exist. Suppose that the equalizer of

\[ \xymatrix{ \prod _{i \in I} M_ i \ar@<1ex>[r]^\phi \ar@<-1ex>[r]_\psi & \prod _{a \in A} M_{t(a)} } \]

exists, where the morphisms are determined by their components as follows: $p_ a \circ \psi = M(a) \circ p_{s(a)}$ and $p_ a \circ \phi = p_{t(a)}$. Then this equalizer is the limit of the diagram.

**Proof.**
Omitted.
$\square$

slogan
Lemma 4.14.12. Let $M : \mathcal{I} \to \mathcal{C}$ be a diagram. Write $I = \mathop{\mathrm{Ob}}\nolimits (\mathcal{I})$ and $A = \text{Arrows}(\mathcal{I})$. Denote $s, t : A \to I$ the source and target maps. Suppose that $\coprod _{i \in I} M_ i$ and $\coprod _{a \in A} M_{s(a)}$ exist. Suppose that the coequalizer of

\[ \xymatrix{ \coprod _{a \in A} M_{s(a)} \ar@<1ex>[r]^\phi \ar@<-1ex>[r]_\psi & \coprod _{i \in I} M_ i } \]

exists, where the morphisms are determined by their components as follows: The component $M_{s(a)}$ maps via $\psi $ to the component $M_{t(a)}$ via the morphism $M(a)$. The component $M_{s(a)}$ maps via $\phi $ to the component $M_{s(a)}$ by the identity morphism. Then this coequalizer is the colimit of the diagram.

**Proof.**
Omitted.
$\square$

## Comments (5)

Comment #3181 by Diego Antonio on

Comment #3183 by Johan on

Comment #3195 by DiegoAntonio on

Comment #7083 by Samuel Tiersma on

Comment #7261 by Johan on