limits and colimits by example

This entry lists and discusses examples and special types of limits and colimits, hence also in particular of products and coproducts.

It starts with very elementary and simple examples and eventually passes to more sophisticated ones.

For examples of the other universal constructions see


Examples of limits

In the following examples, DD is a small category, CC is any category and the limit is taken over a functor F:D opCF : D^{op} \to C.

Simple diagrams

  • the limit of the empty diagram D=D = \emptyset in CC is, if it exists the terminal object;

  • if DD is a discrete category, i.e. a category with only identity morphisms, then a diagram F:DCF : D \to C is just a collection c ic_i of objects of CC. Its limit is the product ic i\prod_i c_i of these.

  • if D={ab}D = \{a \stackrel{\to}{\to} b\} then limFlim F is the equalizer of the two morphisms F(b)F(a)F(b) \to F(a).

  • if DD has an terminal object II (so that II is an initial object in D opD^{op}), then the limit of any F:D opCF : D^{op} \to C is F(I)F(I).

Filtered limits

  • if DD is a poset, then the limit over D opD^{op} is the supremum over the F(d)F(d) with respect to (F(d)F(d))(F(d)F()F(d))(F(d) \leq F(d')) \Leftrightarrow (F(d) \stackrel{F(\leq)}{\leftarrow} F(d'));

  • the generalization of this is where the term “limit” for categorical limit (probably) originates from: for DD a filtered category, hence D opD^{op} a cofiltered category, one may think of (dfd)(F(d)F(f)F(d)(d \stackrel{f}{\to} d') \mapsto (F(d) \stackrel{F(f)}{\leftarrow} F(d') as witnessing that F(d)F(d') is “larger than” F(d)F(d) in some sense, and limFlim F is then the “largest” of all these objects, the limiting object. This interpretation is perhaps more evident for filtered colimits, where the codomain category CC is thought of as being the opposite C=E opC = E^{op}. See the motivation at ind-object.

In terms of other operations

If products and equalizers exist in CC, then limit of F:D opCF : D^{op} \to C can be exhibited as a subobject of the product of the F(d)F(d), namely the equalizer of

dObj(D)F(d)F(f)p F(t(f)) fMor(D) fMor(D)F(s(f)) \prod_{d \in Obj(D)} F(d) \stackrel{\langle F(f) \circ p_{F(t(f))} \rangle_{f \in Mor(D)} }{\to} \prod_{f \in Mor(D)} F(s(f))


dObj(D)F(d)p F(s(f)) fMor(D) fMor(D)F(s(f)). \prod_{d \in Obj(D)} F(d) \stackrel{\langle p_{F(s(f))} \rangle_{f \in Mor(D)} }{\to} \prod_{f \in Mor(D)} F(s(f)) \,.

See the explicit formula for the limit in Set in terms of a subset of a product set.

In particular therefore, a category has all limits already if it has all products and equalizers.

Limits and colimits in Set

In the category Set of sets, limits and colimits reduce to the very familiar operations of

Conversely, limits and colimits in other categories may be regarded as generalizations of these concepts to things other than plain sets.

  • the limit over any F:D opSetF : D^{op} \to Set is limF=[D op,Set](const pt,F)lim F = [D^{op}, Set](const_{pt}, F) – this is equivalently

  • therefore for every set XX, there is a natural bijection Set(X,limF)limSet(X,F())Set(X, lim F) \simeq lim Set(X,F(-)), where on the right the limit is taken of the functor Set(X,F()):D opSetSet(X,F(-)) : D^{op} \to Set.

  • the limit over a Set-valued functor F:D opSetF : D^{op} \to Set is a subset of the product Π dObj(d)F(d)\Pi_{d \in Obj(d)} F(d) of all objects: limF={(s d) d dF(d)|forall(dfd):F(f)(s d)=s d}lim F = \left\{ (s_d)_d \in \prod_d F(d) | for all (d \stackrel{f}{\to} d') : F(f)(s_{d'}) = s_d \right\}.

  • the colimit over a Set-valued functor F:DSetF : D \to Set is a quotient set of the disjoint union dObj(D)D(d)\coprod_{d \in Obj(D)} D(d):

    colimF( dDF(d))/ , colim F \simeq (\coprod_{d\in D} F(d))/_\sim \,,

    where the equivalence relation \sim is that which is generated by

    ((xF(d))(xF(d)))if((f:dd)withF(f)(x)=x). ((x \in F(d)) \sim (x' \in F(d'))) if (\exists (f : d \to d') with F(f)(x) = x') \,.

    If DD is a filtered category then the relation \sim already is an equivalence relation.

Limits in presheaf categories

Consider limits of functors F:D opPSh(C)F : D^{op} \to PSh(C) with values in the category of presheaves on a small category CC.


Limits of presheaves are computed objectwise:

limF:climF()(c) lim F : c \mapsto lim F(-)(c)

Here on the right the limit is over the functor F()(c):D opSetF(-)(c) : D^{op} \to Set.

Similarly colimits of presheaves are computed objectwise.


The Yoneda embedding Y:CPSh(C)Y : C \to PSh(C) commutes with small limit:

Let F:D opCF : D^{op} \to C, then we have

Y(limF)lim(YF) Y(lim F) \simeq lim (Y\circ F)

if limFlim F exists.

Warning The Yoneda embedding does not in general preserve colimits.

Limits in under-categories

Limits in under categories are a special case of limits in comma categories. These are explained elsewhere. It may still be useful to spell out some details for the special case of under-categories. This is what the following does.


Limits in an under category are computed as limits in the underlying category.

Precisely: let CC be a category, tCt \in C an object, and t/Ct/C the corresponding under category, and p:t/CCp : t/C \to C the obvious projection.

Let F:Dt/CF : D \to t/C be any functor. Then, if it exists, the limit over pFp \circ F in CC is the image under pp of the limit over FF:

p(limF)lim(pF) p(\lim F) \simeq \lim (p F)

and limF\lim F is uniquely characterized by lim(pF)\lim (p F).


Over a morphism γ:dd\gamma : d \to d' in DD the limiting cone over pFp F (which exists by assumption) looks like

limpF pF(d) pF(γ) pF(d) \array{ && \lim p F \\ & \swarrow && \searrow \\ p F(d) &&\stackrel{p F(\gamma)}{\to}&& p F(d') }

By the universal property of the limit this has a unique lift to a cone in the under category t/Ct/C over FF:

t limpF pF(d) pF(γ) pF(d) \array{ && t \\ & \swarrow &\downarrow & \searrow \\ && \lim p F \\ \downarrow & \swarrow && \searrow & \downarrow \\ p F(d) &&\stackrel{p F(\gamma)}{\to}&& p F(d') }

It therefore remains to show that this is indeed a limiting cone over FF. Again, this is immediate from the universal property of the limit in CC. For let tQt \to Q be another cone over FF in t/Ct/C, then QQ is another cone over pFp F in CC and we get in CC a universal morphism QlimpFQ \to \lim p F

t Q limpF pF(d) pF(γ) pF(d) \array{ && t \\ & \swarrow & \downarrow & \searrow \\ && Q \\ \downarrow & \swarrow &\downarrow & \searrow & \downarrow \\ && \lim p F \\ \downarrow & \swarrow && \searrow & \downarrow \\ p F(d) &&\stackrel{p F(\gamma)}{\to}&& p F(d') }

A glance at the diagram above shows that the composite tQlimpFt \to Q \to \lim p F constitutes a morphism of cones in CC into the limiting cone over pFp F. Hence it must equal our morphism tlimpFt \to \lim p F, by the universal property of limpF\lim p F, and hence the above diagram does commute as indicated.

This shows that the morphism QlimpFQ \to \lim p F which was the unique one giving a cone morphism on CC does lift to a cone morphism in t/Ct/C, which is then necessarily unique, too. This demonstrates the required universal property of tlimpFt \to \lim p F and thus identifies it with limF\lim F.

  • Remark: One often says “pp reflects limits” to express the conclusion of this proposition. A conceptual way to consider this result is by appeal to a more general one: if U:ACU: A \to C is monadic (i.e., has a left adjoint FF such that the canonical comparison functor A(UF)AlgA \to (U F)-Alg is an equivalence), then UU both reflects and preserves limits. In the present case, the projection p:A=t/CCp: A = t/C \to C is monadic, is essentially the category of algebras for the monad T()=t+()T(-) = t + (-), at least if CC admits binary coproducts. (Added later: the proof is even simpler: if U:ACU: A \to C is the underlying functor for the category of algebras of an endofunctor on CC (as opposed to algebras of a monad), then UU reflects and preserves limits; then apply this to the endofunctor TT above.)

Further resources

Pedagogical vidoes that explain limits and colimits are at

A web-based program that generates componentwise illustrations of simple limits and colimits in Set is developed at

More on the inner workings of this program is at Paine on a Category Theory Demonstrations program


the following discussion originated from an earler version of this entry

Todd Trimble: So far, this is a really good article. However, I would not say in this last line “if either limit exists”, because small limits on the right certainly exist always since SetSet is complete; instead, “if limFlim F exists”.

Urs: thanks, Todd, I have changed the above now accordingly. Please don’t hesitate to correct and/or improve things you see as needed.

By the way, I am not completely happy with this entry as yet. It was originally motivated from the desire to explain in small steps the computation of limits and colimits to those readers unfamiliar with it. Currently this here mostly just lists results, where maybe we would eventually want to include also pedagocial proofs.

The material below “explanation for programmers” goes more in that pedagogical direction, though I’d think eventually it would be good to also have the kind of pedestrian explanation given there but without (at first) its realization in Python! :-)

an earlier version of this entry, which contained the material now branched off at Paine on a Category Theory Demonstrations program, led to the following discussion

Urs Schreiber: sorry to say this, but I am not so happy with the following material here at this particular entry. This entry here is supposed to explain limits and colimits. Originally I thought that the computer program described below should be used here to help explain limits and colimits. For instance by using its graphical output for illustration purposes. But instead the material below explains how to write that program . That may be of interest, too, but here at this entry it seems a bit of a distraction. Could we move the following material to its seperate entry?

Toby: I would agree that the material on how to write the program would work well in a separate entry, say programming coproducts?. On the other hand, you definitely want to keep the first two lines here; they do just what you want and could be expanded on here.

Revised on April 26, 2012 16:12:15 by Todd Trimble (