Diagonal functor

In category theory, a branch of mathematics, the diagonal functor formula_1 is given by formula_2, which maps objects as well as morphisms. This functor can be employed to give a succinct alternate description of the product of objects "within" the category formula_3: a product formula_4 is a universal arrow from formula_5 to formula_6. The arrow comprises the projection maps.
More generally, given a small index category formula_7, one may construct the functor category formula_8, the objects of which are called diagrams. For each object formula_9 in formula_3, there is a constant diagram formula_11 that maps every object in formula_7 to formula_9 and every morphism in formula_7 to formula_15. The diagonal functor formula_16 assigns to each object formula_9 of formula_3 the diagram formula_19, and to each morphism formula_20 in formula_3 the natural transformation formula_22 in formula_8 (given for every object formula_24 of formula_7 by formula_26). Thus, for example, in the case that formula_7 is a discrete category with two objects, the diagonal functor formula_1 is recovered.
Diagonal functors provide a way to define limits and colimits of diagrams. Given a diagram formula_29, a natural transformation formula_30 (for some object formula_9 of formula_3) is called a cone for formula_33. These cones and their factorizations correspond precisely to the objects and morphisms of the comma category formula_34, and a limit of formula_33 is a terminal object in formula_34, i.e., a universal arrow formula_37. Dually, a colimit of formula_33 is an initial object in the comma category formula_39, i.e., a universal arrow formula_40.
If every functor from formula_7 to formula_3 has a limit (which will be the case if formula_3 is complete), then the operation of taking limits is itself a functor from formula_8 to formula_3. The limit functor is the right-adjoint of the diagonal functor. Similarly, the colimit functor (which exists if the category is cocomplete) is the left-adjoint of the diagonal functor. 
For example, the diagonal functor formula_1 described above is the left-adjoint of the binary product functor and the right-adjoint of the binary coproduct functor. Other well-known examples include the pushout, which is the limit of the span, and the terminal object, which is the limit of the empty category.