Functor category

In category theory, a branch of mathematics, a functor category formula_1 is a category where the objects are the functors formula_2 and the morphisms are natural transformations formula_3 between the functors (here, formula_4 is another object in the category). Functor categories are of interest for two main reasons: 
Definition.
Suppose formula_5 is a small category (i.e. the objects and morphisms form a set rather than a proper class) and formula_6 is an arbitrary category. 
The category of functors from formula_5 to formula_6, written as Fun(formula_5, formula_6), Funct(formula_5,formula_6), formula_13, or formula_14, has as objects the covariant functors from formula_5 to formula_6, 
and as morphisms the natural transformations between such functors. Note that natural transformations can be composed: 
if formula_17 is a natural transformation from the functor formula_18 to the functor formula_19, and 
formula_20 is a natural transformation from the functor formula_21 to the functor formula_22, then the collection formula_23 defines a natural transformation 
from formula_24 to formula_22. With this composition of natural transformations (known as vertical composition, see natural transformation), 
formula_1 satisfies the axioms of a category.
In a completely analogous way, one can also consider the category of all "contravariant" functors from formula_5 to formula_6; we write this as Funct(formula_29).
If formula_5 and formula_6 are both preadditive categories (i.e. their morphism sets are abelian groups and the composition of morphisms is bilinear), 
then we can consider the category of all additive functors from formula_5 to formula_6, denoted by Add(formula_5,formula_6).
Facts.
Most constructions that can be carried out in formula_6 can also be carried out in formula_1 by performing them "componentwise", separately for 
each object in formula_5. For instance, if any two objects formula_71 and formula_94 in formula_6 have a product formula_96, 
then any two functors formula_24 and formula_21 in formula_1 have a product formula_100, defined by formula_101 
for every object formula_102 in formula_5. Similarly, if formula_104 is a natural transformation and each formula_105 has a kernel formula_106 in the category formula_6, 
then the kernel of formula_108 in the functor category formula_1 is the functor formula_110 with formula_111 for every object formula_102 in formula_5.
As a consequence we have the general rule of thumb that the functor category formula_1 shares most of the "nice" properties of formula_6:
We also have:
So from the above examples, we can conclude right away that the categories of directed graphs, formula_21-sets and presheaves on a topological space are all complete and cocomplete topoi, and that the categories of representations of formula_21, modules over the ring formula_57, 
and presheaves of abelian groups on a topological space formula_71 are all abelian, complete and cocomplete.
The embedding of the category formula_5 in a functor category that was mentioned earlier uses the Yoneda lemma as its main tool. For every object formula_71 of formula_5, 
let formula_129 be the contravariant representable functor from formula_5 to formula_80. The Yoneda lemma states that the assignment 
is a full embedding of the category formula_5 into the category Funct(formula_68,formula_80). So formula_5 naturally sits inside a topos.
The same can be carried out for any preadditive category formula_5: Yoneda then yields a full embedding of formula_5 into the functor category Add(formula_68,formula_60). 
So formula_5 naturally sits inside an abelian category.
The intuition mentioned above (that constructions that can be carried out in formula_6 can be "lifted" to formula_1) can be made precise in several ways; the most succinct formulation uses the language of adjoint functors. 
Every functor formula_144 induces a functor formula_145 (by composition with formula_24). If formula_24 and formula_21 is a pair of adjoint functors, then formula_149 and formula_150 is also a pair of adjoint functors.
The functor category formula_1 has all the formal properties of an exponential object; in particular the functors from formula_152 
stand in a natural one-to-one correspondence with the functors from formula_153 to formula_1. The category formula_155 of all small categories with functors as morphisms 
is therefore a cartesian closed category.