Category theory — functors & natural transformations
Functors are structure-preserving maps between categories; natural transformations are structure-preserving maps between functors. One-line: a functor sends objects to objects and arrows to arrows compatibly with composition and identities, while a natural transformation provides a coherent family of arrows relating two parallel functors. Key result: functors and natural transformations between two categories themselves form a category (the functor category), and naturality is exactly the condition that makes "morphisms of morphisms" compose correctly. Applies throughout algebra, topology, logic, and theoretical computer science. Introduced by Eilenberg and Mac Lane (1942–1945).
Functoriality turns the slogan "compatible with composition" into the only data you ever need to carry structure between mathematical worlds. Naturality then makes precise the elusive intuition that an isomorphism or transformation is "canonical" — independent of arbitrary choices — by demanding that it commute uniformly with all morphisms at once. The naturality square is the single diagram from which almost everything in higher category theory grows.
Formal Statement
Let and be categories. A (covariant) functor consists of:
- an object function , ;
- for each pair of objects , a morphism function , written ;
satisfying the two functoriality axioms:
Derivation hint: identities are uniquely characterized by and ; applying to these and using forces to be the identity on — so is the minimal axiom making identities track.
Derivation hint: read both sides as morphisms ; the axiom states that the object function on hom-sets is a homomorphism of the composition operation, the categorical analogue of . Here are objects of and all symbols denote composition in the respective category. A contravariant functor reverses arrows: and ; equivalently, it is a covariant functor .
Let be functors. A natural transformation assigns to each object a morphism in , called the component at , such that for every morphism in the naturality square commutes:
Derivation hint: trace an element conceptually around the square versus ; both routes must land at the same morphism , which is precisely the equality . If every component is an isomorphism in , then is a natural isomorphism, written , and the componentwise inverses assemble into a natural transformation .
For categories (with small), the functors as objects and natural transformations as morphisms form a category, the functor category . Composition is vertical composition of natural transformations: for and ,
Derivation hint: pasting two naturality squares along their shared middle column yields a commuting rectangle whose outer boundary is exactly the naturality square for ; the component formula is read off the bottom row. The identity morphism on is the natural transformation with components .
Given functors and natural transformations
there is a horizontal composite with components
Derivation hint: the two expressions are equal precisely because the naturality square of applied to the morphism commutes; the equality is naturality of instantiated at . Horizontal and vertical composition satisfy the interchange law:
Derivation hint: both sides are computed componentwise; expand each using and , then apply functoriality to and naturality to rearrange the resulting four-term composite — every reordering is licensed by one square commuting. making the totality of categories, functors, and natural transformations a 2-category .
Why It Holds / Derivation
We verify the functor category axioms. 1. Composite is natural. Given and , and a morphism , we must show . Using , the left side is . 2. By naturality of (equation for ), . Substituting gives . 3. By naturality of , . Substituting gives , as required. The two naturality squares pasted side by side close into one rectangle. 4. Identity laws. , so acts as a two-sided unit. 5. Associativity. , inheriting associativity from componentwise.
∎:::proof[The two formulas in agree] Apply the naturality square of the natural transformation to the specific -morphism . Naturality gives
This is exactly the claimed equality of the two component expressions; the common value is . Functoriality of and ensures these are morphisms .
Eilenberg (a Polish-American topologist) and Mac Lane (an American algebraist) jointly created category theory in a 1945 paper, General Theory of Natural Equivalences. Their motivation was strikingly concrete: in algebraic topology and homological algebra they kept encountering isomorphisms that were "natural" versus those that depended on arbitrary choices (e.g. a finite-dimensional vector space is isomorphic to its dual, but naturally isomorphic only to its double dual). To make "natural" rigorous they needed a notion of map between functors, which required defining functors, which in turn required defining categories. Eilenberg's topological instincts and Mac Lane's algebraic precision combined to yield a framework that Mac Lane later codified in the standard graduate text Categories for the Working Mathematician (1971). The pair also founded much of homological algebra (Eilenberg–MacLane spaces, the Eilenberg–Steenrod axioms).
Building Intuition
Think of a category as a "world" of objects and the legal ways to transform them. A functor is a translation of one world into another that respects the grammar of composition: if you can do then in the source, the translation of " after " equals "translation of after translation of ." Crucially a functor never invents structure — it can only carry along what composition gives. A natural transformation is a dialect adjustment between two translations and of the same world. At each object it offers a bridge . Naturality says these bridges are not arbitrary: whichever object you transform first — apply then cross the bridge, or cross the bridge then apply — you reach the same place. This uniformity is the mathematical content of the word "natural" (or "canonical"): no arbitrary choices were smuggled in, because the bridge commutes with everything simultaneously. A useful mental image: a functor is a movie of one space deforming into another; a natural transformation is a homotopy between two such movies — and indeed under the nerve construction this analogy becomes literally true.
Worked Examples
Given. Let be the category of groups, the category of abelian groups. Consider the functor and the functor , where is abelianization and is inclusion. We compare with via the quotient.
Steps. 1. Define the component at a group as the canonical projection . (Direction: we take .) 2. Take any homomorphism . We must verify : . 3. The induced map sends ; this is well defined because carries commutators to commutators. 4. Trace : clockwise then project gives ; project then induced map gives . They agree.
Concrete numbers. Take (order ), , . Then , so . The transposition maps to the nontrivial element of ; the -cycle maps to .
Given. Let be vector spaces over a field . Define , the double-dual functor (covariant), and compare with .
Steps. 1. Component at : the evaluation map , for . 2. Naturality: for linear we need . Compute on , evaluated at :
3. Both sides equal , so holds — is natural.
Concrete numbers. Let , . Then , and is an isomorphism; e.g. , the functional "extract first coordinate of a dual vector." For (countable direct sum), , so is injective but not surjective.
Common Misconceptions
A functor is not "a map sending objects to objects." The morphism data is part of the definition and is not optional or recoverable. Two functors can agree on all objects yet differ on morphisms (e.g. the identity vs. an inner-automorphism-twisted version on a one-object groupoid). Always specify both the object and arrow assignments.
"Natural" is a technical term, not an aesthetic one. A construction being "obvious" or "canonical-looking" does not make it natural; you must exhibit the functors and verify the square . Conversely a transformation can be defined by choices yet still turn out natural if the choices cohere.
Naturality is a property of the whole family, not of single components. Each being an isomorphism is necessary but not sufficient for a natural isomorphism — the squares must commute for all . (In fact: if is natural and each component is iso, the inverses are automatically natural; but a family of componentwise isos that does not satisfy is simply not a natural transformation at all.)
For finite-dimensional , choosing a basis gives an isomorphism (send basis vectors to dual basis). Every is an isomorphism. Yet there is no natural isomorphism on , because is contravariant while is covariant — there is no naturality square to even write, and forcing one fails. Concretely, take and scalar multiplication . Naturality would demand ; but is multiplication by on while the required direction reverses, giving after careful bookkeeping — impossible for . This is exactly the phenomenon Eilenberg–Mac Lane formalized: is unnatural, is natural.
Connections
Functors and natural transformations are the backbone connecting nearly every categorical concept. The <span class="wiki-link-missing">Yoneda Lemma</span> is a statement about natural transformations out of representable functors , showing — naturality is its entire engine. <span class="wiki-link-missing">Adjoint Functors</span> are pairs specified by a natural isomorphism ; the unit and counit are natural transformations and . A <span class="wiki-link-missing">Monad</span> is an endofunctor equipped with natural transformations and satisfying coherence. <span class="wiki-link-missing">Limits and Colimits</span> are objects representing the functor of cones, where a cone is itself a natural transformation from a constant functor. The functor category is the <span class="wiki-link-missing">Presheaf Category</span>, the central object of topos theory and the natural habitat of the Yoneda embedding. The 2-categorical structure from launches <span class="wiki-link-missing">Higher Category Theory</span>.
Real-World Applications
Historical Development
Subtleties & Limits
Size and foundations. The functor category is well-behaved when is small; for large , may be a proper class, and one must invoke Grothendieck universes or a careful set/class distinction. The "category of all categories" is not naively a category for this reason.
Strictness vs. coherence. Equation demands functoriality on the nose. In higher category theory one weakens this to functoriality up to coherent natural isomorphism (pseudofunctors, lax functors), and the management of these coherence isomorphisms (Mac Lane's coherence theorem, and its open higher analogues) becomes deeply nontrivial. Whether every weak -functor can be strictified is delicate and false in general beyond low dimensions.
Naturality vs. dinaturality and parametricity. For functors of mixed variance , ordinary naturality fails and one needs dinatural transformations, whose composites do not always compose — a known pathology with no fully satisfactory general fix. Relating syntactic parametricity (Reynolds) to genuine (di)naturality in all type-theoretic models remains an active research interface between logic and category theory.
See Also
Categories and Morphisms · Yoneda Lemma · Adjoint Functors · Limits and Colimits · Monad · Presheaf Category · Higher Category Theory · Representable Functors · 2-Categories and Bicategories