Natural transformation
Encyclopedia
In category theory
Category theory
Category theory is an area of study in mathematics that examines in an abstract way the properties of particular mathematical concepts, by formalising them as collections of objects and arrows , where these collections satisfy certain basic conditions...

, a branch of mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

, a natural transformation provides a way of transforming one functor
Functor
In category theory, a branch of mathematics, a functor is a special type of mapping between categories. Functors can be thought of as homomorphisms between categories, or morphisms when in the category of small categories....

into another while respecting the internal structure (i.e. the composition of morphism
Morphism
In mathematics, a morphism is an abstraction derived from structure-preserving mappings between two mathematical structures. The notion of morphism recurs in much of contemporary mathematics...

s) 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
Functor category
In category theory, a branch of mathematics, the functors between two given categories form a category, where the objects are the functors and the morphisms are natural transformations between the functors...

. Natural transformations are, after categories and functors, one of the most basic notions of category theory
Category theory
Category theory is an area of study in mathematics that examines in an abstract way the properties of particular mathematical concepts, by formalising them as collections of objects and arrows , where these collections satisfy certain basic conditions...

and consequently appear in the majority of its applications.

## Definition

If F and G are functor
Functor
In category theory, a branch of mathematics, a functor is a special type of mapping between categories. Functors can be thought of as homomorphisms between categories, or morphisms when in the category of small categories....

s between the categories C and D, then a natural transformation η from F to G associates to every object X in C with that in D using a morphism
Morphism
In mathematics, a morphism is an abstraction derived from structure-preserving mappings between two mathematical structures. The notion of morphism recurs in much of contemporary mathematics...

ηX. called the component of η at X, such that for every morphism we have:

This equation can conveniently be expressed by the commutative diagram
Commutative diagram
In mathematics, and especially in category theory, a commutative diagram is a diagram of objects and morphisms such that all directed paths in the diagram with the same start and endpoints lead to the same result by composition...

If both F and G are contravariant, the horizontal arrows in this diagram are reversed. If η is a natural transformation from F to G, we also write or . This is also expressed by saying the family of morphisms is natural in X.

If, for every object X in C, the morphism ηX is an isomorphism
Isomorphism
In abstract algebra, an isomorphism is a mapping between objects that shows a relationship between two properties or operations.  If there exists an isomorphism between two structures, the two structures are said to be isomorphic.  In a certain sense, isomorphic structures are...

in D, then η is said to be a (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.

An infranatural transformation η from F to G is simply a family of morphisms . Thus a natural transformation is an infranatural transformation for which for every morphism . The naturalizer of η, nat(η), is the largest subcategory
Subcategory
In mathematics, a subcategory of a category C is a category S whose objects are objects in C and whose morphisms are morphisms in C with the same identities and composition of morphisms. Intuitively, a subcategory of C is a category obtained from C by "removing" some of its objects and...

of C containing all the objects of C on which η restricts to a natural transformation.

### A worked example

Statements such as
"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 group
Group (mathematics)
In mathematics, a group is an algebraic structure consisting of a set together with an operation that combines any two of its elements to form a third element. To qualify as a group, the set and the operation must satisfy a few conditions called group axioms, namely closure, associativity, identity...

s with group homomorphism
Group homomorphism
In mathematics, given two groups and , a group homomorphism from to is a function h : G → H such that for all u and v in G it holds that h = h \cdot h...

s as morphisms. If (G,*) is a group, we define its opposite group (Gop,*op) as follows: Gop is the same set as G, and the operation *op is defined by . All multiplications in Gop are thus "turned around". Forming the opposite
Opposite category
In category theory, a branch of mathematics, the opposite category or dual category Cop of a given category C is formed by reversing the morphisms, i.e. interchanging the source and target of each morphism. Doing the reversal twice yields the original category, so the opposite of an opposite...

group becomes a (covariant!) functor from Grp to Grp if we define for any group homomorphism . Note that fop is indeed a group homomorphism from Gop to Hop:
fop(a *op b) = f(b * a) = f(b) * f(a) = fop(a) *op fop(b).

The content of the above statement is:
"The identity functor is naturally isomorphic to the opposite functor ."

To prove this, we need to provide isomorphisms for every group G, such that the above diagram commutes. Set . The formulas and show that ηG is a group homomorphism which is its own inverse. To prove the naturality, we start with a group homomorphism and show , i.e. for all a in G. This is true since and every group homomorphism has the property .

### Further examples

If K is a field
Field (mathematics)
In abstract algebra, a field is a commutative ring whose nonzero elements form a group under multiplication. As such it is an algebraic structure with notions of addition, subtraction, multiplication, and division, satisfying certain axioms...

, then for every vector space
Vector space
A vector space is a mathematical structure formed by a collection of vectors: objects that may be added together and multiplied by numbers, called scalars in this context. Scalars are often taken to be real numbers, but one may also consider vector spaces with scalar multiplication by complex...

V over K we have a "natural" injective linear map  from the vector space into its double dual
Dual space
In mathematics, any vector space, V, has a corresponding dual vector space consisting of all linear functionals on V. Dual vector spaces defined on finite-dimensional vector spaces can be used for defining tensors which are studied in tensor algebra...

. 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.

Every finite dimensional vector space is also isomorphic to its dual space. But this isomorphism relies on an arbitrary choice of basis, and is not natural, though there is an infranatural transformation. More generally, any vector spaces with the same dimensionality are isomorphic, but not (necessarily) naturally so. (Note however that if the space has a nondegenerate bilinear form, then there is a natural isomorphism between the space and its dual. Here the space is viewed as an object in the category of vector spaces and transpose
Transpose
In linear algebra, the transpose of a matrix A is another matrix AT created by any one of the following equivalent actions:...

s of maps.)

Consider the category Ab of abelian groups and group homomorphisms
Category of abelian groups
In mathematics, the category Ab has the abelian groups as objects and group homomorphisms as morphisms. This is the prototype of an abelian category....

. For all abelian groups X, Y and Z we have a group isomorphism
.

These isomorphisms are "natural" in the sense that they define a natural transformation between the two involved functors .

Natural transformations arise frequently in conjunction with adjoint functors
In mathematics, adjoint functors are pairs of functors which stand in a particular relationship with one another, called an adjunction. The relationship of adjunction is ubiquitous in mathematics, as it rigorously reflects the intuitive notions of optimization and efficiency...

. 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.

## Operations with natural transformations

If and are natural transformations between functors , then we can compose them to get a natural transformation . This is done componentwise: . This "vertical composition" of natural transformation is associative and has an identity, and allows one to consider the collection of all functors itself as a category (see below under Functor categories).

Natural transformations also have a "horizontal composition". If is a natural transformation between functors and is a natural transformation between functors , then the composition of functors allows a composition of natural transformations . 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 is a natural transformation between functors , and is another functor, then we can form the natural transformation by defining

If on the other hand is a functor, the natural transformation is defined by

## Functor categories

If C is any category and I is a small category, we can form the functor category
Functor category
In category theory, a branch of mathematics, the functors between two given categories form a category, where the objects are the functors and the morphisms are natural transformations between the functors...

CI having as objects all functors from I to C and as morphisms the natural transformations between those functors. This forms a category since for any functor F there is an identity natural transformation (which assigns to every object X the identity morphism on F(X)) and the composition of two natural transformations (the "vertical composition" above) is again a natural transformation.

The isomorphism
Isomorphism
In abstract algebra, an isomorphism is a mapping between objects that shows a relationship between two properties or operations.  If there exists an isomorphism between two structures, the two structures are said to be isomorphic.  In a certain sense, isomorphic structures are...

s in CI are precisely the natural isomorphisms. That is, a natural transformation is a natural isomorphism if and only if there exists a natural transformation such that and .

The functor category CI is especially useful if I arises from a directed graph
Directed graph
A directed graph or digraph is a pair G= of:* a set V, whose elements are called vertices or nodes,...

. For instance, if I is the category of the directed graph , then CI has as objects the morphisms of C, and a morphism between and in CI is a pair of morphisms and in C such that the "square commutes", i.e. .

More generally, one can build the 2-category
2-category
In category theory, a 2-category is a category with "morphisms between morphisms"; that is, where each hom set itself carries the structure of a category...

Cat whose
• 0-cells (objects) are the small categories,
• 1-cells (arrows) between two objects and are the functors from to ,
• 2-cells between two 1-cells (functors) and are the natural transformations from to .

The horizontal and vertical compositions are the compositions between natural transformations described previously. A functor category is then simply a hom-category in this category (smallness issues aside).

## Yoneda lemma

If X is an object of a locally small category C, then the assignment defines a covariant functor . This functor is called representable
Representable functor
In mathematics, particularly category theory, a representable functor is a functor of a special form from an arbitrary category into the category of sets. Such functors give representations of an abstract category in terms of known structures In mathematics, particularly category theory, a...

(more generally, a representable functor is any functor naturally isomorphic to this functor for an appropriate choice of X). The natural transformations from a representable functor to an arbitrary functor are completely known and easy to describe; this is the content of the Yoneda lemma
Yoneda lemma
In mathematics, specifically in category theory, the Yoneda lemma is an abstract result on functors of the type morphisms into a fixed object. It is a vast generalisation of Cayley's theorem from group theory...

.

## Historical notes

Saunders Mac Lane
Saunders Mac Lane
Saunders Mac Lane was an American mathematician who cofounded category theory with Samuel Eilenberg.-Career:...

, 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
Group (mathematics)
In mathematics, a group is an algebraic structure consisting of a set together with an operation that combines any two of its elements to form a third element. To qualify as a group, the set and the operation must satisfy a few conditions called group axioms, namely closure, associativity, identity...

is not complete without a study of homomorphisms
Group homomorphism
In mathematics, given two groups and , a group homomorphism from to is a function h : G → H such that for all u and v in G it holds that h = h \cdot h...

, so the study of categories is not complete without the study of functor
Functor
In category theory, a branch of mathematics, a functor is a special type of mapping between categories. Functors can be thought of as homomorphisms between categories, or morphisms when in the category of small categories....

s. 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
Homology (mathematics)
In mathematics , homology is a certain general procedure to associate a sequence of abelian groups or modules with a given mathematical object such as a topological space or a group...

. Different ways of constructing homology could be shown to coincide: for example in the case of a simplicial complex
Simplicial complex
In mathematics, a simplicial complex is a topological space of a certain kind, constructed by "gluing together" points, line segments, triangles, and their n-dimensional counterparts...

the groups defined directly, and those of the singular theory, would be isomorphic. 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.