TITLE: Why pasting a finite number of commutative diagrams is commutative
QUESTION [12 upvotes]: I am aware that if you paste two commutative squares, that diagram is commutative, but, in general, how can one prove that a diagram (with squares or triangles) is commutative iff every subdiagram is commutative? I can't see how to generalize. Thanks in advance

REPLY [5 votes]: A commutative diagram indexed by a preorder (in particular, a poset) $J$ is nothing more or less than a functor $D:J\to C$. Thus the reason that a diagram is commutative if and only if all triangles or squares in it are commutative follows from the composition axiom of a functor: $D(x\circ y)=D(x)\circ D(y)$ says exactly that all triangles in the diagram commute, while one could equivalently define a functor by requiring $D(x)\circ D(y)=D(z)\circ D(w)$ whenever $x\circ y=z\circ w$, which says that all squares commute. (For the less immediate implication between the usual and the new definition of a functor, let $z$ be an identity and $w=x\circ y$.) It's unnatural to ask for commutative diagrams, in the sense that $D$ identifies any two paths between two objects in its image, indexed by non-posets, since a commutative diagram indexed by any category $J$ must factor through the universal poset under $J$. So this is probably the result you want.