Functors are the backbone of category theory, mapping objects and morphisms between categories while preserving structure. They come in two flavors: covariant, which keep the direction of morphisms, and contravariant, which flip them.
Examples of functors include the identity functor, power set functor, and forgetful functor. Functors preserve composition and identity morphisms, ensuring the structure of the source category is maintained in the target category.
Functors
Functors as structure-preserving maps
- Functors map objects to objects and morphisms to morphisms between categories while preserving the categorical structure
- For categories and , a functor consists of:
- Object function assigns each object in to an object in
- Morphism function assigns each morphism in to a morphism in
- Functors preserve the composition of morphisms
- For morphisms and in ,
- Functors preserve the identity morphisms
- For any object in ,

Covariant vs contravariant functors
- Covariant functors preserve the direction of morphisms
- For in , covariant functor maps it to in
- Contravariant functors reverse the direction of morphisms
- For in , contravariant functor maps it to in
- Contravariant functors still preserve composition, but in the opposite order
- For and in ,

Examples of category functors
- Identity functor maps each object and morphism in to itself
- Power set functor maps each set to its power set and each function to its induced function between power sets
- Dual functor maps each object in to itself and each morphism to its opposite
- Forgetful functor maps each group to its underlying set and each group homomorphism to its underlying function
Preservation of morphism properties
- Given functor and morphisms , in :
- , demonstrating functors preserve composition
- For any object in :
- , showing functors preserve identity morphisms
- These properties ensure the structure of the source category is maintained in the target category under the functor mapping