# Diagonal functor

In category theory, a branch of mathematics, the diagonal functor ${\mathcal {C}}\rightarrow {\mathcal {C}}\times {\mathcal {C}}$ is given by $\Delta (a)=\langle a,a\rangle$ , 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 ${\mathcal {C}}$ : a product $a\times b$ is a universal arrow from $\Delta$ to $\langle a,b\rangle$ . The arrow comprises the projection maps.
More generally, given a small index category ${\mathcal {J}}$ , one may construct the functor category ${\mathcal {C}}^{\mathcal {J}}$ , the objects of which are called diagrams. For each object $a$ in ${\mathcal {C}}$ , there is a constant diagram $\Delta _{a}:{\mathcal {J}}\to {\mathcal {C}}$ that maps every object in ${\mathcal {J}}$ to $a$ and every morphism in ${\mathcal {J}}$ to $1_{a}$ . The diagonal functor $\Delta :{\mathcal {C}}\rightarrow {\mathcal {C}}^{\mathcal {J}}$ assigns to each object $a$ of ${\mathcal {C}}$ the diagram $\Delta _{a}$ , and to each morphism $f:a\rightarrow b$ in ${\mathcal {C}}$ the natural transformation $\eta$ in ${\mathcal {C}}^{\mathcal {J}}$ (given for every object $j$ of ${\mathcal {J}}$ by $\eta _{j}=f$ ). Thus, for example, in the case that ${\mathcal {J}}$ is a discrete category with two objects, the diagonal functor ${\mathcal {C}}\rightarrow {\mathcal {C}}\times {\mathcal {C}}$ is recovered.
Diagonal functors provide a way to define limits and colimits of diagrams. Given a diagram ${\mathcal {F}}:{\mathcal {J}}\rightarrow {\mathcal {C}}$ , a natural transformation $\Delta _{a}\to {\mathcal {F}}$ (for some object $a$ of ${\mathcal {C}}$ ) is called a cone for ${\mathcal {F}}$ . These cones and their factorizations correspond precisely to the objects and morphisms of the comma category $(\Delta \downarrow {\mathcal {F}})$ , and a limit of ${\mathcal {F}}$ is a terminal object in $(\Delta \downarrow {\mathcal {F}})$ , i.e., a universal arrow $\Delta \rightarrow {\mathcal {F}}$ . Dually, a colimit of ${\mathcal {F}}$ is an initial object in the comma category $({\mathcal {F}}\downarrow \Delta )$ , i.e., a universal arrow ${\mathcal {F}}\rightarrow \Delta$ .
If every functor from ${\mathcal {J}}$ to ${\mathcal {C}}$ has a limit (which will be the case if ${\mathcal {C}}$ is complete), then the operation of taking limits is itself a functor from ${\mathcal {C}}^{\mathcal {J}}$ to ${\mathcal {C}}$ . 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 ${\mathcal {C}}\rightarrow {\mathcal {C}}\times {\mathcal {C}}$ 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.