# Category Theory/Natural transformations

Definition (natural transformation):

Let ${\mathcal {A}},{\mathcal {B}}$ be categories, and let $F,G:{\mathcal {A}}\to {\mathcal {B}}$ be two functors. A natural transformation between these two functors is a collection of morphisms of ${\mathcal {B}}$ , one for each object $A$ of ${\mathcal {A}}$ , namely $f_{A}:F(A)\to G(A)$ , such that for all morphisms $g:A\to A'$ of ${\mathcal {A}}$ , the following diagram commutes:

diagram placeholder

# Old content

One further basic notion in the theory of categories, or, as it may be said, a basic item of categorical language, will now be introduced. This is the notion of a natural transformation of functors from one category to another. Indeed, the whole language and apparatus of categories and functors were developed initially by the U.S. mathematicians Samuel Eilenberg and Saunders MacLane in order to render precise the intuitive concept of naturality. First an example will be given, the example that may be said to have motivated the definition.

## Motivating example

Let $\mathbb {V}$ be a vector space over some field $F$ , and let $\mathbb {V} ^{*}$ be the dual space of $\mathbb {V}$ ; that is, the space of linear functionals on $\mathbb {V}$ . There is then a linear transformation $T:\mathbb {V} \to \mathbb {V} ^{**}$ that is given. There is an intuitive feeling that the linear transformation $T$ is natural because its description only involves the terms u and f. Now if $\mathbb {V}$ is finite-dimensional, then it is known that $T$ is an isomorphism in the category of vector spaces over $F$ and linear transformations. One way of proving that $T$ is then an isomorphism is to show that $\mathbb {V}$ and $\mathbb {V} ^{**}$ are isomorphic and then to observe that $T$ is one–one. The usual proof that $\mathbb {V}$ and $\mathbb {V} ^{**}$ are isomorphic would be to proceed by establishing an isomorphism between $\mathbb {V}$ and $\mathbb {V} ^{*}$ , in the case when $\mathbb {V}$ is finite-dimensional. Now if a base $(e_{1},\dots ,e_{N})$ for $\mathbb {V}$ is given, then a basis for $\mathbb {V} ^{*}$ may be set up, called the dual basis, by defining $e_{i}^{*}$ to be that linear functional on $\mathbb {V}$ given by certain rules (see 350). Then the correspondence $e_{i}\leftrightarrow e_{i}^{*}$ sets up an isomorphism between $\mathbb {V}$ and $\mathbb {V} ^{*}$ .

On the other hand, this isomorphism does not look natural, because it depends on the choice of bases. Of course, the argument above could be generalized to set up a linear transformation from $\mathbb {V}$ to $\mathbb {V}$ * even if $\mathbb {V}$ is not finite-dimensional over $F$ , but, again, this transformation would not appear to be natural. What is required is a formal and precise expression of the feeling that, for finite-dimensional vector spaces $\mathbb {V}$ over the field $F$ , $\mathbb {V}$ and $\mathbb {V} ^{**}$ are naturally isomorphic, while $\mathbb {V}$ and $\mathbb {V} ^{*}$ are isomorphic in some unnatural way. Eilenberg and MacLane solved this problem in their seminal article, “General Theory of Natural Equivalences,” published in 1945, which laid the foundation of the theory of categories.

## Duality

For any category $C$ a new category $C^{op}$ can be formed by interchanging the domains and codomains of the morphisms of $C$ . More precisely, in the category $C^{op}$ the objects are simply those of $C$ and the effect of interchange of domains is expressed in an equation (see 359). Moreover, the composition in $C^{op}$ is simply that of $C$ , suitably interpreted. $C^{op}$ is called the category opposite to $C$ ; notice that $C^{op^{op}}$ = $C$ . This apparently trivial operation leads to highly significant results when specific categories are used. In the general setting it enables any concept in the language of categories to be dualized. For example, the coproduct in $C$ is simply the product in $C^{op}$ . Any theorem that holds in an arbitrary category has a dual form. For example, the theorem asserting that the product in an arbitrary category is associative may be effectively restated as asserting that the coproduct in an arbitrary category is associative. In the special cases, however, the second statement looks very different from the first. For example, in the category of sets, the coproduct becomes the disjoint union; in the category of groups it is the free product; and in a pre-ordered set regarded as a category, the coproduct is the least upper bound. In particular, for the set of natural numbers, ordered by divisibility, the coproduct is the LCM. Thus, the same universal argument that led to the deduction that the GCD is associative also indicates that the LCM is associative. The duality principle has very wide ramifications indeed. Here it is merely noted that the important concept of a contravariant functor $F:{\mathcal {C}}\to {\mathcal {D}}$ may be most simply defined as a functor $F:{\mathcal {C}}^{op}\to {\mathcal {D}}$ . Thus the association of the dual vector space $\mathbb {V} ^{*}$ with $\mathbb {V}$ yields a contravariant functor from $\mathbb {V}$ to $\mathbb {V}$ itself.

## Definition of natural transformation

Suppose $\Phi$ , $\Psi$ are two functors, both from the category ${\mathcal {C}}$ to the category ${\mathcal {D}}$ .

Then a natural transformation $\eta :\Phi \to \Psi$ is a rule that assigns to each object A of category ${\mathcal {C}}$ a morphism $\eta _{A}:\Phi (A)\to _{\mathcal {D}}\Psi (A)$ .

The morphisms $\eta _{A}$ involved must be subject to the condition that the diagram

should be commutative for every $f:A\to _{\mathcal {C}}B$ (note $f$ is a morphism in the category ${\mathcal {C}}$ ); that is, $\Psi (f)\circ \eta _{A}=\eta _{B}\circ \Phi (f)$ (note the commutative diagram is drawn in category ${\mathcal {D}}$ ).

## Natural isomorphisms

Further, if $\eta _{A}$ is invertible for each A, then $\eta$ is said to be natural isomorphism (or a natural equivalence). It is clear that if $\eta$ is a natural equivalence from functors $\Phi$ to $\Psi$ , then $\eta ^{-1}$ , given by an equation (see 352), is a natural equivalence from functors $\Psi$ to $\Phi$ . Thus the term equivalence used here is fully justified. Indeed, the functors from ${\mathcal {C}}$ to ${\mathcal {D}}$ may be collected into equivalence classes according to the existence of a natural equivalence between them.

## Examples

This definition can be tested against the example. Consider two functors from K-Vect to K-Vect, in which K-Vect is the category of vector spaces over the field K and linear transformations. One functor is the identity functor. The other functor is the double dual functor ** that associates with every vector space V its double dual V** and with every linear transformation f : UV in the linear transformation f**: U** → V** (see 353). A linear transformation T: VV** was described above. It is easy to check that T is a natural transformation from the identity functor to the functor **. If the subcategory f of K-Vect that consists of finite-dimensional vector spaces over K and their linear transformations is considered, then it turns out that the functor ** transforms f into itself; and the natural transformation T, restricted to f, is then a natural equivalence. Further examples of natural transformations of functors can be given:

• The category of Abelian groups and homomorphisms is considered. With every Abelian group may be associated its torsion subgroup. The torsion subgroup AT of the Abelian group A consists of those elements of A that are of finite order. A homomorphism from A to B must necessarily send AT to BT. Thus a functor f is obtained from to (or to T, the category of torsion Abelian groups and their homomorphisms), by associating with every Abelian group A the Abelian group FA = AT. Now AT is a subgroup of A. Thus there is always an embedding iA of AT in A. It is easy to see that i is a natural transformation from the torsion functor f to the identity functor. Further, the quotient group Afr = A/AT may be considered. It is a torsion-free Abelian group. This gives a functor g from to (or from to fr, the category of torsion-free Abelian groups) by associating with the Abelian group A the Abelian group GA = Afr. Then the projection of A onto Afr yields a natural transformation from the identity functor to the torsion-free functor g.
• With every group may be associated its commutator subgroup. It is then not difficult to see that the embedding of the commutator subgroup in the group is a natural transformation from the commutator subgroup functor to the identity functor. On the other hand, the centre of every group may be associated with the group. Here, however, there is not a functor because a homomorphism from one group to another does not necessarily map the centre of the first group to the centre of the second. On the other hand, if the category of groups and surjective homomorphisms (a surjective homomorphism is one in which the image coincides with the codomain) is considered, then in this category the centre is a functor. It is a functor, however, from the category of groups and surjective homomorphisms to the category of groups and all homomorphisms, because a surjective homomorphism does not necessarily map the centre surjectively. Then the embedding of the centre of a group in the group may be regarded as a natural transformation from the centre functor to the inclusion functor, both of which are functors from the category of groups and surjective homomorphisms to the category of groups and homomorphisms.
• In algebraic topology, the singular homology groups and the homotopy groups of a pointed topological space (X, x) are considered. A Hurewicz homomorphism (see 354) exists, from the homotopy groups to the homology groups. Then pn and hn, n ≥ 2, are functors from the category of pointed spaces and pointed continuous functions to the category of Abelian groups, and the Hurewicz homomorphism is a natural transformation of functors.

## The Yoneda lemma

Let ${\mathcal {C}}$ be a locally small category, let $X$ be an object in ${\mathcal {C}}$ , let $K:{\mathcal {C}}\to \mathbf {Set}$ , let $h^{X}$ denote the covariant Hom functor, and let ${\text{Nat}}(F,G)$ denote the natural transformations from $F$ to $G$ . Then ${\text{Nat}}(h^{X},K)\cong KX$ . In addition, if $K$ is another Hom functor $h^{W}$ , then ${\text{Nat}}(h^{X},h^{W})\cong {\text{Hom}}_{\mathcal {C}}(W,X)$ .