Natural transformation

In category theory, a 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 fundamental notions of category theory and consequently appear in the majority of its applications.
Definition.
If formula_1 and formula_2 are functors between the categories formula_3 and formula_4, then a natural transformation formula_5 from formula_1 to formula_2 is a family of morphisms that satisfies two requirements.
The last equation can conveniently be expressed by the commutative diagram
If both formula_1 and formula_2 are contravariant, the vertical arrows in this diagram are reversed. If formula_5 is a natural transformation from formula_1 to formula_22, we also write formula_23 or formula_24. This is also expressed by saying the family of morphisms formula_25 is natural in formula_14.
If, for every object formula_8 in formula_28, the morphism formula_12 is an isomorphism in formula_4, then formula_5 is said to be a (or sometimes natural equivalence or isomorphism of functors). Two functors formula_32 and formula_2 are called "naturally isomorphic" or simply "isomorphic" if there exists a natural isomorphism from formula_1 to formula_2.
An infranatural transformation formula_5 from formula_1 to formula_2 is simply a family of morphisms formula_39, for all formula_8 in formula_3. Thus a natural transformation is an infranatural transformation for which formula_42 for every morphism formula_43. The naturalizer of formula_44, natformula_45, is the largest subcategory of formula_3 containing all the objects of formula_3 on which formula_5 restricts to a natural transformation.
Examples.
Opposite group.
Statements such as
abound in modern mathematics. We will now give the precise meaning of this statement as well as its proof. Consider the category 
formula_49 of all groups with group homomorphisms as morphisms. If formula_50 is a group, we define 
its opposite group formula_51 as follows: formula_52 is the same set as formula_53, and the operation formula_54 is defined 
by formula_55. All multiplications in formula_56 are thus "turned around". Forming the opposite group becomes 
a (covariant) functor from formula_49 to formula_49 if we define formula_59 for any group homomorphism formula_60. Note that 
formula_61 is indeed a group homomorphism from formula_52 to formula_63:
The content of the above statement is:
To prove this, we need to provide isomorphisms formula_67 for every group formula_53, such that the above diagram commutes. 
Set formula_69.
The formulas formula_70 and formula_71
show that formula_72 is a group homomorphism with inverse formula_73. To prove the naturality, we start with a group homomorphism 
formula_74 and show formula_75, i.e. 
formula_76 for all formula_77 in formula_53. This is true since 
formula_59 and every group homomorphism has the property formula_80.
Abelianization.
Given a group formula_53, we can define its abelianization formula_82 formula_83. Let 
formula_84 denote the projection map onto the cosets of formula_83. This homomorphism is "natural in 
formula_53", i.e., it defines a natural transformation, which we now check. Let formula_87 be a group. For any homomorphism formula_74, we have that 
formula_83 is contained in the kernel of formula_90, because any homomorphism into an abelian group kills the commutator subgroup. Then 
formula_90 factors through formula_92 as formula_93 for the unique homomorphism 
formula_94. This makes formula_95 a functor and 
formula_96 a natural transformation, but not a natural isomorphism, from the identity functor to formula_97.
Hurewicz homomorphism.
Functors and natural transformations abound in algebraic topology, with the Hurewicz homomorphisms serving as examples. For any pointed topological space formula_98 and positive integer formula_99 there exists a group homomorphism
from the formula_99-th homotopy group of formula_98 to the formula_99-th homology group of formula_104. Both formula_105 and formula_106 are functors from the category Top* of pointed topological spaces to the category Grp of groups, and formula_107 is a natural transformation from formula_105 to formula_106.
Determinant.
Given commutative rings formula_110 and formula_111 with a ring homomorphism formula_112, the respective groups of invertible formula_113 matrices formula_114 and formula_115 inherit a homomorphism which we denote by formula_116, obtained by applying formula_117 
to each matrix entry. Similarly, formula_117 restricts to a group homomorphism formula_119, where formula_120 denotes the group of units of formula_110. In fact, formula_122 and formula_123 are functors from the category of commutative rings formula_124 to formula_49. 
The determinant on the group formula_114, denoted by formula_127, is a group homomorphism 
which is natural in formula_110: because the determinant is defined by the same formula for every ring, formula_130 holds. This makes the determinant a natural transformation from formula_122 to formula_123.
Double dual of a vector space.
If formula_133 is a field, then for every vector space formula_134 over formula_133 we have a "natural" injective linear map formula_136 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 are the components of a natural transformation from the identity functor to the double dual functor.
Finite calculus.
For every abelian group formula_53, the set formula_138 of functions from the integers to the underlying set of formula_53 
forms an abelian group formula_140 under pointwise addition. (Here formula_141 is the standard forgetful functor formula_142.) 
Given an formula_143 morphism formula_144, the map formula_145 given by left composing formula_146 with the elements of the former is itself a homomorphism of abelian groups; in this way we 
obtain a functor formula_147. The finite difference operator formula_148 taking each function 
formula_149 to formula_150 is a map from formula_140 to itself, and the collection formula_152 of such maps gives a natural transformation formula_153.
Tensor-hom adjunction.
Consider the category formula_143 of abelian groups and group homomorphisms. For all abelian groups formula_104, formula_156 and formula_157 we have a group isomorphism
These isomorphisms are "natural" in the sense that they define a natural transformation between the two involved functors formula_159.
This is formally the tensor-hom adjunction, and is an archetypal example of a pair of adjoint functors. Natural transformations arise frequently in conjunction with adjoint functors, and indeed, adjoint functors are defined by a certain natural isomorphism. Additionally, every pair of adjoint functors comes equipped with two natural transformations (generally not isomorphisms) called the "unit" and "counit".
Unnatural isomorphism.
The notion of a natural transformation is categorical, and states (informally) that a particular map between functors can be done consistently over an entire category. Informally, a particular map (esp. an isomorphism) between individual objects (not entire categories) is referred to as a "natural isomorphism", meaning implicitly that it is actually defined on the entire category, and defines a natural transformation of functors; formalizing this intuition was a motivating factor in the development of category theory. Conversely, a particular map between particular objects may be called an unnatural isomorphism (or "this isomorphism is not natural") if the map cannot be extended to a natural transformation on the entire category. Given an object formula_162 a functor formula_53 (taking for simplicity the first functor to be the identity) and an isomorphism formula_164 proof of unnaturality is most easily shown by giving an automorphism formula_165 that does not commute with this isomorphism (so formula_166). More strongly, if one wishes to prove that formula_104 and formula_168 are not naturally isomorphic, without reference to a particular isomorphism, this requires showing that for "any" isomorphism formula_169, there is some formula_170 with which it does not commute; in some cases a single automorphism formula_170 works for all candidate isomorphisms formula_169 while in other cases one must show how to construct a different formula_173 for each isomorphism. The maps of the category play a crucial role – any infranatural transform is natural if the only maps are the identity map, for instance.
This is similar (but more categorical) to concepts in group theory or module theory, where a given decomposition of an object into a direct sum is "not natural", or rather "not unique", as automorphisms exist that do not preserve the direct sum decomposition – see for example.
Some authors distinguish notationally, using formula_174 for a natural isomorphism and formula_175 for an unnatural isomorphism, reserving formula_176 for equality (usually equality of maps).
Example: fundamental group of torus.
As an example of the distinction between the functorial statement and individual objects, consider homotopy groups of a product space, specifically the fundamental group of the torus.
The homotopy groups of a product space are naturally the product of the homotopy groups of the components, formula_177 with the isomorphism given by projection onto the two factors, fundamentally because maps into a product space are exactly products of maps into the components – this is a functorial statement.
However, the torus (which is abstractly a product of two circles) has fundamental group isomorphic to formula_178, but the splitting formula_179 is not natural. Note the use of formula_175, formula_174, and formula_182:
This abstract isomorphism with a product is not natural, as some isomorphisms of formula_184 do not preserve the product: the self-homeomorphism of formula_184 (thought of as the quotient space formula_186) given by formula_187 (geometrically a Dehn twist about one of the generating curves) acts as this matrix on formula_188 (it's in the general linear group formula_189 of invertible integer matrices), which does not preserve the decomposition as a product because it is not diagonal. However, if one is given the torus as a product formula_190 – equivalently, given a decomposition of the space – then the splitting of the group follows from the general statement earlier. In categorical terms, the relevant category (preserving the structure of a product space) is "maps of product spaces, namely a pair of maps between the respective components".
Naturality is a categorical notion, and requires being very precise about exactly what data is given – the torus as a space that happens to be a product (in the category of spaces and continuous maps) is different from the torus presented as a product (in the category of products of two spaces and continuous maps between the respective components).
Example: dual of a finite-dimensional vector space.
Every finite-dimensional vector space is isomorphic to its dual space, but there may be many different isomorphisms between the two spaces. There is in general no natural isomorphism between a finite-dimensional vector space and its dual space. However, related categories (with additional structure and restrictions on the maps) do have a natural isomorphism, as described below.
The dual space of a finite-dimensional vector space is again a finite-dimensional vector space of the same dimension, and these are thus isomorphic, since dimension is the only invariant of finite-dimensional vector spaces over a given field. However, in the absence of additional constraints (such as a requirement that maps preserve the chosen basis), the map from a space to its dual is not unique, and thus such an isomorphism requires a choice, and is "not natural". On the category of finite-dimensional vector spaces and linear maps, one can define an infranatural isomorphism from vector spaces to their dual by choosing an isomorphism for each space (say, by choosing a basis for every vector space and taking the corresponding isomorphism), but this will not define a natural transformation. Intuitively this is because it required a choice, rigorously because "any" such choice of isomorphisms will not commute with, say, the zero map; see for detailed discussion.
Starting from finite-dimensional vector spaces (as objects) and the identity and dual functors, one can define a natural isomorphism, but this requires first adding additional structure, then restricting the maps from "all linear maps" to "linear maps that respect this structure". Explicitly, for each vector space, require that it comes with the data of an isomorphism to its dual, formula_191. In other words, take as objects vector spaces with a nondegenerate bilinear form formula_192. This defines an infranatural isomorphism (isomorphism for each object). One then restricts the maps to only those maps formula_193 that commute with the isomorphisms: formula_194 or in other words, preserve the bilinear form: formula_195. (These maps define the "naturalizer" of the isomorphisms.) The resulting category, with objects finite-dimensional vector spaces with a nondegenerate bilinear form, and maps linear transforms that respect the bilinear form, by construction has a natural isomorphism from the identity to the dual (each space has an isomorphism to its dual, and the maps in the category are required to commute). Viewed in this light, this construction (add transforms for each object, restrict maps to commute with these) is completely general, and does not depend on any particular properties of vector spaces.
In this category (finite-dimensional vector spaces with a nondegenerate bilinear form, maps linear transforms that respect the bilinear form), the dual of a map between vector spaces can be identified as a transpose. Often for reasons of geometric interest this is specialized to a subcategory, by requiring that the nondegenerate bilinear forms have additional properties, such as being symmetric (orthogonal matrices), symmetric and positive definite (inner product space), symmetric sesquilinear (Hermitian spaces), skew-symmetric and totally isotropic (symplectic vector space), etc. – in all these categories a vector space is naturally identified with its dual, by the nondegenerate bilinear form.
Operations with natural transformations.
If formula_196 and formula_197
are natural transformations between functors formula_198, then we can compose them to get a natural transformation formula_199. 
This is done componentwise: formula_200. This "vertical composition" of natural transformation is associative and has an identity, and 
allows one to consider the collection of all functors formula_201 itself as a category (see below under Functor categories).
Natural transformations also have a "horizontal composition". If formula_202 
is a natural transformation between functors formula_203 and formula_204
is a natural transformation between functors formula_205, then the composition of functors allows a composition of natural transformations formula_206.
This operation is also associative with identity, and the identity coincides with that for vertical composition. The two operations are related by an identity which exchanges vertical composition with horizontal composition.
If formula_202 is a natural transformation between functors formula_203, and formula_209 is another functor, then we can form the natural transformation formula_210 by defining
If on the other hand formula_212 is a functor, the natural transformation formula_213 is defined by
Functor categories.
If formula_215 is any category and formula_216 is a small category, we can form the functor category formula_217 having as objects all functors from formula_216 to formula_215 and as morphisms the natural transformations between those functors. This forms a category since for any functor formula_220 there is an identity natural transformation formula_221 (which assigns to every object formula_104 the identity morphism on formula_223) and the composition of two natural transformations (the "vertical composition" above) is again a natural transformation.
The isomorphisms in formula_217 are precisely the natural isomorphisms. That is, a natural transformation formula_202 is a natural isomorphism if and only if there exists a natural transformation formula_226 such that formula_227 and formula_228.
The functor category formula_217 is especially useful if formula_216 arises from a directed graph. For instance, if formula_216 is the category of the directed graph , then formula_217 has as objects the morphisms of formula_215, and a morphism between formula_234 and formula_235 in formula_217 is a pair of morphisms formula_237 and formula_238 in formula_215 such that the "square commutes", i.e. formula_240.
More generally, one can build the 2-category formula_241 whose
The horizontal and vertical compositions are the compositions between natural transformations described previously. A functor category formula_217 is then simply a hom-category in this category (smallness issues aside).
More examples.
Every limit and colimit provides an example for a simple natural transformation, as a cone amounts to a natural transformation with the diagonal functor as domain. Indeed, if limits and colimits are defined directly in terms of their universal property, they are universal morphisms in a functor category.
Yoneda lemma.
If formula_104 is an object of a locally small category formula_215, then the assignment formula_253 defines a covariant functor formula_254. This functor is called "representable" (more generally, a representable functor is any functor naturally isomorphic to this functor for an appropriate choice of formula_104). The natural transformations from a representable functor to an arbitrary functor formula_256 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 would be isomorphic to those of the singular theory. What cannot easily be expressed without the language of natural transformations is how homology groups are compatible with morphisms between objects, and how two equivalent homology theories not only have the same homology groups, but also the same morphisms between those groups.