# 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. For each object ${\displaystyle a}$ in ${\displaystyle {\mathcal {C}}}$, there is a constant diagram ${\displaystyle \Delta _{a}:{\mathcal {J}}\to {\mathcal {C}}}$ that maps every object in ${\displaystyle {\mathcal {J}}}$ to ${\displaystyle a}$ and every morphism in ${\displaystyle {\mathcal {J}}}$ to ${\displaystyle 1_{a}}$. The diagonal functor ${\displaystyle \Delta :{\mathcal {C}}\rightarrow {\mathcal {C}}^{\mathcal {J}}}$ assigns to each object ${\displaystyle a}$ of ${\displaystyle {\mathcal {C}}}$ the diagram ${\displaystyle \Delta _{a}}$, and to each morphism ${\displaystyle f:a\rightarrow b}$ in ${\displaystyle {\mathcal {C}}}$ the natural transformation ${\displaystyle \eta }$ in ${\displaystyle {\mathcal {C}}^{\mathcal {J}}}$ (given for every object ${\displaystyle j}$ of ${\displaystyle {\mathcal {J}}}$ 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 a diagram ${\displaystyle {\mathcal {F}}:{\mathcal {J}}\rightarrow {\mathcal {C}}}$, a natural transformation ${\displaystyle \Delta _{a}\to {\mathcal {F}}}$ (for some object ${\displaystyle a}$ of ${\displaystyle {\mathcal {C}}}$) is called a cone for ${\displaystyle {\mathcal {F}}}$. These cones and their factorizations correspond precisely to the objects and morphisms of the comma category ${\displaystyle (\Delta \downarrow {\mathcal {F}})}$, and a limit of ${\displaystyle {\mathcal {F}}}$ is a terminal object in ${\displaystyle (\Delta \downarrow {\mathcal {F}})}$, i.e., a universal arrow ${\displaystyle \Delta \rightarrow {\mathcal {F}}}$. Dually, a colimit of ${\displaystyle {\mathcal {F}}}$ is an initial object in the comma category ${\displaystyle ({\mathcal {F}}\downarrow \Delta )}$, i.e., 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.