The Opposite Category
One of the most interesting general facts about categories is how ubiquitous the notion of duality is. Pretty much everything has a “mirror image”, and the mirror is the opposite category.
Given a category , with objects
and morphisms
, we can construct the “opposite category”
simply enough. In fact, it has the exact same objects and morphisms as
does. The difference comes in how they relate to each other.
Remember that we had two functions, and
assigning the “source” and “target” objects to any arrow. To get the opposite category we just swap them. Given a morphism, its source in
is its target in
, and vice versa. Of course, now we have to swap the order of composition. If we have
and
in
, then we get
and
in
. In
the composition
is defined, but in
the composition
is defined.
Most definitions we give will automatically come with a “dual” definition, which we get by reversing all the arrows like this. For example, monos and epis are dual notions, as are subobjects and quotient objects. Just write down one definition in terms of morphisms, reverse all the morphisms (and the order of composition), and you get the other.
Theorems work this way too. If you dualize the hypotheses and the conclusions, then you can dualize each step of the proof to prove the dual theorem. I can prove that any injection is monic, so it follows immediately by duality that any surjection is epic. Many texts actually completely omit even the statements of dual notions and theorems once they define the opposite category, but I’ll try to be explicit about the duals (though of course I won’t need to give the proofs).
Another place duality comes up is in defining “contravariant” functors. This is just a functor . It sends each object of
to an object of
, and sends a morphism
in
to a morphism
in
. See how the direction of the image morphism flipped? Early on, contravariant and regular (”covariant”) functors were treated somewhat separately, but really they’re just the same thing once you take the opposite category into account. Sometimes, though, it’s easier to think in terms of contravariant functors rather than mentally flipping all the arrows.
I’ll close with an example of a contravariant functor we’ve seen before. Consider a ring with unit and a left module
over
. That is,
is an object in the category
. We can construct the dual module
, which is now an object in the category
of right
-modules. I say that this is a contravariant functor. We’ve specified how the dual module construction behaves on objects, but we need to see how it behaves on morphisms. This is what makes it functorial.
So let’s say we have two left -modules
and
, and an
-module homomorphism
. Since we want this to be a contravariant functor we need to find a morphism
. But notice that
, and similarly for
. Then we have the composition of
-module homomorphisms
. If
is a linear functional on
, then we get
as a linear functional on
. We can define
.
Now, is this construction functorial? We have to check that it preserves identities and compositions. For identities it’s simple: , so every linear functional on
gets sent back to itself. For compositions we have to be careful. The order has to switch around because this is a contravariant functor. We take
and
and check
, as it should.
[...] I should have mentioned this before, but usually dual notions are marked by the premix “co-”. As an example, we have [...]