---
title: Cones and Limits
module: Limits and Colimits
moduleNumber: 4
lessonNumber: 1
order: 401
summary: >
  A diagram is a functor from a small shape category; a cone over it is an
  object with compatible legs to every node; and a limit is the terminal cone,
  the one every other cone factors through uniquely. Products and terminal
  objects reappear as limits over particular shapes, and the whole construction
  is unique up to a single isomorphism.
topics: [Limits and Colimits]
sources:
  - book: Leinster
    ref: "Ch. 5 — Limits; §5.1 Limits: definition and examples"
  - book: Simmons
    ref: "Ch. 4 §4.1 Template and diagram; §4.3 Problem and solution; §4.4 Universal solution"
  - book: Barr & Wells
    ref: "Ch. 9 §9.2 The general concept of limit"
draft: false
---

Products, [terminal objects](/category-theory/universal-properties/universal-properties),
and pullbacks each attach a new object to a configuration of old ones, and the
universal property has the same shape each time: a best object equipped
with maps to the given data. The limit is the single construction that contains
all of them. Wherever a method takes some objects and arrows and builds a new
object with maps out to the originals, that method is almost always a limit; the
dual method, building an object with maps in, is a colimit.[^lein-open] Kernels
in group theory, intersections of subsets, inverse limits of chains, and greatest
common divisors in the divisibility order are all limits of one shape or another.

## Diagrams and shape categories

A commutative square, a parallel pair of arrows, a descending chain of objects —
each of these configurations inside $\mathcal{A}$ is a functor from a small
category that fixes its shape.

> **Definition (Diagram).** Let $\mathcal{A}$ be a category and $\mathsf{I}$ a
> small category. A **diagram in $\mathcal{A}$ of shape $\mathsf{I}$** is a
> [functor](/category-theory/foundations/functors) $D : \mathsf{I} \to
> \mathcal{A}$. The category $\mathsf{I}$ is the **shape** or **index category**;
> its objects are the nodes and its arrows the edges of the diagram.

A functor sends each node $I$ to an object $D(I)$ and each edge $u : I \to J$ to
an arrow $D(u) : D(I) \to D(J)$, respecting composition. So a diagram is exactly a
labelling of the shape by objects and arrows of $\mathcal{A}$ that commutes
wherever the shape does. The three shapes that generate the classical
constructions are tiny.[^lein-shapes]

- **$\mathsf{T}$** — two objects, no non-identity arrows (the discrete category on
  two points). A diagram is a bare pair $(X, Y)$; its limit is a **product**.
- **$\mathsf{E}$** — two objects with two parallel arrows $\bullet
  \rightrightarrows \bullet$. A diagram is a **parallel pair** $X
  \rightrightarrows Y$; its limit is an **equalizer**.
- **$\mathsf{P}$** — three objects in a corner, $\bullet \to \bullet \leftarrow
  \bullet$. A diagram is a **cospan** $X \to Z \leftarrow Y$; its limit is a
  **pullback**.

$$
% caption: A shape category (left) instantiated as a diagram (right): each node
% becomes an object, each edge an arrow, and the corner shape P produces a cospan.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
% shape P on the left
\fill[black] (0,1.4) circle (1.8pt);
\fill[black] (1.4,0) circle (1.8pt);
\fill[black] (0,0) circle (1.8pt);
\draw[->, black] (0.15,0) -- (1.25,0);
\draw[->, black] (0.1,1.3) -- (1.3,0.1);
\node[black] at (0.7,-0.7) {shape $\mathsf{P}$};
% functor arrow
\draw[->, acc, thick] (2.3,0.6) -- (3.6,0.6) node[midway, above] {$D$};
% diagram on the right
\node (X) at (4.6,1.4) {$X$};
\node (Z) at (6.0,0) {$Z$};
\node (Y) at (4.6,0) {$Y$};
\draw[->] (Y) -- (Z) node[midway, below] {$t$};
\draw[->] (X) -- (Z) node[midway, right] {$s$};
\node[black] at (5.3,-0.7) {diagram in $\mathcal{A}$};
\end{tikzpicture}
$$

Simmons calls the shape a **template** and the functor its **instantiation**; the
two descriptions agree once any commuting conditions on the template are read as
functoriality of $D$.[^sim-template] When the shape has no non-identity arrows
the distinction between a directed graph and a category disappears, which is why
products need only an index set, not a full category.

## Cones

The name "cone" is geometric — a vertex sits above the plane of the diagram and
its legs slope down to every node, as in the figure below.

> **Definition (Cone).** Let $D : \mathsf{I} \to \mathcal{A}$ be a diagram. A
> **cone** on $D$ is an object $A \in \mathcal{A}$, the **vertex** (or apex),
> together with a family of arrows $\bigl(f_I : A \to D(I)\bigr)_{I \in
> \mathsf{I}}$, the **legs**, such that for every edge $u : I \to J$ in
> $\mathsf{I}$ the triangle
> $$
> D(u) \circ f_I = f_J
> $$
> commutes.

For the product shape $\mathsf{T}$ there are no edges and no condition, so a
cone is any pair of arrows $A \to X$, $A \to Y$; for the equalizer shape a cone
is a fork; for the pullback shape a cone is a commutative square. Each edge $u :
I \to J$ costs one equation and determines the leg $f_J$ from the leg $f_I$,
which is why forks and squares carry fewer free legs than their shapes have
nodes.

$$
% caption: A cone with vertex A over a three-node diagram. Every leg agrees with
% the diagram's arrows, so the two slanted triangles commute.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\node (A) at (0,2.2) {$A$};
\node (DI) at (-2.4,0) {$D(I)$};
\node (DJ) at (0,0) {$D(J)$};
\node (DK) at (2.4,0) {$D(K)$};
\draw[->, acc, thick] (A) -- (DI) node[midway, above left] {$f_I$};
\draw[->, acc, thick] (A) -- (DJ) node[midway, left] {$f_J$};
\draw[->, acc, thick] (A) -- (DK) node[midway, above right] {$f_K$};
\draw[->, black] (DI) -- (DJ) node[midway, below] {$D(u)$};
\draw[->, black] (DK) -- (DJ) node[midway, below] {$D(v)$};
\end{tikzpicture}
$$

Cones on a fixed $D$ form a category. An arrow from a cone
$(A, (f_I))$ to a cone $(A', (f'_I))$ is a map $g : A \to A'$ commuting with all
the legs, $f'_I \circ g = f_I$. Identities and composites are inherited from
$\mathcal{A}$, so this is the **category of cones** on $D$, written
$\mathrm{Cone}(D)$. The limit is a distinguished object of it.

## The universal cone

> **Definition (Limit).** A **limit** of $D : \mathsf{I} \to \mathcal{A}$ is a
> cone $\bigl(L \xrightarrow{p_I} D(I)\bigr)_{I \in \mathsf{I}}$ with the property
> that for every cone $\bigl(A \xrightarrow{f_I} D(I)\bigr)_{I \in \mathsf{I}}$
> there is a unique arrow $\bar f : A \to L$ with $p_I \circ \bar f = f_I$ for all
> $I$. The legs $p_I$ are the **projections**; the arrow $\bar f$ is the
> **mediating arrow**. We write $L = \lim D$.

Equivalently, a limit of $D$ is a **terminal object** of
$\mathrm{Cone}(D)$.[^bw-limit] The word "limit" here is the order-theoretic one,
an extremal cone, not the limiting process of analysis; the two senses coincide
only for chains indexed by the natural numbers.

$$
% caption: The limit cone (thick) is universal: any cone with vertex A factors
% through it by a unique mediating arrow, drawn dashed.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\node (A) at (-2.6,2.4) {$A$};
\node (L) at (0,1.4) {$L$};
\node (DI) at (-2.4,-0.4) {$D(I)$};
\node (DJ) at (0,-0.4) {$D(J)$};
\node (DK) at (2.4,-0.4) {$D(K)$};
\draw[->, acc, thick] (L) -- (DI) node[midway, left] {$p_I$};
\draw[->, acc, thick] (L) -- (DJ) node[midway, right] {$p_J$};
\draw[->, acc, thick] (L) -- (DK) node[midway, right] {$p_K$};
\draw[->, dashed] (A) -- (L) node[midway, above] {$u$};
\draw[->, black, bend right=12] (A) to (DI);
\draw[->, black] (DI) -- (DJ) node[midway, below] {$D(u)$};
\draw[->, black] (DK) -- (DJ) node[midway, below] {$D(v)$};
\end{tikzpicture}
$$

Any arrow $g : A \to L$ composes with the projections to give a cone
$\bigl(p_I \circ g\bigr)_I$ with vertex $A$, and the limit condition says that
this assignment is a bijection:

$$
\mathcal{A}(A, \lim D) \;\cong\; \{\text{cones on } D \text{ with vertex } A\},
\qquad \text{natural in } A.
$$

A map into $\lim D$ is the same thing as a cone on $D$. The
[adjoint and representable descriptions of limits](/category-theory/adjoints-limits/limits-via-adjoints)
build on this bijection, and it makes the uniqueness of limits automatic.

## Products and terminal objects as limits

On the two smallest shapes the definition reproduces products and terminal
objects.

> **Definition (Product as a limit).** For the discrete two-object shape
> $\mathsf{T}$, a diagram is a pair $(X, Y)$, a cone is a pair of arrows $A \to X$
> and $A \to Y$, and a limit is a
> [product](/category-theory/universal-properties/products-and-coproducts) $X
> \times Y$ with its projections.

More generally, let $I$ be any set and $\mathbf{I}$ the discrete category on it. A
diagram $\mathbf{I} \to \mathcal{A}$ is an $I$-indexed family $(X_i)_{i \in I}$,
and its limit is the product $\prod_{i \in I} X_i$. Shrinking the index set to the
extreme gives the terminal object.

$$
% caption: The product $P = X \times Y$ is the limit over the discrete
% two-object shape: with no edges to satisfy, a cone is just a pair of legs.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\node (A) at (0,2.3) {$A$};
\node (P) at (0,1.1) {$P$};
\node (X) at (-2.0,-0.4) {$X$};
\node (Y) at (2.0,-0.4) {$Y$};
\draw[->, acc, thick] (P) -- (X) node[midway, above left] {$p_1$};
\draw[->, acc, thick] (P) -- (Y) node[midway, above right] {$p_2$};
\draw[->, dashed] (A) -- (P) node[midway, right] {$u$};
\draw[->, black, bend right=20] (A) to node[midway, left] {$f_1$} (X);
\draw[->, black, bend left=20] (A) to node[midway, right] {$f_2$} (Y);
\end{tikzpicture}
$$

> **Worked example.** In $\mathbf{Set}$, take $X = \{0, 1\}$ and $Y = \{a, b,
> c\}$ over the discrete shape $\mathsf{T}$. The product is
> $$
> X \times Y = \{(0,a),(0,b),(0,c),(1,a),(1,b),(1,c)\},
> $$
> six elements, with $p_1(x,y) = x$ and $p_2(x,y) = y$. Test the universal
> property on the cone with vertex $A = \{\ast\}$ and legs $f_1(\ast) = 1$,
> $f_2(\ast) = b$. A mediating map $\bar f : A \to X \times Y$ must satisfy
> $p_1(\bar f(\ast)) = 1$ and $p_2(\bar f(\ast)) = b$, which forces $\bar
> f(\ast) = (1, b)$ and nothing else. In general a cone with vertex $A$ is a pair
> of functions $(f_1, f_2)$, and $(p_1, p_2)$ recovers that pair from any $\bar
> f : A \to X \times Y$, giving the bijection $\mathbf{Set}(A, X \times Y) \cong
> \mathbf{Set}(A, X) \times \mathbf{Set}(A, Y)$.

> **Definition (Terminal object as a limit).** For the empty shape $\varnothing$
> there is exactly one diagram, the empty one. A cone on it is just an object $A$
> with no legs, and a limit is an object $1$ such that every object admits a
> unique map to $1$: a
> [terminal object](/category-theory/universal-properties/universal-properties).

The terminal object is the product of no objects, which explains the shared
notation $1$: it is the empty product just as the number $1$ is the empty
product of integers. The small shapes and their limits, in one table:

| Shape $\mathsf{I}$ | Diagram | Cone | Limit |
| --- | --- | --- | --- |
| $\varnothing$ (empty) | nothing | an object | terminal object $1$ |
| $\mathsf{T}$ (two points) | pair $(X, Y)$ | two legs | product $X \times Y$ |
| discrete on $I$ | family $(X_i)$ | family of legs | product $\prod_i X_i$ |
| $\mathsf{E}$ ($\bullet \rightrightarrows \bullet$) | parallel pair | fork | equalizer |
| $\mathsf{P}$ ($\bullet \to \bullet \leftarrow \bullet$) | cospan | commutative square | pullback |
| $(\mathbb{N}, \leq)^{\mathrm{op}}$ | descending chain | compatible family | inverse limit |

[Equalizers and pullbacks](/category-theory/limits-colimits/products-equalizers-pullbacks)
occupy the two middle rows. The last row, an inverse limit, is the case that
makes contact with the analytic meaning of "limit": the limit of a decreasing
chain of subsets is their intersection.

> **Worked example.** Fix a prime $p$ and the descending chain indexed by
> $(\mathbb{N}, \leq)^{\mathrm{op}}$,
> $$
> \cdots \longrightarrow \mathbb{Z}/p^3 \longrightarrow \mathbb{Z}/p^2
> \longrightarrow \mathbb{Z}/p,
> $$
> whose edges are the reduction maps $r_n : \mathbb{Z}/p^{n+1} \to \mathbb{Z}/p^n$
> taking a residue to its class modulo $p^n$. A cone with vertex $\{\ast\}$ is a
> sequence $(a_n)_{n \geq 1}$ with $a_n \in \mathbb{Z}/p^n$ and $r_n(a_{n+1}) =
> a_n$: each term reduces to the one below it. The limit is the set of all such
> compatible sequences, the ring $\mathbb{Z}_p$ of **$p$-adic integers**, with
> projections $\mathbb{Z}_p \to \mathbb{Z}/p^n$ reading off the $n$-th coordinate.
> For $p = 2$ the thread $1, 3, 7, 15, \ldots$ (with $a_n = 2^n - 1 \bmod 2^n$) is
> compatible, since $3 \equiv 1 \ (\mathrm{mod}\ 2)$, $7 \equiv 3 \ (\mathrm{mod}\
> 4)$, and so on; adding $1$ gives $0$ at every stage, so this thread is the
> $2$-adic integer written $-1$.

## Uniqueness up to isomorphism

A limit is defined by a universal property, so like every universal construction
it is determined up to a unique compatible isomorphism.

> **Lemma (Collective monicity).** If $\bigl(L \xrightarrow{p_I}
> D(I)\bigr)_{I}$ is a limit cone and $\theta, \psi : X \to L$ satisfy $p_I \circ
> \theta = p_I \circ \psi$ for every $I$, then $\theta = \psi$.

> **Proof.** Put $f_I = p_I \circ \theta = p_I \circ \psi$. For any edge $u : I \to J$,
> $D(u) \circ f_I = D(u) \circ p_I \circ \theta = p_J \circ \theta = f_J$, so
> $(X, (f_I))$ is a cone. Both $\theta$ and $\psi$ are mediating arrows for it, and
> the limit provides only one, so $\theta = \psi$.[^sim-mono] $\square$

The projections need not be monic individually, but they are jointly monic: no
two maps into $L$ can agree on all projections without being equal.

> **Theorem (Uniqueness of limits).** If $\bigl(L, (p_I)\bigr)$ and $\bigl(M,
> (q_I)\bigr)$ are both limits of $D$, then there is a unique isomorphism $h
> : M \to L$ with $p_I \circ h = q_I$ for all $I$.

> **Proof.** Since $M$ is a cone and $L$ is a limit, there is a unique $h : M
> \to L$ with $p_I \circ h = q_I$. Symmetrically there is a unique $k : L
> \to M$ with $q_I \circ k = p_I$. The composite $h \circ k : L \to L$
> satisfies $p_I \circ (h \circ k) = q_I \circ k = p_I$, and the
> identity $\mathrm{id}_L$ satisfies the same equations, so collective monicity
> forces $h \circ k = \mathrm{id}_L$. By symmetry $k \circ h =
> \mathrm{id}_M$, so $h$ is an isomorphism.[^sim-uniq] $\square$

$$
% caption: Two limit cones L and M each mediate the other; the round trips are
% identities by collective monicity, so the mediators are inverse isomorphisms.
\begin{tikzpicture}[scale=1.0, >=stealth, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\node (L) at (-2.6,1.8) {$L$};
\node (M) at (2.6,1.8) {$M$};
\node (DI) at (-2.6,-0.4) {$D(I)$};
\node (DJ) at (2.6,-0.4) {$D(J)$};
\draw[->, acc, thick] (L) -- (DI) node[midway, left] {$p_I$};
\draw[->, acc, thick] (L) to node[pos=0.32, below=2pt] {$p_J$} (DJ);
\draw[->, acc, thick] (M) -- (DJ) node[midway, right] {$q_J$};
\draw[->, acc, thick] (M) to node[pos=0.32, below=2pt] {$q_I$} (DI);
\draw[->, dashed] (2.3,2.1) -- (-2.3,2.1) node[midway, above] {$h$};
\draw[->, dashed] (-2.3,1.5) -- (2.3,1.5) node[midway, below] {$k$};
\end{tikzpicture}
$$

Because the isomorphism is unique and compatible with the projections, it is
harmless to speak of _the_ limit and to name it $\lim D$. The same argument, run
in the [opposite category](/category-theory/universal-properties/constructions-on-categories),
gives uniqueness of colimits.

## Existence

Limits do not always exist. In the discrete two-object category $\mathsf{T}$
itself, viewed as its own ambient category, the two objects have no cone over
them at all, so no product.[^lein-exist] Existence is a property of the ambient
category and its shapes.

> **Definition (Completeness).** A category $\mathcal{A}$ **has limits of shape
> $\mathsf{I}$** if every diagram of shape $\mathsf{I}$ has a limit. It is
> **complete** (has all small limits) if this holds for every small
> $\mathsf{I}$, and **finitely complete** if it holds for every finite
> $\mathsf{I}$.

The categories $\mathbf{Set}$, $\mathbf{Grp}$, $\mathbf{Ring}$,
$\mathbf{Vect}_k$, and $\mathbf{Top}$ are all complete, and their limits can be
written down explicitly; the construction appears in
[computing limits in concrete categories](/category-theory/limits-colimits/computing-limits).
A single structural fact reduces every limit to two basic kinds: a category with
all products and all equalizers has all limits, and a category with binary
products, a terminal object, and equalizers has all finite limits. The reason is
already visible in $\mathbf{Set}$, where any limit is carved out of a product by a
system of equations, and equations are equalizers.

[^lein-open]: **Leinster**, _Basic Category Theory_, Ch. 5 opening — limits and colimits as the third route to universal properties, with the kernel and lowest-common-multiple examples framing the chapter.
[^lein-shapes]: **Leinster**, _Basic Category Theory_, §5.1 — the categories $\mathsf{T}$, $\mathsf{E}$, $\mathsf{P}$ of Diagram (5.14) and Definition 5.1.18 of a diagram of shape $\mathsf{I}$.
[^sim-template]: **Simmons**, _An Introduction to Category Theory_, §4.1 — templates and their instantiation as diagrams; §4.2 recasts a template as an indexing category and a diagram as a functor.
[^bw-limit]: **Barr & Wells**, _Category Theory for Computing Science_, §9.2 — the general concept of limit as a terminal object in the category of commutative cones over a diagram.
[^sim-mono]: **Simmons**, _An Introduction to Category Theory_, §4.4, Lemma 4.4.2 — a limit cone is collection-wise monic, and its Corollary 4.4.3.
[^sim-uniq]: **Simmons**, _An Introduction to Category Theory_, §4.4, Theorem 4.4.4 — essential uniqueness of limits via the mediator argument; Leinster, §5.1, Remark 5.1.20 and Lemma 2.1.8.
[^lein-exist]: **Leinster**, _Basic Category Theory_, §5.1, Remarks 5.1.2 and Definition 5.1.25 — non-existence of some products, and the definitions of having limits of a shape, completeness, and finite completeness; Proposition 5.1.26 reduces all limits to products and equalizers.
