### 1.5.2 Commutative Diagrams

We now consider a variant of the terminology introduced in §1.5.1.

Definition 1.5.2.1. Let $\operatorname{\mathcal{C}}$ be an $\infty $-category. A *diagram in $\operatorname{\mathcal{C}}$* is a map of simplicial sets $f: K \rightarrow \operatorname{\mathcal{C}}$. We will also refer to a map $f: K \rightarrow \operatorname{\mathcal{C}}$ as a *diagram in $\operatorname{\mathcal{C}}$ indexed by $K$*, or a *$K$-indexed diagram in $\operatorname{\mathcal{C}}$*.

If $\operatorname{\mathcal{C}}$ is an ordinary category, then a *($K$-indexed) diagram in $\operatorname{\mathcal{C}}$* is a ($K$-indexed) diagram in the $\infty $-category $\operatorname{N}_{\bullet }(\operatorname{\mathcal{C}})$.

In the special case where $K$ is the nerve $\operatorname{N}_{\bullet }(I)$ of a partially ordered set $I$ (Remark 1.3.1.10), we will refer to a map $f: K \rightarrow \operatorname{\mathcal{C}}$ as a *diagram in $\operatorname{\mathcal{C}}$ indexed by $I$*, or an *$I$-indexed diagram in $\operatorname{\mathcal{C}}$*.

Example 1.5.2.4 (Non-Commuting Squares). Let $K$ denote the boundary of the product $\Delta ^1 \times \Delta ^1$: that is, the simplicial subset of $\Delta ^1 \times \Delta ^1$ given by the union of the simplicial subsets $\operatorname{\partial \Delta }^1 \times \Delta ^1$ and $\Delta ^1 \times \operatorname{\partial \Delta }^1$. Then $K_{\bullet }$ is a $1$-dimensional simplicial set, corresponding to a directed graph which we can depict as

\[ \xymatrix@R =40pt@C=40pt{ \bullet \ar [r] \ar [d] & \bullet \ar [d] \\ \bullet \ar [r] & \bullet .} \]

We can then display a $K$-indexed diagram in an $\infty $-category $\operatorname{\mathcal{C}}$ pictorially

\[ \xymatrix@R =40pt@C=40pt{ C_{00} \ar [r]^-{f} \ar [d]^{g} & C_{01} \ar [d]^{g'} \\ C_{10} \ar [r]^-{ f'} & C_{11}, } \]

where each $C_{ij}$ is an object of $\operatorname{\mathcal{C}}$, $f$ is a morphism in $\operatorname{\mathcal{C}}$ from $C_{00}$ to $C_{01}$, $g$ is a morphism in $\operatorname{\mathcal{C}}$ from $C_{00}$ to $C_{10}$, $f'$ is a morphism in $\operatorname{\mathcal{C}}$ from $C_{10}$ to $C_{11}$, and $g'$ is a morphism in $\operatorname{\mathcal{C}}$ from $C_{01}$ to $C_{11}$.

In classical category theory, it is useful to extend the notational conventions of Remark 1.5.2.3 to more general situations by introducing the notion of a *commutative diagram*.

Definition 1.5.2.5. Let $K$ be a simplicial set of dimension $\leq 1$, which we will identify with a directed graph $G$ (see Proposition 1.1.6.9). Assume that $G$ satisfies the following additional conditions:

- $(a)$
For every pair of vertices $v,w \in \operatorname{Vert}(G)$, there is at most one edge of $G$ with source $v$ and target $w$. We will denote this edge (if it exists) by $(v,w) \in \operatorname{Edge}(G)$.

- $(b)$
The graph $G$ has no directed cycles. That is, if there exists a sequence of vertices $v_0, v_1, \ldots , v_ n \in \operatorname{Vert}(G)$ with the property that the edges $( v_{i-1}, v_ i)$ exist for $1 \leq i \leq n$, then either $n = 0$ or $v_0 \neq v_ n$.

Let $\operatorname{\mathcal{C}}$ be an ordinary category and suppose we are given a diagram $\sigma : K \rightarrow \operatorname{N}_{\bullet }(\operatorname{\mathcal{C}})$, which we identify with a pair $( \{ C_ v \} _{v \in \operatorname{Vert}(G) }, \{ f_{w,v}: C_ v \rightarrow C_ w \} _{(v,w) \in \operatorname{Edge}(G)} )$. We will say that the diagram $\sigma $ *commutes* (or that *$\sigma $ is a commutative diagram*) if the following additional condition is satisfied:

- $(c)$
Let $v$ and $w$ be vertices of $G$ which are joined by directed paths $( v = v_0, v_1, \ldots , v_ m = w)$ and $(v = v'_0, v'_1, \ldots , v'_ n = w)$ (so that the edges $( v_{i-1} , v_ i ), ( v'_{j-1}, v'_ j) \in \operatorname{Edge}(G)$ exist for $1 \leq i \leq m$ and $1 \leq j \leq n$). Then we have an identity

\[ f_{ v_{m}, v_{m-1} } \circ f_{ v_{m-1}, v_{m-2} } \circ \cdots \circ f_{ v_1, v_0} = f_{ v'_{n}, v'_{n-1} } \circ f_{ v'_{n-1}, v'_{n-2} } \circ \cdots \circ f_{ v'_1, v'_0} \]

in the set $\operatorname{Hom}_{\operatorname{\mathcal{C}}}( C_{v}, C_{w} )$.

Proposition 1.5.2.6. Let $K$ be a simplicial set of dimension $\leq 1$, corresponding to a directed graph $G$ which satisfies conditions $(a)$ and $(b)$ of Definition 1.5.2.5. Let $\operatorname{\mathcal{C}}$ be an ordinary category, and let $\sigma : K \rightarrow \operatorname{N}_{\bullet }(\operatorname{\mathcal{C}})$ be a diagram. Then:

- $(1)$
There is a partial ordering $\leq $ on the vertex set $\operatorname{Vert}(G)$, where we have $v \leq w$ if and only if there exists a sequence of vertices $(v = v_0, v_1, \ldots , v_ n = w)$ with the property that the edges $( v_{i-1}, v_ i) \in \operatorname{Edge}(G)$ exist for $1 \leq i \leq n$.

- $(2)$
There is a unique monomorphism of simplicial sets $K \hookrightarrow \operatorname{N}_{\bullet }( \operatorname{Vert}(G) )$ which carries each vertex to itself.

- $(3)$
The diagram $\sigma $ extends to a map $\overline{\sigma }: \operatorname{N}_{\bullet }( \operatorname{Vert}(G) ) \rightarrow \operatorname{N}_{\bullet }(\operatorname{\mathcal{C}})$ (that is, to a functor $\operatorname{Vert}(G) \rightarrow \operatorname{\mathcal{C}}$) if and only if it is commutative, in the sense of Definition 1.5.2.5. Moreover, if the extension $\overline{\sigma }$ exists, then it is unique.

**Proof.**
It follows immediately from the definitions that the relation $\leq $ defined in $(1)$ is reflexive and transitive. Antisymmetry follows from our assumption that the graph $G$ has no directed loops (condition $(b)$ of Definition 1.5.2.5). By construction, we have $v \leq w$ whenever $v$ and $w$ are connected by an edge $(v,w) \in \operatorname{Edge}(G)$. From the description of the simplicial set $K$ given in Remark 1.1.6.10, we immediately see that there is a unique map of simplicial sets $i: K \rightarrow \operatorname{N}_{\bullet }( \operatorname{Vert}(G) )$ which is the identity on vertices. It follows from assumption $(a)$ of Definition 1.5.2.5 that the map $i$ is a monomorphism. Let us henceforth identify $K$ with a simplicial subset of $\operatorname{N}_{\bullet }( \operatorname{Vert}(G) )$ given by the image of $i$. Let us identify $\sigma $ with a pair $( \{ C_ v \} _{v \in \operatorname{Vert}(G)}, \{ f_{w,v}: C_ v \rightarrow C_ w \} _{(v,w) \in \operatorname{Edge}(G) } )$. Suppose that the diagram $\sigma $ extends to a functor $\overline{\sigma }: \operatorname{N}_{\bullet }(\operatorname{Vert}(G)) \rightarrow \operatorname{\mathcal{C}}$. If $v$ and $w$ are a pair of vertices of $G$ with $v \leq w$, then we can choose a directed path $(v = v_0, v_1, \ldots , v_ n = w)$ from $v$ to $w$. The compatibility of $\overline{\sigma }$ with composition then guarantees that $\overline{\sigma }$ must carry the edge $(v,w)$ of $\operatorname{N}_{\bullet }( \operatorname{Vert}(G) )$ to the iterated composition $f_{ v_{n}, v_{n-1} } \circ f_{ v_{n-1}, v_{n-2} } \circ \cdots \circ f_{ v_1, v_0} \in \operatorname{Hom}_{\operatorname{\mathcal{C}}}( C_{v}, C_ w )$. Since the morphism $\overline{\sigma }(v, w)$ is independent of the choice of directed path, it follows that the diagram $\sigma $ is commutative. Conversely, if $\sigma $ is commutative, then we can define $\overline{\sigma }$ on morphisms by the formula $\overline{\sigma }(v, w) = f_{ v_{n}, v_{n-1} } \circ f_{ v_{n-1}, v_{n-2} } \circ \cdots \circ f_{ v_1, v_0}$ to obtain the desired extension of $\sigma $.
$\square$

Example 1.5.2.8 (Commutative Squares in a Category). Let $K = \operatorname{\partial }( \Delta ^1 \times \Delta ^1 )$ be as in Example 1.5.2.4. For any ordinary category $\operatorname{\mathcal{C}}$, we can display a diagram $\sigma : K \rightarrow \operatorname{N}_{\bullet }(\operatorname{\mathcal{C}})$ pictorially as

\[ \xymatrix@R =50pt@C=50pt{ C_{00} \ar [r]^-{f} \ar [d]^{g} & C_{01} \ar [d]^{g'} \\ C_{10} \ar [r]^-{ f'} & C_{11}. } \]

The diagram $\sigma $ is commutative if and only if we have $g' \circ f = f' \circ g$ in $\operatorname{Hom}_{\operatorname{\mathcal{C}}}( C_{00}, C_{11} )$. In this case, Proposition 1.5.2.6 ensures that $\sigma $ extends uniquely to a diagram $\overline{\sigma }: \Delta ^1 \times \Delta ^1 \rightarrow \operatorname{N}_{\bullet }(\operatorname{\mathcal{C}})$, or equivalently to a functor of ordinary categories $[1] \times [1] \rightarrow \operatorname{\mathcal{C}}$.

In the setting of $\infty $-categories, assertion $(3)$ of Proposition 1.5.2.6 is false in general.

Example 1.5.2.9 (Square Diagrams in an $\infty $-Category). Let $I$ denote the partially ordered set $[1] \times [1]$. The simplicial set $\operatorname{N}_{\bullet }(I) \simeq \Delta ^1 \times \Delta ^1$ has four vertices (given by the elements of $I$), five nondegenerate edges, and two nondegenerate $2$-simplices. Unwinding the definitions, we see that an $I$-indexed diagram in an $\infty $-category $\operatorname{\mathcal{C}}$ is equivalent to the following data:

A collection of objects $\{ C_{ij} \} _{0 \leq i,j \leq 1}$ in $\operatorname{\mathcal{C}}$.

A collection of morphisms $f: C_{00} \rightarrow C_{01}$, $g: C_{00} \rightarrow C_{10}$, $f': C_{10} \rightarrow C_{11}$, $g': C_{01} \rightarrow C_{11}$, and $h: C_{00} \rightarrow C_{11}$.

A $2$-simplex $\sigma $ of $\operatorname{\mathcal{C}}$ which witnesses $h$ as a composition of $f$ with $g'$, and a $2$-simplex $\tau $ of $\operatorname{\mathcal{C}}$ which witnesses $h$ as a composition of $g$ with $f'$.

This data can be depicted graphically as follows:

\[ \xymatrix@R =50pt@C=50pt{ C_{00} \ar [rrrr]^{f} \ar [dddd]^{g} \ar [ddddrrrr]^{h} & & & & C_{01} \ar [dddd]^{g'} \\ & & & \sigma & \\ & & & & \\ & \tau & & & \\ C_{10} \ar [rrrr]^{f'} & & & & C_{11}. } \]

Beware that such a diagram is usually not determined by its restriction to the simplicial subset $K \subseteq \operatorname{N}_{\bullet }(I)$ of Example 1.5.2.8.

Exercise 1.5.2.10. Let $\operatorname{\mathcal{C}}$ be an $\infty $-category and let $K \subseteq \Delta ^1 \times \Delta ^1$ be the simplicial subset appearing in Example 1.5.2.8. Suppose we are given a diagram $\sigma : K \rightarrow \operatorname{\mathcal{C}}$, which we depict graphically as

\[ \xymatrix@R =50pt@C=50pt{ C_{00} \ar [r]^-{f} \ar [d]^{g} & C_{01} \ar [d]^{g'} \\ C_{10} \ar [r]^-{ f'} & C_{11}. } \]

Composing with the unit map $\operatorname{\mathcal{C}}\rightarrow \operatorname{N}_{\bullet }( \mathrm{h} \mathit{\operatorname{\mathcal{C}}} )$, we obtain a diagram $\sigma '$ in the homotopy category $\mathrm{h} \mathit{\operatorname{\mathcal{C}}}$, which we can depict as

\[ \xymatrix@R =50pt@C=50pt{ C_{00} \ar [r]^-{[f]} \ar [d]^{[g]} & C_{01} \ar [d]^{[g']} \\ C_{10} \ar [r]^-{[f']} & C_{11}. } \]

Show that the diagram $\sigma '$ is commutative if and only if $\sigma $ can be extended to a map $\overline{\sigma }: \Delta ^1 \times \Delta ^1 \rightarrow \operatorname{\mathcal{C}}$. Beware that this extension is generally not unique.

Warning 1.5.2.11. Let $I$ be a partially ordered set and let $\operatorname{\mathcal{C}}$ be an $\infty $-category. In the case $I = [1] \times [1]$, Exercise 1.5.2.10 implies that every functor of ordinary categories $I \rightarrow \mathrm{h} \mathit{\operatorname{\mathcal{C}}}$ can be lifted to a functor of $\infty $-categories $\operatorname{N}_{\bullet }(I) \rightarrow \operatorname{\mathcal{C}}$. Beware that this conclusion is generally false for more complicated partially ordered sets. For example, it fails for the partially ordered set $I = [1] \times [1] \times [1]$.

Example 1.5.2.9 illustrates that the notion of “commutative diagram” becomes considerably more subtle in the setting of $\infty $-categories. To specify an $I$-indexed diagram $F: \operatorname{N}_{\bullet }(I) \rightarrow \operatorname{\mathcal{C}}$ of an $\infty $-category $\operatorname{\mathcal{C}}$, one generally needs to specify the values of $F$ on *all* the simplices of the simplicial set $\operatorname{N}_{\bullet }(I)$. In general, it is not feasible to graphically encode *all* of this data in a comprehensible way. On the other hand, the formalism of commutative diagrams is too useful to completely abandon. We will therefore sacrifice some degree of mathematical precision in favor of clarity of exposition.

Convention 1.5.2.12. Let $\operatorname{\mathcal{C}}$ be an $\infty $-category and let $G$ be a directed graph satisfying conditions $(a)$ and $(b)$ of Definition 1.5.2.5, so that the vertex set $\operatorname{Vert}(G)$ inherits a partial ordering (Proposition 1.5.2.6). We will sometimes refer to the notion of a *commutative* diagram $\sigma $ in $\operatorname{\mathcal{C}}$, which we indicate graphically by a collection of objects $\{ C_ v \} _{v \in \operatorname{Vert}(G)}$ of $\operatorname{\mathcal{C}}$, connected by arrows which are labelled by morphisms $\{ f_{e} \} _{e \in \operatorname{Edge}(G)}$. In this case, it should be understood that $\sigma $ is a diagram $\operatorname{N}_{\bullet }( \operatorname{Vert}(G) ) \rightarrow \operatorname{\mathcal{C}}$, which carries each vertex $v$ of $\operatorname{N}_{\bullet }( \operatorname{Vert}(G) )$ to the object $C_{v} \in \operatorname{\mathcal{C}}$ and each edge $e = (v,w)$ of $G$ to the morphism $f_{e}$ in $\operatorname{\mathcal{C}}$. Beware that in this case, the map $\sigma $ need not be completely determined by the pair $( \{ C_ v \} _{v \in \operatorname{Vert}(G)}, \{ f_ e \} _{e \in \operatorname{Edge}(G)} )$ (this pair can instead be identified with the restriction $\sigma |_{ K }$, where $K$ is the $1$-dimensional simplicial subset of $\operatorname{N}_{\bullet }( \operatorname{Vert}(G) )$ corresponding to $G$).

Example 1.5.2.14. Let $\operatorname{\mathcal{C}}$ be an $\infty $-category. If we refer to a commutative diagram $\sigma :$

\[ \xymatrix@R =50pt@C=50pt{ & Y \ar [dr]^{g} & \\ X \ar [ur]^{f} \ar [rr]^{h} & & Z, } \]

then we mean that $\sigma $ is a $2$-simplex of $\operatorname{\mathcal{C}}$ satisfying $d^{2}_0(\sigma ) = g$, $d^{2}_1(\sigma ) =h$, and $d^{2}_2(\sigma ) = f$. In other words, we mean that $\sigma $ is a $2$-simplex which witnesses $h$ as a composition of $f$ and $g$, in the sense of Definition 1.4.4.1.

Example 1.5.2.15. Let $\operatorname{\mathcal{C}}$ be an $\infty $-category. If we refer to a commutative diagram $\sigma :$

\[ \xymatrix@R =50pt@C=50pt{ C_{00} \ar [r]^-{f} \ar [d]^{g} & C_{01} \ar [d]^{g'} \\ C_{10} \ar [r]^-{ f'} & C_{11}, } \]

we implicitly assume that $\sigma $ is a map from the entire simplicial set $\Delta ^1 \times \Delta ^1$ to $\operatorname{\mathcal{C}}$. In other words, we assume that we have specified another morphism $h: C_{00} \rightarrow C_{11}$, which is not indicated in the picture, together with a $2$-simplex $\sigma $ witnessing $h$ as the composition of $f$ and $g'$ and a $2$-simplex $\tau $ witnessing $h$ as the composition of $g$ and $f'$.

Warning 1.5.2.16. In ordinary category theory, it is sometimes useful to refer to the commutativity of diagrams in situations which do not fit the paradigm of Definition 1.5.2.5. For example, the commutativity of a diagram

\[ \xymatrix@R =50pt@C=50pt{ X \ar [r]^-{f} & Y \ar@ <.4ex>[r]^{u} \ar@ <-.4ex>[r]_{v} & Z } \]

is often understood as the requirement that $u \circ f = v \circ f$. Beware that this usage is potentially ambiguous (from the shape of the diagram alone, it is not clear that commutativity should enforce the identity $u \circ f = v \circ f$, but not the identity $u = v$), so we will take special care when applying similar terminology in the $\infty $-categorical setting.