In category theory, a branch of mathematics, the diagonal functor C → C × C is given by Δ ( a ) = ⟨ a , a ⟩ , 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 C : a product a × b is a universal arrow from Δ to ⟨ a , b ⟩ . The arrow comprises the projection maps.
More generally, in any functor category C J (here J should be thought of as a small index category), for each object a in C , there is a constant functor with fixed object a : Δ ( a ) ∈ C J . The diagonal functor Δ : C → C J assigns to each object of C the functor Δ ( a ) , and to each morphism f : a → b in C the obvious natural transformation η in C J (given by η j = f ). In the case that J is a discrete category with two objects, the diagonal functor C → C × C is recovered.
Diagonal functors provide a way to define limits and colimits of functors. The limit of any functor F : J → C is a universal arrow Δ → F and a colimit is a universal arrow F → Δ . If every functor from J to C has a limit (which will be the case if C is complete), then the operation of taking limits is itself a functor from C J to 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 C → C × C described above is the left-adjoint of the binary product functor and the right-adjoint of the binary coproduct functor.