..."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 $C\to D$. Formally:

Definition of natural transformation

Suppose $C$ and $D$ are categories and $F,G:C\to D$ are two functors between those categories. A natural transformation$\tau :F\Rightarrow G$ is a function that assigns to each object $c\in C$ an arrow ${\tau}_{c}:F(c)\to G(c)$ in $D$ such that for every arrow $f:c\to {c}^{\prime}$ in $C$ one has the following commutative diagram in $D$:

The arrows ${\tau}_{c}$ 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 $F$ with the image (of the same object) of another functor $G$; the naturality condition guarantees that these comparisons are compatible with arrow composition.

Examples

The determinant

Let $R$ be a commutative ring. For each $n\times n$ matrix $M$ with entries in $R$, the determinant of $M$ is an element in $R$. Moreover, we have the following classic facts of linear algebra:

$M$ is invertible exactly when its determinant is a unit; and

The determinant function is multiplicative
It follows that the determinant is a group morphism ${\mathrm{GL}}_{n}(R)\to {R}^{\times}$. Since this function ostensibly depends on the ring $R$, we should denote it $\underset{R}{det}:{\mathrm{GL}}_{n}(R)\to {R}^{\times}$. However, it is common to simply denote the determinant function by $det$, 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 $f:R\to S$ we have the following commutative diagram in $\mathbf{G}\mathbf{r}\mathbf{p}$:

This exactly says that $det:{\mathrm{GL}}_{n}\Rightarrow {\bullet}^{\times}$ is a natural transformation between two functors $\mathbf{\text{CRing}}\to \mathbf{\text{Grp}}$.

Free vector spaces and "insertion of generators"

Let $k$ be a field. For each set $X$, the free $F$-vector space on $X$ is the vector space $F(X)$ generated by the elements of $x$. It consists of all formal finite $k$-linear combinations of elements in $X$, i.e., it consists of sums of the form $\sum _{x\in X}{c}_{x}x$ where ${c}_{x}\in k$ (all but finitely many zero). One can show that this defines the object function of a functor $F:\mathbf{\text{Set}}\to {\mathbf{\text{Vec}}}_{k}$.

Let $U:{\mathbf{\text{Vec}}}_{k}\to \mathbf{\text{Set}}$ be the usual forgetful functor and consider the composition $UF:\mathbf{\text{Set}}\to \mathbf{\text{Set}}$. This composition sends each set $X$ to the set of elements of the vector space $F(X)$. There is evidently a set map $i:X\to UF(X)$ that sends each element $x\in X$ to the same element in $F(X)$, only now considered as a formal linear combination of the elements of $X$ (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 $\mathbf{\text{Set}}$ to the composition $UF$.

Soon we will see that the functors $U$ and $F$ are adjoints. This natural transformation will be an important part of that relationship.

Abelianization and forgetting

For each group $G$ the projection ${\pi}_{G}:G\to G/[G,G]$ defines a transformation from the identity functor on $\mathbf{\text{Grp}}$ to the abelianization-forgetful composition functor $\mathbf{\text{Grp}}\to \mathbf{\text{Ab}}\to \mathbf{\text{Grp}}$. This transformation is natural, since for every group morphism $f:G\to H$ 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 $J$ and $C$ are two categories. Recall that a diagram of shape $J$ in $C$ is simply a functor $F:J\to C$. 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 $J$ looks like

Suppose $F,G:J\to C$ are two such diagrams in $C$. Then a natural transformation $\tau :F\Rightarrow G$ can be visualized as