The Yoneda Lemma

• Given a category A, and object A ∈ Ob(A), we get the representable functor Hom(A, −) : A → Set by
defining Hom(A, −)(B) = HomA (A, B) and, for each f : B → C in A, Hom(A, −)(f ) : HomA (A, B) →
HomA (A, C) (which we will write as Hom(A, f )) by Hom(A, f )(g) = f ◦ g.
• Given a category A, and morphism f : A → B, we get a natural transformation Hom(f , −) : Hom(B, −) ⇒
Hom(A, −) by defining, for each C ∈ Ob(A), Hom(f , −)C : Hom(B, C) → Hom(A, C) (which we will
write as Hom(f , C)) by Hom(f , C)(g) = g ◦ f .
• Given categories A, B, and functors F, G : A → B, we define Nat(F, G) = {α : F ⇒ G}, the collection of
all natural transformations from F to G.
Yoneda Lemma. Given a category A, an object A ∈ Ob(A), and a functor F : A → Set, there exists a
bijection YF,A : Nat(Hom(A, −), F ) → F A.
Proof. How should we define YF,A ? Given a natural transformation α = {αB : HomA (A, B) → F B}B∈A
in Nat(Hom(A, −), F ), we would like to determine an element of F A to be YF,A (α). But the only aspect
of α which has anything to do with F A is the component of α at A, that is, αA : HomA (A, A) → F A.
However, αA is only a map to F A, so we need pick something in the domain HomA (A, A) in order to get
our specific element of F A. But A is an arbitrary category - the only thing we know about HomA (A, A) is
the fact that there is an identity idA ∈ HomA (A, A) for every A ∈ Ob(A). Thus, the only possible choice
is YF,A (α) = αA (idA ) ∈ F A.
Now we need to find an inverse map ZF,A : F A → Nat(Hom(A, −), F ). That is, given an x in the set F A,
we would like to determine a natural transformation α : Hom(A, −) ⇒ F - that is, a collection of maps
{αB : HomA (A, B) → F B}B∈A indexed by the objects of A - to be ZF,A (x). Thus, given our x ∈ F A,
we need to determine for each B ∈ A an αB : HomA (A, B) → F B, sending each f ∈ HomA (A, B) to
an element of the set F B. But f : A → B has nothing to do with either x ∈ F A or the set F B - the
only other data we have relating to it is F f ∈ HomSet (F A, F B), the image of f under the functor F .
So we have our x ∈ F A, and F f ∈ HomSet (F A, F B), and we want to pick an element of F B - our only
option is to choose F f (x). Thus, the only possible choice for ZF,A (x) = {αB : HomA (A, B) → F B}B∈A
was to have αB : HomA (A, B) → F B defined by αB (f ) = F f (x). To verify that this definition of
ZF,A in fact gives a natural transformation, we need to check that for any g : B → C in A, we have
F g ◦ ZF,A (a)B = ZF,A (a)C ◦ Hom(A, g); but this is equivalent to having, for each f ∈ HomA (A, B),
F g(F f (a)) = F (g ◦ f )(a), which is true because F is a functor.
These maps are inverse to each other - given a ∈ F A, we have
YF,A (ZF,A (a)) = ZF,A (a)A (1A ) = F (1A )(a) = idF A (a) = a,
and given an α ∈ Nat(Hom(A, −), F ), we have for each B ∈ A that
ZF,A (YF,A (α))B (f ) = ZF,A (αA (idA ))B (f ) = F f (αA (idA )) = αB (Hom(A, f )(idA )) = αB (f ◦ idA ) = αB (f ),
so that ZF,A (YF,A (α)) = α. Thus, we have shown that there is a bijection between Nat(Hom(A, −), F )
and F A. One can also easily check that this bijection is natural in both A and F .