..."category" has been defined in order to be able to define "functor" and "functor" has been defined in order to be able to define "natural transformation."
Definition
Have you ever been reading a math textbook (or even these notes!) and come across the phrase "there is a natural map" or "there is a natural isomorphism" and wondered if there was a precise meaning to the use of the word "natural"? If so, the answer is yes and it is codified in the idea of a natural transformation. Intuitively, a natural transformation is a map connecting the images of two functors . Formally:
Definition of natural transformation
Suppose and are categories and are two functors between those categories. A natural transformation is a function that assigns to each object an arrow in such that for every arrow in one has the following commutative diagram in :
The arrows are called the components of the natural transformation, while the commutativity of the above diagrams is often referred to as the naturality condition.
A natural transformation is often called a morphism of functors. It can also be viewed as a way to compare the images of two functors, since it directly connects every image of one functor with the image (of the same object) of another functor ; the naturality condition guarantees that these comparisons are compatible with arrow composition.
Examples
The determinant
Let be a commutative ring. For each matrix with entries in , the determinant of is an element in . Moreover, we have the following classic facts of linear algebra:
is invertible exactly when its determinant is a unit; and
The determinant function is multiplicative
It follows that the determinant is a group morphism . Since this function ostensibly depends on the ring , we should denote it . However, it is common to simply denote the determinant function by , usually with the acknowledgement that the formula for the determinant is "the same for every ring." The precise meaning of this is that for every ring morphism we have the following commutative diagram in :
This exactly says that is a natural transformation between two functors .
Free vector spaces and "insertion of generators"
Let be a field. For each set , the free -vector space on is the vector space generated by the elements of . It consists of all formal finite -linear combinations of elements in , i.e., it consists of sums of the form where (all but finitely many zero). One can show that this defines the object function of a functor .
Let be the usual forgetful functor and consider the composition . This composition sends each set to the set of elements of the vector space . There is evidently a set map that sends each element to the same element in , only now considered as a formal linear combination of the elements of (that just happens not to involve any of the other elements). This map is sometimes called the insertion of generators. It is immediate to verify this defines a natural transformation from the identity functor on to the composition .
Soon we will see that the functors and are adjoints. This natural transformation will be an important part of that relationship.
Abelianization and forgetting
For each group the projection defines a transformation from the identity functor on to the abelianization-forgetful composition functor . This transformation is natural, since for every group morphism you can check that the diagram below commutes:
Similar to the previous example, we will soon see that the abelianization and forgetful functors are an adjoint pair.
Maps between diagrams
Suppose and are two categories. Recall that a diagram of shape in is simply a functor . A map between diagrams is then simply a map between such functors, i.e., a natural transformation between such functors.
We can visualize these natural transformations as cylinders with cross-sections given by the shape category. For example, suppose the shape category looks like
Suppose are two such diagrams in . Then a natural transformation can be visualized as