This is really what category theory was originally invented for, and the terminology predates the theory. Certain homomorphisms were called “natural”, but there really wasn’t a good notion of what “natural” meant. In the process of trying to flesh that out it became clear that we were really talking about transformations between the values of two different constructions from the same source, and those constructions became functors. Then in order to rigorously define what a functor was, categories were introduced.
Given two functors and , a natural transformation is a collection of arrows in indexed by the objects of . The condition of naturality is that the following square commutes for every arrow in :
The vertical arrows from from applying the two functors to the arrow , and the horizontal arrows are the components of the natural transformation.
If we have three functors , , and from to and natural transformations and we get a natural transformation with components . Indeed, we can just stack the naturality squares beside each other:
and the outer square commutes because both the inner ones do.
Every functor comes with the identity natural transformation , whose components are all identity morphisms. Clearly it acts as the identity for the above composition of natural transformations.
A natural transformation is invertible for the above composition if and only if each component is invertible as an arrow in . In this case we call it a “natural isomorphism”. We say two functors are “naturally isomorphic” if there is a natural isomorphism between them.
All of this certainly looks like we’re talking about a category, but again the set theoretic constraints often work against us. There are, however, times where we really do have a category. If one of or (or both) are small, then all the set theory works out and we get an honest category of functors from to . We will usually denote this category as . Its objects are functors from to , and its morphisms are natural transformations between such functors.
And now we can explain the notation for the category of arrows. This is the category of functors from to ! What is a functor from to ? Remember that is the category with two objects and and one non-trivial arrow . Thus a functor is defined by an arrow , and there’s exactly one functor for every arrow in .
Now let’s say we have two such functors and . A natural transformation consists of morphisms and so that the naturality square commutes. But this is the same thing we used to define morphisms in the arrow category, just with some different notation!
Natural transformations and functor categories show up absolutely everywhere once you know to look for them. We’ll be seeing a lot more examples as we go on.
Another useful example of a category is a comma category. The term comes from the original notation which has since fallen out of favor because, as Saunders MacLane put it, “the comma is already overworked”.
We start with three categories , , and , and two functors and . The objects of the comma category are triples where is an object of , is an object of , and is an arrow in . The morphisms are pairs — with an arrow in and an arrow in — making the following square commute:
So what? Well, let’s try picking to be the functor sending the single object of to the object . Then let be the identity functor on . Now an object of is an arrow , where can be any other object in . A morphism is then a triangle:
Work out for yourself the category .
Here’s another example: the category . Verify that this is exactly the arrow category .
And another: check that given objects and in , the category is the discrete category (set) .