Constructions that turn objects of one kind into objects of another kind, and do so compatibly with morphisms, are formalized by functors.
8.2.1 Functors
Definition 8.2.1 (Functor). Let and be categories. A (covariant) functor is an assignment
to each object , of an object , and
to each morphism , of a morphism ,
such that
for every object , and
for all and .
Example 8.2.2 (Identity and forgetful functors).
Every category has an identity functor, with and .
The forgetful functors,,, … send a group, a topological space, a vector space to its underlying set, and a homomorphism, continuous map, or linear map to the same map regarded as a function. Both axioms hold trivially. Similarly, there are forgetful functors (regard an abelian group as a group) and (keep the additive group of a ring and forget its multiplication).
Example 8.2.3 (The functor ). Fix a vector space over . For a vector space , set . For a linear map , let This map is linear, since . The axioms hold: , and for , So is a functor .
Example 8.2.4 (Complexification). Complexification (Section 7.10) is a functor . On objects it sends to . On morphisms it sends an -linear map to the -linear map ,, of Proposition 7.10.5. The functor axioms are part (c) of that proposition: clearly , and for ,
Some constructions reverse the direction of morphisms.
Definition 8.2.5 (Contravariant functor). A contravariant functor assigns to each object of an object of , and to each morphism a morphism in the opposite direction, such that
Example 8.2.6 (Duality). The dual space construction of Chapter 6 is a contravariant functor : it sends to and a linear map to its dual map , (Definition 6.2.9). Indeed , and for and , More generally, for a fixed vector space , the same computation shows that ,, is a contravariant functor; duality is the case .
Functors can be composed: if and are functors, then , defined by and , satisfies both axioms. If and are both contravariant, the two reversals cancel and is covariant: for and , If exactly one of them is contravariant, is contravariant.
Example 8.2.7 (The double dual). Applying duality twice gives a covariant functor sending to and to . Explicitly, for .
Proposition 8.2.8 (Functors preserve isomorphisms). Let be a functor (covariant or contravariant). If is an isomorphism in , then is an isomorphism in , with inverse . In particular, implies .
Proof. In the covariant case, , and similarly . In the contravariant case, and .∎
Note. Proposition 8.2.8 is a source of invariants: to show that two objects are not isomorphic, it suffices to find a functor that sends them to non-isomorphic objects. The forgetful functor to already shows, for instance, that groups of different orders are not isomorphic.
8.2.2 Natural Transformations
There is one more layer: morphisms between functors.
Definition 8.2.9 (Natural transformation). Let be two (covariant) functors. A natural transformation from to , written , is the data, for every object of , of a morphism , such that for all objects and every , that is, the square
commutes in . The morphism is the component of at . If every component is an isomorphism, is a natural isomorphism. Natural transformations between two contravariant functors are defined in the same way, with the vertical arrows and reversed.
The word “natural” has been used informally throughout linear algebra for maps that are defined without choices. The definition makes this precise: a natural map must be compatible with every morphism. The motivating example is the map from a vector space to its double dual.
Theorem 8.2.10 (The double dual is natural). For each vector space over , let be the evaluation map, . Then the maps are the components of a natural transformation from the identity functor to the double dual functor. On it is a natural isomorphism.
Proof (Let be linear. We must show that the square).
commutes, i.e., that for all . Both sides are elements of , so we evaluate them on an arbitrary : So is a natural transformation. If is finite-dimensional, is an isomorphism (Theorem 6.2.19), so on every component is an isomorphism. ∎
Note. By contrast, a finite-dimensional space is also isomorphic to , but every such isomorphism we have seen depends on a choice of basis (or of extra structure, such as an inner product in Chapter 9). The definition explains why no choice-free version can exist in this sense: is contravariant while the identity functor is covariant, so a family of maps cannot even be compared with morphisms in the way the naturality square requires.
Example 8.2.11 (A natural transformation for ). Fix a linear map . For each , define Then is a natural transformation from the functor to the functor of Example 8.2.3: for and , both ways around the square give , by associativity of composition.