Fiveable

🔢Category Theory Unit 13 Review

QR code for Category Theory practice questions

13.2 The Yoneda lemma and its consequences

13.2 The Yoneda lemma and its consequences

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

The Yoneda Lemma is a fundamental result in category theory that establishes a deep connection between objects and functors. It shows how we can understand an object by looking at all the morphisms going into it, providing a powerful tool for analyzing categorical structures.

This lemma has far-reaching consequences, from proving uniqueness of representing objects to enabling the Yoneda embedding. It's a cornerstone for understanding natural transformations and representable functors, making it essential for grasping advanced concepts in category theory.

The Yoneda Lemma

Yoneda lemma statement and proof

  • Establishes an isomorphism between the set of natural transformations from a representable functor to any other functor and the set of elements of that functor applied to the representing object
    • For a locally small category CC, a functor F:CSetF: C \to Set, and an object AA in CC, there is an isomorphism:
      • Nat(HomC(A,),F)F(A)Nat(Hom_C(A, -), F) \cong F(A)
    • Isomorphism is natural in both AA and FF (functorial in AA and FF)
  • Proof:
    1. Define the isomorphism Φ:Nat(HomC(A,),F)F(A)\Phi: Nat(Hom_C(A, -), F) \to F(A):
      • For a natural transformation α:HomC(A,)F\alpha: Hom_C(A, -) \to F, let Φ(α)=αA(idA)\Phi(\alpha) = \alpha_A(id_A)
    2. Define the inverse Ψ:F(A)Nat(HomC(A,),F)\Psi: F(A) \to Nat(Hom_C(A, -), F):
      • For an element xF(A)x \in F(A), define a natural transformation Ψ(x):HomC(A,)F\Psi(x): Hom_C(A, -) \to F by:
        • For each object BB in CC and morphism f:ABf: A \to B, let (Ψ(x))B(f)=F(f)(x)(\Psi(x))_B(f) = F(f)(x)
    3. Prove that Φ\Phi and Ψ\Psi are inverses:
      • Φ(Ψ(x))=x\Phi(\Psi(x)) = x for all xF(A)x \in F(A)
      • Ψ(Φ(α))=α\Psi(\Phi(\alpha)) = \alpha for all αNat(HomC(A,),F)\alpha \in Nat(Hom_C(A, -), F)
Yoneda lemma statement and proof, October | 2013 | Bartosz Milewski's Programming Cafe

Applications of Yoneda lemma

  • Proves uniqueness of certain natural transformations
    • If F,G:CSetF, G: C \to Set are functors and AA is an object in CC, then any natural transformation α:HomC(A,)F\alpha: Hom_C(A, -) \to F is uniquely determined by its component αA(idA)\alpha_A(id_A)
  • Proves existence of certain natural transformations
    • If F:CSetF: C \to Set is a functor and AA is an object in CC, then for any element xF(A)x \in F(A), there exists a unique natural transformation α:HomC(A,)F\alpha: Hom_C(A, -) \to F such that αA(idA)=x\alpha_A(id_A) = x
  • Used to solve problems involving natural transformations between functors (e.g. proving isomorphisms, finding inverses)
Yoneda lemma statement and proof, April | 2015 | Bartosz Milewski's Programming Cafe

Yoneda lemma vs Yoneda embedding

  • Yoneda embedding is a full and faithful functor Y:C[Cop,Set]Y: C \to [C^{op}, Set] defined by:
    • For each object AA in CC, Y(A)=HomC(,A)Y(A) = Hom_C(-, A)
    • For each morphism f:ABf: A \to B in CC, Y(f)Y(f) is the natural transformation HomC(,f):HomC(,A)HomC(,B)Hom_C(-, f): Hom_C(-, A) \to Hom_C(-, B)
  • Yoneda lemma implies the Yoneda embedding is full and faithful:
    • For any objects A,BA, B in CC, the Yoneda lemma gives an isomorphism:
      • Hom[Cop,Set](HomC(,A),HomC(,B))HomC(A,B)Hom_{[C^{op}, Set]}(Hom_C(-, A), Hom_C(-, B)) \cong Hom_C(A, B)
    • This isomorphism shows that the Yoneda embedding reflects and preserves morphisms (fully faithful)

Consequences of Yoneda Lemma

Consequences of Yoneda lemma

  • Implies uniqueness of representing objects up to unique isomorphism
    • If F:CSetF: C \to Set is a representable functor, then any two representing objects for FF are uniquely isomorphic
      • Suppose AA and BB are objects in CC such that FHomC(A,)F \cong Hom_C(A, -) and FHomC(B,)F \cong Hom_C(B, -)
      • The Yoneda lemma gives isomorphisms:
        • HomC(A,B)Nat(HomC(A,),HomC(B,))Nat(F,F)Hom_C(A, B) \cong Nat(Hom_C(A, -), Hom_C(B, -)) \cong Nat(F, F)
      • The identity natural transformation idFid_F corresponds to a unique isomorphism ABA \to B
  • Used to prove the co-Yoneda lemma for contravariant representable functors
    • Co-Yoneda lemma: for a locally small category CC, a functor F:CopSetF: C^{op} \to Set, and an object AA in CC, there is an isomorphism:
      • Nat(F,HomC(,A))F(A)Nat(F, Hom_C(-, A)) \cong F(A)
    • Co-Yoneda lemma derived from Yoneda lemma by considering the opposite category CopC^{op} (dual statement)