One very useful example of a category is the category of arrows of a given category .
We start with any category with objects and morphisms . From this we build a new category called , for reasons that I’ll explain later. The objects of are just the morphisms of . The morphisms of this new category are where things start getting interesting.
Let’s take two objects of — that is, two morphisms of — and lay them side-by-side:
Now we want something that transforms one into the other. What we’ll do is connect each of the objects on the left to the corresponding object on the right by an arrow:
and require that the resulting square commute: as morphisms in . This is a morphism from to . Sometimes we’ll write , and sometimes we’ll name the square and write .
If we have three morphisms , , and in , and commuting squares and then we can get a commuting square . We check that this square commutes: . This gives a composition of commuting squares. It’s easily checked that this is associative.
Given any morphism in we can just apply the identity arrows to each of and to get a commuting square between and itself. It is clear that this square serves as the identity arrow on the object in , completing our proof that arrows and commuting squares in do form a category.