Fiveable

🔢Category Theory Unit 12 Review

QR code for Category Theory practice questions

12.2 Contravariant functors

12.2 Contravariant functors

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
🔢Category Theory
Unit & Topic Study Guides

Contravariant functors flip the direction of morphisms between categories, unlike their covariant counterparts. They're essential in category theory, offering unique perspectives on relationships between mathematical structures.

Understanding contravariant functors helps grasp the duality principle in mathematics. They're used in various fields, from linear algebra to set theory, providing powerful tools for analyzing and transforming mathematical objects.

Contravariant Functors

Contravariant functors and applications

  • Contravariant functors reverse the direction of morphisms in a category
    • Given categories CC and DD, a contravariant functor F:CDF: C \to D maps objects of CC to objects of DD
    • Morphisms f:ABf: A \to B in CC are mapped to morphisms F(f):F(B)F(A)F(f): F(B) \to F(A) in DD, effectively reversing the direction of the arrows
  • Contravariant functors preserve composition and identity morphisms
    • For morphisms f:ABf: A \to B and g:BCg: B \to C in CC, the composition is preserved: F(gf)=F(f)F(g)F(g \circ f) = F(f) \circ F(g)
    • For an object AA in CC, the identity morphism is preserved: F(idA)=idF(A)F(id_A) = id_{F(A)}
  • Examples of contravariant functors showcase their utility in various mathematical contexts
    • The dual vector space functor ():VectkVectk(\cdot)^*: Vect_k \to Vect_k maps a vector space VV to its dual space VV^* and a linear transformation f:VWf: V \to W to its dual f:WVf^*: W^* \to V^*
    • The powerset functor P:SetopSet\mathcal{P}: Set^{op} \to Set maps a set XX to its powerset P(X)\mathcal{P}(X) and a function f:XYf: X \to Y to the preimage map f1:P(Y)P(X)f^{-1}: \mathcal{P}(Y) \to \mathcal{P}(X)
Contravariant functors and applications, Bartosz Milewski's Programming Cafe | Category Theory, Haskell, Concurrency, C++

Covariant vs contravariant functors

  • Covariant functors preserve the direction of morphisms between categories
    • Given categories CC and DD, a covariant functor F:CDF: C \to D maps objects of CC to objects of DD
    • Morphisms f:ABf: A \to B in CC are mapped to morphisms F(f):F(A)F(B)F(f): F(A) \to F(B) in DD, preserving the direction of the arrows
  • Contravariant functors reverse the direction of morphisms between categories
    • Given categories CC and DD, a contravariant functor F:CDF: C \to D maps objects of CC to objects of DD
    • Morphisms f:ABf: A \to B in CC are mapped to morphisms F(f):F(B)F(A)F(f): F(B) \to F(A) in DD, reversing the direction of the arrows
  • Both covariant and contravariant functors preserve composition and identity morphisms, ensuring the structure of the categories is maintained
Contravariant functors and applications, Category:Differential topology - Wikimedia Commons

Composition of contravariant functors

  • The composition of two contravariant functors results in a covariant functor
  • Let F:CDF: C \to D and G:DEG: D \to E be two contravariant functors
  • The composition GF:CEG \circ F: C \to E is a covariant functor, as demonstrated by the following proof:
    1. For objects AA in CC, (GF)(A)=G(F(A))(G \circ F)(A) = G(F(A))
    2. For morphisms f:ABf: A \to B in CC:
      • F(f):F(B)F(A)F(f): F(B) \to F(A) in DD (contravariant)
      • G(F(f)):G(F(A))G(F(B))G(F(f)): G(F(A)) \to G(F(B)) in EE (contravariant)
      • (GF)(f)=G(F(f)):(GF)(A)(GF)(B)(G \circ F)(f) = G(F(f)): (G \circ F)(A) \to (G \circ F)(B) (covariant)
    3. Composition is preserved:
      • For morphisms f:ABf: A \to B and g:BCg: B \to C in CC: (GF)(gf)=G(F(gf))=G(F(f)F(g))=G(F(f))G(F(g))=(GF)(f)(GF)(g)(G \circ F)(g \circ f) = G(F(g \circ f)) = G(F(f) \circ F(g)) = G(F(f)) \circ G(F(g)) = (G \circ F)(f) \circ (G \circ F)(g)
    4. Identity morphisms are preserved:
      • For an object AA in CC, (GF)(idA)=G(F(idA))=G(idF(A))=idG(F(A))=id(GF)(A)(G \circ F)(id_A) = G(F(id_A)) = G(id_{F(A)}) = id_{G(F(A))} = id_{(G \circ F)(A)}

Opposite Categories and Contravariant Functors

Contravariant from covariant functors

  • The opposite category CopC^{op} of a category CC is defined as follows:
    • Obj(Cop)=Obj(C)Obj(C^{op}) = Obj(C), meaning the objects of CopC^{op} are the same as the objects of CC
    • For objects A,BA, B in CopC^{op}, HomCop(A,B)=HomC(B,A)Hom_{C^{op}}(A, B) = Hom_C(B, A), meaning the morphisms in CopC^{op} are the morphisms in CC with reversed direction
    • Composition in CopC^{op} is defined as gopf=fgg \circ^{op} f = f \circ g for morphisms f:BAf: B \to A and g:CBg: C \to B in CC
  • Given a covariant functor F:CDF: C \to D, we can obtain a contravariant functor Fop:CopDF^{op}: C^{op} \to D as follows:
    1. For objects AA in CopC^{op}, Fop(A)=F(A)F^{op}(A) = F(A)
    2. For morphisms f:ABf: A \to B in CopC^{op} (which correspond to morphisms f:BAf: B \to A in CC), Fop(f)=F(f)F^{op}(f) = F(f)
  • Proof that FopF^{op} is a contravariant functor:
    1. For morphisms f:ABf: A \to B and g:BCg: B \to C in CopC^{op} (which correspond to morphisms f:BAf: B \to A and g:CBg: C \to B in CC): Fop(gopf)=Fop(fg)=F(fg)=F(g)F(f)=Fop(f)Fop(g)F^{op}(g \circ^{op} f) = F^{op}(f \circ g) = F(f \circ g) = F(g) \circ F(f) = F^{op}(f) \circ F^{op}(g)
    2. For an object AA in CopC^{op}, Fop(idA)=F(idA)=idF(A)=idFop(A)F^{op}(id_A) = F(id_A) = id_{F(A)} = id_{F^{op}(A)}