representable functors and the Yoneda embedding
The Yoneda Lemma
You should know: natural transformations, functors, categories and morphisms, limits and colimits
Overview
The Yoneda lemma is arguably the single most important result in category theory. It states that a functor \(F: \mathcal{C} \to \text{Set}\) is completely determined by its behavior on a single representable functor, and that natural transformations from \(\text{Hom}(A, -)\) to \(F\) are in natural bijection with elements of \(F(A)\). As a corollary, the Yoneda embedding \(\mathcal{C} \hookrightarrow [\mathcal{C}^{\text{op}}, \text{Set}]\) is fully faithful, meaning every category embeds into a presheaf category — one of the most powerful tools in modern mathematics.
Intuition
The Yoneda lemma says: 'An object \(A\) in a category is completely determined by how other objects map into it.' This is the categorical version of the principle that you can know everything about a mathematical object by studying its relationships. The Yoneda embedding is like a 'hall of mirrors': it places \(A\) inside the presheaf category where it is represented by the functor \(\text{Hom}(-, A)\), and the Yoneda lemma says this representation is faithful — distinct objects give distinct representable functors.
Formal Definition
Let \(\mathcal{C}\) be a locally small category, \(F: \mathcal{C} \to \text{Set}\) a functor, and \(A \in \mathcal{C}\). The Yoneda lemma provides a natural bijection:
The Yoneda bijection: natural transformations from the representable functor Hom(A,−) to F correspond to elements of F(A)
The bijection sends a natural transformation η to η_A(id_A)
An element x ∈ F(A) gives the natural transformation α^x_B(f) = F(f)(x)
The Yoneda embedding: a fully faithful functor from C into its presheaf category
Notation
| Notation | Meaning |
|---|---|
| Set of natural transformations from functor F to functor G | |
| Covariant representable functor at A | |
| Contravariant representable functor at A | |
| Image of A under the Yoneda embedding | |
| Presheaf category on C |
Proofs
- (Evaluating η at the object A and applying to the identity gives an element of F(A).)
- (Given x ∈ F(A), for each B define (Ψ(x))_B: Hom(A,B) → F(B) by chasing x along F(f).)
- (Functoriality of F gives F(g)∘F(f) = F(g∘f), which is exactly the naturality square.)
- (F preserves identities.)
- (The last step uses naturality of η: η_B ∘ Hom(A,f) = F(f) ∘ η_A, applied to id_A.)
- (The bijection is natural in both arguments by the way Φ and Ψ are defined.)
Theorems
Worked Examples
By the Yoneda lemma with \(F = U\) (the forgetful functor) and \(A = \mathbb{Z}\):
So natural transformations from the representable functor \(\text{Hom}(\mathbb{Z},-)\) to \(U\) correspond to elements of \(\mathbb{Z}\).
Concretely: an element \(n \in \mathbb{Z}\) gives the natural transformation \(\alpha^n\) where \(\alpha^n_A: \text{Hom}(\mathbb{Z}, A) \to A\) sends a group hom \(\varphi: \mathbb{Z} \to A\) to \(\varphi(n) \in A\) (evaluation at \(n\)).
This makes sense: \(\text{Hom}(\mathbb{Z}, A) \cong A\) via \(\varphi \mapsto \varphi(1)\), and the natural transformation for \(n\) sends \(\varphi\) to its \(n\)-th 'multiple' \(\varphi(n) = n \cdot \varphi(1)\).
Answer: By Yoneda, \(\text{Nat}(\text{Hom}(\mathbb{Z},-), U) \cong \mathbb{Z}\). The natural transformation corresponding to \(n \in \mathbb{Z}\) sends each group hom \(\varphi: \mathbb{Z} \to A\) to \(\varphi(n)\).
Practice Problems
Use the contravariant Yoneda lemma to show: for any presheaf \(F: \mathcal{C}^{\text{op}} \to \text{Set}\) and object \(A\), there is a natural bijection \(\text{Nat}(\text{Hom}(-,A), F) \cong F(A)\). State which element of \(F(A)\) a natural transformation \(\eta\) corresponds to.
Show that the Yoneda embedding \(\mathbf{y}: \mathcal{C} \to [\mathcal{C}^{\text{op}}, \text{Set}]\) defined by \(A \mapsto \text{Hom}(-,A)\) is a functor. What does it do to morphisms?
Prove: if \(F: \mathcal{C} \to \text{Set}\) is representable, say \(F \cong \text{Hom}(A,-)\), then the representing object \(A\) is unique up to unique isomorphism.
Common Mistakes
The Yoneda lemma only applies to Set-valued functors.
The classical Yoneda lemma is stated for \(F: \mathcal{C} \to \text{Set}\). There are enriched versions for other target categories (Ab-enriched, etc.), but in the basic setting the target must be Set.
The bijection \(\text{Nat}(\text{Hom}(A,-), F) \cong F(A)\) depends on some arbitrary choice.
The bijection is completely canonical: \(\eta \mapsto \eta_A(\text{id}_A)\). No choices are involved. This is precisely what 'natural' means in the Yoneda sense.
The Yoneda embedding \(\mathbf{y}(A) = \text{Hom}(-,A)\) goes from \(\mathcal{C}\) to functors on \(\mathcal{C}\), so it is covariant.
Yes, \(\mathbf{y}: \mathcal{C} \to [\mathcal{C}^{\text{op}}, \text{Set}]\) is covariant as a functor. But each \(\mathbf{y}(A) = \text{Hom}(-,A)\) is a contravariant functor on \(\mathcal{C}\), i.e., a covariant functor on \(\mathcal{C}^{\text{op}}\). The covariant Yoneda embedding uses \(\text{Hom}(A,-)\) and targets \([\mathcal{C}, \text{Set}]\).
Quiz
Historical Background
The lemma is named after Nobuo Yoneda, who communicated it to Saunders Mac Lane during a chance meeting at Paris Gare du Nord in 1954. Yoneda never published a proof, but Mac Lane recorded and popularized the result. It has since become the foundation of modern algebraic geometry (via Grothendieck's functor-of-points approach), algebraic topology (representability theorems), and theoretical computer science (denotational semantics).
- 1954
Yoneda communicates the lemma to Mac Lane at Paris Gare du Nord
Nobuo Yoneda, Saunders Mac Lane
- 1960s
Grothendieck uses the Yoneda perspective to recast algebraic geometry via functor of points
Alexander Grothendieck
- 1971
Mac Lane publishes the lemma in 'Categories for the Working Mathematician'
Summary
- The Yoneda lemma: \(\text{Nat}(\text{Hom}(A,-), F) \cong F(A)\), naturally in \(A \in \mathcal{C}\) and \(F: \mathcal{C} \to \text{Set}\); the bijection is \(\eta \mapsto \eta_A(\text{id}_A)\).
- The Yoneda embedding \(\mathbf{y}: \mathcal{C} \hookrightarrow [\mathcal{C}^{\text{op}}, \text{Set}]\), \(A \mapsto \text{Hom}(-,A)\), is fully faithful — every category embeds into a presheaf category.
- Corollary: An object is determined up to unique isomorphism by its representable functor; this is why 'universal properties' uniquely determine objects.
- The universal element \(u \in F(A)\) corresponding to the identity natural transformation is the key ingredient; every other element of \(F(B)\) is obtained by acting on \(u\) with a unique morphism \(A \to B\).
- Applications are ubiquitous: Grothendieck's functor-of-points in algebraic geometry, Brown representability in topology, and adjoint functor theorems all rest on the Yoneda lemma.
References
- BookMac Lane, S. Categories for the Working Mathematician, 2nd ed. Springer, 1998. Ch. III.2.
- BookRiehl, E. Category Theory in Context. Dover, 2016. Ch. 2.
- BookLeinster, T. Basic Category Theory. Cambridge University Press, 2014. Ch. 4.
- WebsiteWikipedia — Yoneda lemma
- WebsitenLab — Yoneda lemma
Mathematics