Whenever one comes across a mathematical object, such as a group, topological space etc, it is important to look at how it interacts with other similar objects. The same goes for categories with functors being how they interact.
Given two categories , a (covariant) functor from to assigns to each object an object and to each -morphism , a -morphism . The assignements must respect composition and identities, so
- , for -maps ,
- , for all .
We write functors as . This then leads to the category whose objects are categories and whose morphisms are functors. We say that two categories are isomorphic if they are isomorphic in . Given a category , we can form its opposite category , whose objects are the same as those in , with -morphisms in one to one correspondence with -morphisms . This means we can think of as being with itβs morphisms turned around. It is clear from the definition of a functor that the obvious correspondence between a category and its opposite is not a functor. However, we can define a new type of functor that makes this possible.
A contravariant functor from to is a (covariant) functor .
The key property of a contravariant functor is that it reverses composition. If from to is a contravariant functor, then for -morphisms , we have .
A question one may ask is whether or not a category is isomorphic to its opposite. In general this is false; however, to newcomers this isnβt always obvious why. A typical false proof goes along the following lines:
- For any category , there are canonical contravariant functors and .
- Clearly and .
- .
The reason this doesnβt hold is because the functors defined are contravariant, not covariant. To show such an isomorphism exists, one would need to construct a covariant functor , so in particular the composition rule in Definition 1 must hold. Clearly for an arbitrary category, the canonical (contravariant) functor breaks this rule. A counter-example is to have a category with a terminal object and but no initial object. Its opposite has an initial object but no terminal, hence the two arenβt isomorphic.
Take the following two categories and , where .
Suppose we have a covariant functor from that fixes the objects. The issue is that there are no arrows in that we can map or to. Since such a functor doesnβt exist, and cannot be isomorphic. For such a functor to exist, it must be contravariant.