If and are categories, then a [(covariant) functor] is a map which takes an object to an object and a morphism to morphism , such that
preserves [composition]: for every pair of morphisms and ;
preserves [unit morphisms]: for every object .
The composite of two functors and is a functor . There is also an [identity functor] for every category . Hence the categories form a category. A functor is an [isomorphism] if it is invertible in this category.
A [forgetful functor] is a functor which forgets some aspects of the objects of a certain category. For example, the functor which forgets the group structure of a group, remembering only its underlying set, is a forgetful functor. Another example is the functor from the category of rings to the category of monoids which forgets the additive structure of the ring but remember its multiplicative structure.
Let us denote by the category of graded abelian groups and graded homomorphisms. The homology of a topological space with coefficients in an abelian group is a graded abelian group denoted . A continuous map of topological spaces induces a graded homomorphism
Moreover, if is another continuous map, then we have We can thus defines a functor
by putting for every continuous map .
The free group functor takes a set to the free group generated by , and it takes a map to the group homomorphism which extends .
If is a category, then for every object there is a functor
which takes an object to the set and takes a morphism to the map
defined by putting for every morphism .
Functors with special properties are important in applications. A functor is said to be
[full] if the map induced by is surjective for every pair of objects ;
[faithful] if the map is injective for every pair of objects ;
[fully faithful] if the map is bijective for every pair of objects ;
[essentially surjective] if for every object there exists an object together with an isomorphism ;
an [equivalence] if it is fully faithful and essentially surjective;
A functor is an isomorphism iff it is fully faithful and the map induced by is bijective.
Perhaps less ubiquitous are:
[injective-on-objects] (resp. [surjective-on-objects], resp. [bijective-on-objects]) functors, those whose object map is injective (resp. surjective, resp. bijective);
[embeddings], those functors which are injective-on-objects and faithful;
[inclusions], those functors whose object and morphism maps are both inclusions (as opposed to mere injections); their domain is then called a [subcategory] of their codomain.
When an inclusion is full, its domain is called a [full subcategory] of its codomain.
If and are categories, then a [contravariant functor] is a map sending each object to an object and each morphism to morphism , such that
preserves [composition]: for every pair of morphisms and ;
preserves [unit morphisms]: for every object .
The composite of two functors and is a functor which is
[covariant] if and are covariant;
[contravariant] if is contravariant and are covariant;
[contravariant] if is covariant and is contravariant;
[covariant] if and are contravariant.
A covariant functor induces a covariant functor between the opposite categories . By definition, the functor takes an object to the object and takes a morphism to the morphism . We shall say that the functor is the opposite of the functor . Similarly, a contravariant functor induces a contravariant functor between the opposite categories .
For any category , the map which takes an object to the opposite object and takes a morphism to the opposite morphism is a contravariant functor . We shall use the same notation for the inverse functor . If is a contravariant functor, then the composite is a covariant functor. The map induces a bijection between the contravariant functors and the covariant functors . Similarly, the map induces a bijection between the contravariant functors and the covariant functors .
Let be the category of matrices with coefficiants in a commutative ring . The transpose of a matrix is a matrix . If is another matrix, then we have Thus, the transposition operation defines a contravariant functor . Notice that the composite is the identity functor.
If is a groupoid, then every arrow in has an inverse . This defines a contravariant functor such that for every object . Notice that the composite is the identity functor.
If is a category, then for every object there is a contravariant functor
which takes an object to the set and takes a morphism to the map
defined by putting for every .
A simplicial set is defined to be a contravariant functor .