nLab
diagram

Contents

Idea

Informally, a diagram in a category C consists of some objects of C connected by some morphisms of C. Frequently when doing category theory, we “draw diagrams” such as

A f B h k C g D\array{A & \overset{f}{\to} & B\\ ^h\downarrow && \downarrow^k\\ C& \underset{g}{\to} & D}

by drawing some objects (or dots labeled by objects) connected by arrows labeled by morphisms.

There are two natural ways to give the notion of “diagram” a formal definition. One is to say that a diagram is a functor, usually one whose domain is a (very) small category. This level of generality is sometimes convenient.

On the other hand, a more direct representation of what we draw on the page, when we “draw a diagram,” only involves labeling the vertices and edges of a directed graph (or quiver) by objects and morphisms of the category. This sort of diagram can be identified with a functor whose domain is a free category, and this is the most common context when we talk about diagrams “commuting.”

Definitions

Let C be a category.

Diagrams shaped like categories

Definition

If J is a category, then a diagram in C of shape J is simply a functor D:JC.

This terminology is often used when speaking about limits and colimits; that is, we speak about “the limit or colimit of a diagram.” Similarly, it is common to call the functor category C J the “category of diagrams in C of shape J”.

Diagrams shaped like graphs

Definition

If J is a quiver, then a diagram in C of shape J is a functor D:F(J)C, or equivalently a graph morphism D¯:JU(C).

Here F:QuivCat denotes the free category on a quiver and U:CatQuiv the underlying quiver of a category, which form a pair of adjoint functors. These are the sorts of diagrams which we “draw on a page” — we draw a quiver, and then label its vertices with objects of C and its edges with morphisms in C, thereby forming a graph morphism JU(C).

Remarks

  • For either sort of diagram, J may be called the shape, scheme, or index category or graph.

  • Note that given a diagram F:JC, the image of the shape J is not necessarily a subcategory of C, even if J is itself a category. This is because the functor F could identify objects of J, thereby producing new potential composites which do not exist in J. (Sometimes one talks about the “image” of a functor as a subcategory, but this really means the subcategory generated by the image in the literal objects-and-morphisms sense.)

Commutative diagrams

If J is a category, then a diagram JC is commutative if it factors through a preorder. Equivalently, a diagram of shape J commutes iff any two morphisms in C that are assigned to any pair of parallel morphisms in J (i.e., with same source and target in J) are equal.

If J is a quiver, as is more common when we speak about “commutative” diagrams, then a diagram of shape J commutes if the functor F(J)C factors through a preorder. Equivalently, this means that given any two parallel paths of arbitrary finite length (including zero) in J, their images in C have equal composites.

Examples

  • The shape of the empty diagram is the initial category with no object and no morphism.

    Every category C admits a unique diagram whose shape is the empty (initial) category, which is called the empty diagram in C.

  • The shape of the terminal diagram is the terminal category J={*} consisting of a single object and a single morphism (the identity morphism on that object).

    Specifying a diagram in C whose shape is {*} is the same as specifying a single object of C, the image of the unique object of 1. (See global element)

  • A diagram of the shape {ab} in C is the choice of any one morphism F ab:X aX b in C.

    Notice that strictly speaking this counts as a commuting diagram , but is a degenerate case of a commuting diagram, since there is only a single morphism involved, which is necessarily equal to itself.

  • If J is the quiver with one object a and one endo-edge aa, then a diagram of shape J in C consists of a single endomorphism in C. Since aa and the zero-length path are parallel in J, such a diagram only commutes if the endomorphism is an identity. Note, in particular, that a single endomorphism can be considered as a diagram with more than one shape (this one and the previous one), and that whether this diagram “commutes” depends on the chosen shape.

  • A diagram of shape the poset indicated by

    {a b b c}\left\{ \array{ a &\to& b \\ \downarrow && \downarrow \\ b' &\to& c } \right\}

    is a commuting square in C: this is a choice of four (not necessarily distinct!) objects X a,X b,X b,X c in C, together with a choice of (not necessarily distinct) four morphisms F ab:X aX b, F bc:X bX c and F ab:X aX b, F bc:X bX c in C, such that the composite morphism F bcF ab equals the composite F bcF ab.

    One typically “draws the diagram” as

    X a F ab X b F ab F bc X b F bc X c\array{ X_a &\stackrel{F_{a b}}{\to}& X_b \\ {}^{\mathllap{F_{a b'}}}\downarrow && \downarrow^{\mathrlap{F_{b c}}} \\ X_{b'} &\stackrel{F_{b' c}}{\to}& X_{c} }

    in C and says that the diagram commutes if the above equality of composite morphisms holds.

    Notice that the original poset had, necessarily, a morphism ac and could have equivalently been depicted as

    {a b b c}\left\{ \array{ a &\to& b \\ \downarrow &\searrow& \downarrow \\ b' &\to& c } \right\}

    in which case we could more explicitly draw its image in C as

    X a F ab X b F ab =F bcF abF bcF ab F bc X b F bc X c\array{ X_a &\stackrel{F_{a b}}{\to}& X_b \\ {}^{\mathllap{F_{a b'}}}\downarrow &\searrow^{\stackrel{F_{b c}\circ F_{a b}}{= F_{b' c}\circ F_{a b'}}}& \downarrow^{\mathrlap{F_{b c}}} \\ X_{b'} &\stackrel{F_{b' c}}{\to}& X_{c} }
  • By contrast, a diagram whose shape is the quiver

    {a b b c}\left\{ \array{ a &\to& b \\ \downarrow && \downarrow \\ b' &\to& c } \right\}

    is a not-necessarily-commuting square. The free category on this quiver differs from the poset in the previous example by having two morphisms ac, one given by the composite abc and the other by the composite abc. But the poset in the previous category is the poset reflection of this F(J), so a diagram of this shape commutes, in the sense defined above, iff it is a commuting square in the usual sense.

  • A pair of objects is a diagram whose shape is a discrete category with two objects.

  • A pair of parallel morphisms is a diagram whose shape is a category J={ab} with two objects and two morphisms from one to the other.

    Notice that if we required {ab} to be a poset this would necessarily make these two morphisms equal, and hence reduce this example to the one where J={ab}. In other words, a diagram of this shape only commutes if the two morphisms are equal.

  • A span is a diagram whose shape is a category with just three objects and single morphisms from one of the objects to the other two;

    J={ a b c}J = \left\{ \array{ && a \\ & \swarrow && \searrow \\ b &&&& c } \right\}

    dually, a cospan is a diagram whose shape is opposite to the shape of a span.

    J={b c a}J = \left\{ \array{ b &&&& c \\ & \searrow && \swarrow \\ && a } \right\}
  • A transfinite composition diagram is one of the shape the poset indicated by

    J={a 0 a 1 b},J = \left\{ \array{ a_0 &\to& a_1 &\to& \cdots \\ & \searrow & \downarrow & \swarrow & \cdots \\ && b } \right\} \,,

    where the indices may range over the natural numbers or even some more general ordinal number.

    This is a non-finite commuting diagram.