# Diagonal functor

In category theory, a branch of mathematics, the diagonal functor ${\displaystyle {\mathcal {C}}\rightarrow {\mathcal {C}}\times {\mathcal {C}}}$ is given by ${\displaystyle \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 ${\displaystyle {\mathcal {C}}}$: a product ${\displaystyle a\times b}$ is a universal arrow from ${\displaystyle \Delta }$ to ${\displaystyle \langle a,b\rangle }$. The arrow comprises the projection maps.

More generally, given a small index category ${\displaystyle {\mathcal {J}}}$, one may construct the functor category ${\displaystyle {\mathcal {C}}^{\mathcal {J}}}$, the objects of which are called diagrams. The diagonal functor is one particular diagram: for each object ${\displaystyle a}$ in ${\displaystyle {\mathcal {C}}}$, there is a constant functor with fixed object ${\displaystyle a}$: ${\displaystyle \Delta (a)\in {\mathcal {C}}^{\mathcal {J}}}$. The diagonal functor ${\displaystyle \Delta :{\mathcal {C}}\rightarrow {\mathcal {C}}^{\mathcal {J}}}$ assigns to each object ${\displaystyle a}$ of ${\displaystyle {\mathcal {C}}}$ the functor ${\displaystyle \Delta (a)}$, and to each morphism ${\displaystyle f:a\rightarrow b}$ in ${\displaystyle {\mathcal {C}}}$ the obvious natural transformation ${\displaystyle \eta }$ in ${\displaystyle {\mathcal {C}}^{\mathcal {J}}}$ (given by ${\displaystyle \eta _{j}=f}$). Thus, for example, in the case that ${\displaystyle {\mathcal {J}}}$ is a discrete category with two objects, the diagonal functor ${\displaystyle {\mathcal {C}}\rightarrow {\mathcal {C}}\times {\mathcal {C}}}$ is recovered.

Diagonal functors provide a way to define limits and colimits of diagrams. Given the functor ${\displaystyle \Delta (a)}$, the natural transform from this functor to any other diagram ${\displaystyle {\mathcal {F}}:{\mathcal {J}}\rightarrow {\mathcal {C}}}$ is called a cone. Among all such cones is a universal cone; this cone is the limit of the diagram ${\displaystyle {\mathcal {F}}}$. That is, the limit of any functor ${\displaystyle {\mathcal {F}}:{\mathcal {J}}\rightarrow {\mathcal {C}}}$ is a universal arrow ${\displaystyle \Delta \rightarrow {\mathcal {F}}}$; the colimit is a universal arrow ${\displaystyle {\mathcal {F}}\rightarrow \Delta }$.

If every functor from ${\displaystyle {\mathcal {J}}}$ to ${\displaystyle {\mathcal {C}}}$ has a limit (which will be the case if ${\displaystyle {\mathcal {C}}}$ is complete), then the operation of taking limits is itself a functor from ${\displaystyle {\mathcal {C}}^{\mathcal {J}}}$ to ${\displaystyle {\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 ${\displaystyle {\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.