A natural transformation is an operation on a category, or more precisely a family of operations, one for each object in the category, which is preserved by morphisms in the category.

Each operation in the family is associated with a specific object in the category, which it is said to be *on*. The operation itself is an endomorphism on , modulo application of functors in a regular way to the domain and codomain. That is, it is a morphism from to for some functors and which are the same for every object. We call and the domain and codomain of the operation, respectively.

For example, multiplication in a group is a function from to , where is the forgetful functor from groups to sets. So the domain and codomain of the natural transformation corresponding to multiplication in groups are and respectively, where is the endofunctor on the category of sets such that for every set , we have , and for every function and any two elements and of , we have .

If, for every object , we write the operation on as , then the naturality condition requires that for every morphism , we have . This is just the requirement that “preserves” the operation: applying to the output is the same as using the value under as the input (modulo the functors we need to get the types right).

Consider the example of groups: a group homomorphism needs to have the property that for any two elements and of , we have . (Of course we don’t usually write the forgetful functor explicitly, but we’re trying to be precise here.) If we write multiplication in and using prefix symbols and respectively, then this equation becomes . Looking at the way acts on morphisms, we see that this can be further rewritten as

i.e.

.

⁂

I like this way of motivating natural transformations because—well, first of all because it’s a way of motivating natural transformations at all, which is more than pretty much every category theory introduction I’ve seen does, at least if you don’t count saying that there ought to be some notion of morphism between functors, and then declaring by fiat that natural transformations are the appropriate notion of morphism between functors, as motivation. But also because it allows us to reconcile the formal category-theoretic understanding of a category as having its morphisms as part of its data with the perhaps more natural pre-formal understanding of a category as having operations as part of its data, and morphisms being characterized by their preservation of those operations.

In general, we can say that an operation on a category is a family of morphisms on objects of , where and are functors from to some other category . In other words, it is like a natural transformation but it doesn’t need to satisfy the naturality condition. Now, if we have an operation like this we can consider the set of the morphisms in which do satisfy the natural condition, i.e. have . It turns out that this set of morphisms is always closed under composition and contains every identity morphism, and therefore induces a subcategory of :

*Proof that it’s closed under composition*. Suppose and are morphisms in and and . Then

*Proof that it contains every identity morphism*. Suppose is an object in . Then

For example, if we consider the category of groups and functions between groups, the category of groups and group homomorphisms is induced in this way as a subcategory by the operation of multiplication in groups.

It’s interesting to consider the converse: given a category and a subcategory of , under what circumstances is there is a category , functors and from to , and an operation such that the morphisms in are precisely the morphisms in with ? Obviously will have to still contain every object in (since the construction described here only limits the morphisms in the subcategory, not the objects), but I will leave any more detailed consideration of this question for readers.