Functor
A map between categories that preserves identities and composition.
Let be categories.
A (covariant) functor consists of:
- an assignment on objects: for each , an object ;
- an assignment on morphisms: for each morphism in , a morphism in ;
such that the following axioms hold:
- (identity preservation) for every object , where is the identity morphism;
- (composition preservation) for every composable pair in , where denotes composition in the relevant category.
Variants
A contravariant functor is the same thing as a covariant functor , where is the opposite category. Functors can be compared by natural transformations.
Examples
- Forgetful functor : Send a group to its underlying set , and a group homomorphism to the underlying function . This preserves identity maps and composition, hence is a functor.
- Free abelian group functor : Send a set to the free abelian group generated by , and a function to the induced homomorphism . This is a functor (and is left adjoint to the forgetful functor ; see adjoint functors).
- Representable hom-functor: Fix an object . The assignment defines a functor , called a representable functor (covariant in ). Dually, is a functor .