Natural transformations
..."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."
When I first read the above quote, I couldn't quite wrap my head around how this could be case. Out of all of the foundations of basic category theory, natural transformations initially seemed to me the least intuitive concept. I've since come to the understanding, however, that this is precisely why we need category theory.
After all, once you've spent times studying vector spaces (with the linear transformations between them), groups (with the group morphisms between them), rings (with the ring morphisms between them) and topological spaces (with the continuous maps between them), you can't help but notice a general pattern: there always seems to be some type of algebraic object (i.e., a set with additional structure) and structure-preserving maps between those structures. So the basic idea of a category (objects and arrows) seems inevitable.
And it doesn't take long to make the jump to connections between categories, i.e., functors. If this were where the story ended, you'd have a strong argument to suggest that functors should have been simply called morphisms between categories (and you still could). Category theory would also have been a lot less powerful.
But there's more to this story. Anyone who has spent enough time studying some type of algebraic structure eventually encounters constructions that seem "natural," in the sense that they're "the same for every object." A popular example of this is the determinant, the function that assigns to each square matrix a number with some very nice properties. We've all memorized the formula for computing the determinant, and that formula doesn't depend on the type of entries in the matrix. In other words, regardless of whether the entries of your square matrix are integers, real numbers, or real-valued functions, the formula for the determinant of that matrix is always "the same," namely a signed-sum over all possible products of entries (with exactly one entry selected from each row and column). No one ever said "This is how you compute the determinant if your entries are real numbers, but this is how you compute the determinant if your entries are real-valued functions."
There are many (many!) more examples, and we'll see a bunch of them soon, but historically it took time to pin down exactly what was meant mathematically by "natural" or "the same for all objects." It was this issue that likely delayed the development of category theory, at least a bit. And it's the fact that category theory finally enables us to be precise about "naturality" that gives the theory it's first real chance to shine. So let's get to it!
Mathematical naturality
A natural transformation is a morphism between functors.
At long last, here is the definition:
Suppose
The arrows
A natural transformation
There is not an officially agreed-upon notation for natural transformations. Some authors use the notation we use here, but I've also seen it written
Examples
Moving forward from this point, we will see many examples. What follows is just an initial sampling.
The identity natural transformation
For any functor
The determinant
Even though it's actually far from the simplest and most intuitive example, our first nontrivial example should probably be the determinant, since it was an early motivator for this new idea. For simplicity, we will mainly restrict to the situation of the determinant of an invertible square matrix.
To that end, let
is invertible exactly when its determinant is a unit; and - The determinant function is multiplicative
It follows that the determinant defines 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 over every ring." The precise meaning of this is that for every ring morphism we have the following commutative diagram in :
The vertical arrow on the left is the group morphism that takes each
The above diagram is a fancy way of expressing the fact that, given an invertible
In any case, the above diagram exactly says that
Maps between diagrams
We can use functors to formalize the notion of "diagrams" in a given category, and then use natural transformations to formalize the notion of "maps between diagrams" of "the same shape".
Suppose
We can visualize these natural transformations as cylinders with cross-sections given by the shape category. For example, suppose the category
Suppose
The vertical green arrows are the components of the natural transformation. The naturality condition here is the requirement that each of the three "vertical" rectangles commutes.
The center of a group
Recall that to each group
Indeed, first suppose
Now let's investigate the naturality condition. Take any arrow in
The vertical arrows correspond to the element
It's not hard to show the converse, namely that every element of the center induces a corresponding natural transformation.
Even better, this bijection can be upgraded to an isomorphism of groups! There is a composition operation on natural transformations (see below), and this can be used to put a group structure on the set of these natural transformations
Free vector spaces and "insertion of generators"
Let
Let
Soon we will see that the functors
Abelianization and forgetting
For each group
Similar to the previous example, we will soon see that the abelianization and forgetful functors are an adjoint pair.
Composition of natural transformations
There are two ways one can compose natural transformations, which visually can be thought of as
"vertical composition" and "horizontal composition."
Vertical composition of natural transformations
Suppose we have three functors
We can define a natural transformation
The naturality condition for
This vertical composition will allow us to define an entire category of functors between two fixed categories, i.e., so-called functor categories. In fact, you should check that for each functor
Horizontal composition of natural transformations
You can probably see this one coming, but now suppose we had successive natural transformations between pairs of functors, as illustrated below:
We can combine the components of the natural transformations
I'm purposely not filling in the details for this composition for two reasons:
- We will not need this composition anytime soon.
- If we proceed any further, we'll need to decide how to distinguish the two composition operations. Should we use different symbols for each, like
and ? Should we leave it as and make it context-specific? Rather than decide, let's avoid the issue for as long as we can. Maybe forever!
Natural isomorphisms
Now that we have a way to compose natural transformations we can consider the idea of "invertible" natural transformations and natural "isomorphisms."
A natural transformation
In this case, we say that the functors
Suggested next notes
Functor categories
Universal Properties III - Yoneda's Lemma
I'm not calling the field
here since that letter is about to refer to a functor. ↩︎