Natural transformation
From Academic Kids

In category theory, an abstract branch of mathematics, a natural transformation provides a way of transforming one functor into another while respecting the internal structure (i.e. the composition of morphisms) of the categories involved. Hence, a natural transformation can be considered to be a "morphism of functors". Indeed this intuition can be formalized to define so called functor categories. Natural transformations are, after categories and functors, one of the most basic notions of categorical algebra and consequently appear in the majority of its applications.
Contents 
Definition
If F and G are functors between the categories C and D, then a natural transformation η from F to G associates to every object X in C a morphism η_{X} : F(X) → G(X) in D, such that for every morphism f : X → Y in C we have η_{Y} O F(f) = G(f) O η_{X}. This equation can conveniently be expressed by the commutative diagram
If one or both of F or G are contravariant the corresponding horizontal arrow is reversed. If η is a natural transformation from F to G, we also write η : F → G. This is also expressed by saying the family of morphisms η_{X} : F(X) → G(X) is natural in X.
If, for every object X in C, the morphism η_{X} is an isomorphism in D, then η is said to be a natural isomorphism (or sometimes natural equivalence or isomorphism of functors). Two functors F and G are called naturally isomorphic or simply isomorphic if there exists a natural isomorphism from F to G.
Examples
A worked example
Statements like
 "Every group is naturally isomorphic to its opposite group"
abound in modern mathematics. We will now give the precise meaning of this statement as well as its proof. Consider the category Grp of all groups with group homomorphisms as morphisms. If (G,*) is a group, we define its opposite group (G^{op},*^{op}) as follows: G^{op} is the same set as G, and the operation *^{op} is defined by a*^{op}b = b*a. All multiplications in G^{op} are thus "turned around". Forming the opposite group becomes a (covariant!) functor from Grp to Grp if we define f^{op} = f for any group homomorphism f: G → H. Note that f^{op} is indeed a group homomorphism from G^{op} to H^{op}:
 f^{op}(a*^{op}b) = f(b*a) = f(b)*f(a) = f^{op}(a)*^{op}f^{op}(b).
The content of the above statement is:
 "The identity functor Id_{Grp} : Grp → Grp is naturally isomorphic to the opposite functor ^{op} : Grp → Grp."
To prove this, we need to provide isomorphisms η_{G} : G → G^{op} for every group G, such that the above diagram commutes. Set η_{G}(a) = a^{1}. The formulas (ab)^{1} = b^{1} a^{1} and (a^{1})^{1} = a show that η_{G} is a group homomorphism which is its own inverse. To prove the naturality, we start with a group homomorphism f : G → H and show η_{H} o f = f^{op} o η_{G}, i.e. (f(a))^{1} = f^{op}(a^{1}) for all a in G. This is true since f^{op} = f and every group homomorphism has the property (f(a))^{1} = f(a^{1}).
Further examples
If K is a field, then for every vector space V over K we have a "natural" injective linear map V → V** from the vector space into its double dual. These maps are "natural" in the following sense: the double dual operation is a functor, and the maps form a natural transformation from the identity functor to the double dual functor.
Consider the category Ab of abelian groups and group homomorphisms. For all abelian groups X, Y and Z we have a group isomorphism
 Hom(X, Hom(Y, Z)) → Hom(X⊗Y, Z).
These isomorphisms are "natural" in the sense that they define a natural transformation between the two involved functors Ab^{op} × Ab^{op} × Ab → Ab.
Natural transformations arise frequently in conjunction with adjoint functors. Indeed, adjoint functors are defined by a certain natural isomorphism. Additionally, every pair of adjoint functors come equipped with two natural transformations (generally not isomorphisms) called the unit and counit.
Operations with natural transformations
If η : F → G and ε : G → H are natural transformations between functors C → D, then we can compose them to get a natural transformation εη : F → H. This is done componentwise: (εη)_{X} = ε_{X}η_{X}. This composition of natural transformation is associative, and allows to consider the collection of all functors C → D itself as a category (see below under Functor categories).
A natural transformation η : F → G is a natural isomorphism if and only if there exists a natural transformation ε : G → F such that ηε = 1_{G} and εη = 1_{F} (where 1_{F} : F → F is the natural transformation assigning to every object X the identity morphism on F(X)).
If η : F → G is a natural transformation between functors C → D, and H : D → E is another functor, then we can form the natural transformation Hη : HF → HG by defining (Hη)_{X} = H(η_{X}). If on the other hand K : B → C is a functor, the natural transformation ηK : FK → GK is defined by (ηK)_{X} = η_{K(X)}.
Functor categories
If C is any category and I is a small category, we can form the functor category C^{I} having as objects all functors from I to C and as morphisms the natural transformations between those functors. This is especially useful if I arises from a directed graph. For instance, if I is the category of the directed graph • → •, then C^{I} has as objects the morphisms of C, and a morphism between φ : U → V and ψ : X → Y in C^{I} is a pair of morphisms f : U → X and g : V → Y in C such that the "square commutes", i.e. ψ f = g φ.
Yoneda lemma
If X is an object of the category C, then the assignment Y > Mor_{C}(X, Y) defines a covariant functor F_{X} : C → Set. This functor is called representable. The natural transformations from a representable functor to an arbitrary functor F : C → Set are completely known and easy to describe; this is the content of the Yoneda lemma.
Historical notes
Saunders Mac Lane, one of the founders of category theory, is said to have remarked, "I didn't invent categories to study functors; I invented them to study natural transformations." Just as the study of groups is not complete without a study of homomorphisms, so the study of categories is not complete without the study of functors. The reason for Mac Lane's comment is that the study of functors is itself not complete without the study of natural transformations.
The context of Mac Lane's remark was the axiomatic theory of homology. Different ways of constructing homology could be shown to coincide: for example in the case of a simplicial complex the groups defined directly, and those of the singular theory, would be isomorphic. But that in itself stated much less than the existence of a natural transformation of the corresponding homology functors.es:Transformación natural