Representable Functors and the Yoneda Lemma

⚡ Key Takeaways

The Yoneda Lemma states that for any locally small category C\mathcal{C}, a functor F:C→SetF:\mathcal{C}\to\mathbf{Set}, and an object AA, there is a natural bijection Nat(C(A,−),F)≅F(A)\mathrm{Nat}(\mathcal{C}(A,-),F)\cong F(A). In words: natural transformations out of a representable functor are completely determined by a single element. It applies throughout category theory, algebraic geometry, homotopy theory, and type theory. Proved/named after Nobuo Yoneda (c. 1954, via a famous discussion with Mac Lane).

💡 The Core Insight

To know an object AA, it suffices to know the set of arrows into AA from every other object, together with how those sets transform under composition. The hom-functor C(−,A)\mathcal{C}(-,A) packages exactly this data, and Yoneda says no information is lost: the functor remembers AA up to unique isomorphism. A natural transformation C(A,−)⇒F\mathcal{C}(A,-)\Rightarrow F is "as good as" a single element of F(A)F(A), because idA∈C(A,A)\mathrm{id}_A\in\mathcal{C}(A,A) is a generic point that the transformation must send somewhere, and naturality forces everything else.

Formal Statement

DefinitionHom-Functor

Let C\mathcal{C} be locally small (each C(X,Y)\mathcal{C}(X,Y) is a set). For a fixed object A∈CA\in\mathcal{C}, the covariant hom-functor hA=C(A,−):C→Seth^A=\mathcal{C}(A,-):\mathcal{C}\to\mathbf{Set} is defined on objects and morphisms by

1
hA(X)=C(A,X),hA(f)=f∘(−):C(A,X)→C(A,Y)  for f:X→Y.\quad h^A(X)=\mathcal{C}(A,X),\qquad h^A(f)=f\circ(-):\mathcal{C}(A,X)\to\mathcal{C}(A,Y)\ \text{ for } f:X\to Y.

Derivation hint: post-composition by ff sends g:A→Xg:A\to X to f∘g:A→Yf\circ g:A\to Y; functoriality hA(g∘f)=hA(g)∘hA(f)h^A(g\circ f)=h^A(g)\circ h^A(f) follows from associativity of composition. Dually, the contravariant hom-functor hA=C(−,A):Cop→Seth_A=\mathcal{C}(-,A):\mathcal{C}^{\mathrm{op}}\to\mathbf{Set} sends X↦C(X,A)X\mapsto\mathcal{C}(X,A) and f:X→Yf:X\to Y to precomposition (−)∘f:C(Y,A)→C(X,A)(-)\circ f:\mathcal{C}(Y,A)\to\mathcal{C}(X,A).

DefinitionRepresentable Functor

A functor F:C→SetF:\mathcal{C}\to\mathbf{Set} is representable if there exists an object A∈CA\in\mathcal{C} and a natural isomorphism

2
η: C(A,−) ⇒ ≅  F.\quad \eta:\ \mathcal{C}(A,-)\ \xRightarrow{\ \cong\ }\ F.

Derivation hint: a natural isomorphism is a natural transformation with components ηX\eta_X that are bijections for every XX; the pair (A,η)(A,\eta) is a <strong>representation</strong> of FF. A contravariant functor F:Cop→SetF:\mathcal{C}^{\mathrm{op}}\to\mathbf{Set} is representable if F≅C(−,A)F\cong\mathcal{C}(-,A). The object AA is the representing object; by the universal element correspondence (below) a representation is equivalent to a universal element u=ηA(idA)∈F(A)u=\eta_A(\mathrm{id}_A)\in F(A).

TheoremThe Yoneda Lemma

Let C\mathcal{C} be locally small, F:C→SetF:\mathcal{C}\to\mathbf{Set} a functor, and A∈CA\in\mathcal{C}. Then the map

3
Φ: Nat(C(A,−), F) → ≅  F(A),Φ(α)=αA(idA),\quad \Phi:\ \mathrm{Nat}\bigl(\mathcal{C}(A,-),\,F\bigr)\ \xrightarrow{\ \cong\ }\ F(A),\qquad \Phi(\alpha)=\alpha_A(\mathrm{id}_A),

is a bijection, natural in both AA and FF. Derivation hint: αA\alpha_A is the component of the natural transformation at the object AA; evaluating it on the identity morphism idA∈C(A,A)\mathrm{id}_A\in\mathcal{C}(A,A) produces an element of F(A)F(A). Naturality in AA and FF means Φ\Phi commutes with the actions of morphisms A′→AA'\to A and natural transformations F→F′F\to F'.

TheoremYoneda Embedding

The assignment A↦C(−,A)A\mapsto\mathcal{C}(-,A) defines a functor, the Yoneda embedding,

4
よ: C ⟶ C^:=[Cop,Set],A↦C(−,A),\quad よ:\ \mathcal{C}\ \longrightarrow\ \widehat{\mathcal{C}}:=[\mathcal{C}^{\mathrm{op}},\mathbf{Set}],\qquad A\mapsto \mathcal{C}(-,A),

which is full and faithful: for all A,BA,B,

5
C(A,B) ≅ Nat(C(−,A), C(−,B)).\quad \mathcal{C}(A,B)\ \cong\ \mathrm{Nat}\bigl(\mathcal{C}(-,A),\,\mathcal{C}(-,B)\bigr).

Derivation hint: apply [3] to the contravariant version with F=C(−,B)F=\mathcal{C}(-,B) evaluated at the representing object AA; the universal element corresponding to a natural transformation is a morphism A→BA\to B, giving the bijection.

Why It Holds / Derivation

ProofBijectivity of Φ\Phi via an explicit inverse

We construct Ψ:F(A)→Nat(C(A,−),F)\Psi:F(A)\to\mathrm{Nat}(\mathcal{C}(A,-),F) inverse to Φ\Phi.

Step 1 — Define Ψ\Psi. Given a∈F(A)a\in F(A), define a transformation Ψ(a)\Psi(a) with components

6
Ψ(a)X: C(A,X)→F(X),Ψ(a)X(g)=F(g)(a)(g:A→X).\quad \Psi(a)_X:\ \mathcal{C}(A,X)\to F(X),\qquad \Psi(a)_X(g)=F(g)(a)\quad (g:A\to X).

Derivation hint: g:A→Xg:A\to X induces F(g):F(A)→F(X)F(g):F(A)\to F(X); apply it to the chosen element a∈F(A)a\in F(A).

Step 2 — Ψ(a)\Psi(a) is natural. For f:X→Yf:X\to Y we must show F(f)∘Ψ(a)X=Ψ(a)Y∘hA(f)F(f)\circ\Psi(a)_X=\Psi(a)_Y\circ h^A(f). Evaluating on g∈C(A,X)g\in\mathcal{C}(A,X):

7
F(f)(F(g)(a))=F(f∘g)(a)=Ψ(a)Y(f∘g)=Ψ(a)Y(hA(f)(g)).\quad F(f)\bigl(F(g)(a)\bigr)=F(f\circ g)(a)=\Psi(a)_Y(f\circ g)=\Psi(a)_Y\bigl(h^A(f)(g)\bigr).

Derivation hint: functoriality F(f)∘F(g)=F(f∘g)F(f)\circ F(g)=F(f\circ g) supplies the first equality; the definition of hA(f)=f∘(−)h^A(f)=f\circ(-) gives the last.

Step 3 — Φ∘Ψ=id\Phi\circ\Psi=\mathrm{id}. Compute Φ(Ψ(a))=Ψ(a)A(idA)=F(idA)(a)=idF(A)(a)=a\Phi(\Psi(a))=\Psi(a)_A(\mathrm{id}_A)=F(\mathrm{id}_A)(a)=\mathrm{id}_{F(A)}(a)=a. Derivation hint: FF preserves identities, so F(idA)=idF(A)F(\mathrm{id}_A)=\mathrm{id}_{F(A)}.

Step 4 — Ψ∘Φ=id\Psi\circ\Phi=\mathrm{id}. Let α∈Nat(C(A,−),F)\alpha\in\mathrm{Nat}(\mathcal{C}(A,-),F) with a=Φ(α)=αA(idA)a=\Phi(\alpha)=\alpha_A(\mathrm{id}_A). For any g:A→Xg:A\to X, naturality of α\alpha at gg gives the commuting square

8
αX(g)=αX(hA(g)(idA))=F(g)(αA(idA))=F(g)(a)=Ψ(a)X(g).\quad \alpha_X\bigl(g\bigr)=\alpha_X\bigl(h^A(g)(\mathrm{id}_A)\bigr)=F(g)\bigl(\alpha_A(\mathrm{id}_A)\bigr)=F(g)(a)=\Psi(a)_X(g).

Derivation hint: write g=g∘idA=hA(g)(idA)g=g\circ\mathrm{id}_A=h^A(g)(\mathrm{id}_A), then apply the naturality square αX∘hA(g)=F(g)∘αA\alpha_X\circ h^A(g)=F(g)\circ\alpha_A to idA\mathrm{id}_A. Hence α=Ψ(a)\alpha=\Psi(a). Steps 3–4 show Φ\Phi and Ψ\Psi are mutually inverse, proving the bijection. Naturality of Φ\Phi in FF and AA is checked by chasing the analogous squares. ■\blacksquare

∎
Figure
The Yoneda naturality square: idA\mathrm{id}_A generates everything
𝒞(A,A) 𝒞(A,X) F(A) F(X) h^A(g)=g∘(−) α_A α_X F(g) id_A a = α_A(id_A) generic point chases to α_X(g)=F(g)(a)
mathematician · Nobuo Yoneda | 1930–1996

Japanese mathematician working in homological algebra (notably Yoneda Ext groups and the splice product of extensions). The lemma bearing his name emerged not from a published paper but from a 1954 conversation with Saunders Mac Lane in a Paris train station (the Gare du Nord), after which Mac Lane carried the idea back and popularized it. Yoneda's own contributions to the cohomology of groups and the long exact sequence machinery were substantial, but the lemma's deceptively simple statement made it the lens through which generations learned that objects live through their relationships.

Building Intuition

🧠 Intuition

Think of C(A,−)\mathcal{C}(A,-) as the probe "what can map out of AA?". A natural transformation α:C(A,−)⇒F\alpha:\mathcal{C}(A,-)\Rightarrow F is a coherent rule assigning to every arrow out of AA an element of FF. But every arrow g:A→Xg:A\to X is just g∘idAg\circ\mathrm{id}_A — it is the image of the identity under post-composition. So once you decide where idA\mathrm{id}_A goes (an element a∈F(A)a\in F(A)), naturality forces g↦F(g)(a)g\mapsto F(g)(a) everywhere. The identity is a generic element: a single seed from which the whole transformation grows. This is why "to specify a map of structured objects, give the image of one universal element" appears all over mathematics — the determinant as a map out of free modules, a group homomorphism out of a free group determined on generators, a continuous map out of a representable space. Representability turns abstract universal properties into concrete elements you can point at.

Worked Examples

ExampleRepresenting the forgetful functor on groups

Given: Let U:Grp→SetU:\mathbf{Grp}\to\mathbf{Set} be the forgetful functor sending a group GG to its underlying set ∣G∣|G|. We ask: is UU representable, and by which group?

Steps: 1. A representation needs G0G_0 with Grp(G0,G)≅∣G∣\mathbf{Grp}(G_0,G)\cong |G| naturally. The free group on one generator is Z\mathbb{Z}, and a homomorphism ϕ:Z→G\phi:\mathbb{Z}\to G is uniquely determined by ϕ(1)∈∣G∣\phi(1)\in |G|, with every element achievable. 2. Thus Grp(Z,G)≅∣G∣\mathbf{Grp}(\mathbb{Z},G)\cong |G| via ϕ↦ϕ(1)\phi\mapsto\phi(1); check naturality: for ψ:G→H\psi:G\to H, ψ∘ϕ↦ψ(ϕ(1))\psi\circ\phi\mapsto\psi(\phi(1)) matches U(ψ)U(\psi) applied to ϕ(1)\phi(1). ✓ 3. By Yoneda, natural transformations U⇒UU\Rightarrow U correspond to elements of U(Z)=ZU(\mathbb{Z})=\mathbb{Z}. The element n∈Zn\in\mathbb{Z} gives the transformation g↦gng\mapsto g^n ("raise to the nnth power"), which is indeed natural.

Answer: U≅Grp(Z,−), representing object Z;Nat(U,U)≅Z (the power operations).\boxed{U\cong\mathbf{Grp}(\mathbb{Z},-),\ \text{representing object }\mathbb{Z};\quad \mathrm{Nat}(U,U)\cong\mathbb{Z}\ \text{(the power operations)}.}

ExampleCounting natural transformations between hom-functors on a poset

Given: Let C\mathcal{C} be the poset category {0≤1≤2}\{0\le 1\le 2\}, where C(i,j)\mathcal{C}(i,j) has exactly one element if i≤ji\le j and is empty otherwise. Compute Nat(C(1,−),C(0,−))\mathrm{Nat}(\mathcal{C}(1,-),\mathcal{C}(0,-)).

Steps: 1. By the (covariant) Yoneda Lemma applied with F=C(0,−)F=\mathcal{C}(0,-) and A=1A=1:

Nat(C(1,−),C(0,−))≅C(0,−) (1)=C(0,1).\mathrm{Nat}(\mathcal{C}(1,-),\mathcal{C}(0,-))\cong \mathcal{C}(0,-)\,(1)=\mathcal{C}(0,1).

2. Since 0≤10\le 1, the set C(0,1)\mathcal{C}(0,1) has exactly one element. 3. Sanity check directly: a transformation must send id1∈C(1,1)\mathrm{id}_1\in\mathcal{C}(1,1) to an element of C(0,1)\mathcal{C}(0,1) — only one choice — and then naturality fixes the rest. (Contrast: Nat(C(0,−),C(1,−))≅C(1,0)=∅\mathrm{Nat}(\mathcal{C}(0,-),\mathcal{C}(1,-))\cong\mathcal{C}(1,0)=\varnothing, since 1≰01\not\le 0.)

Answer: ∣Nat(C(1,−),C(0,−))∣=1,∣Nat(C(0,−),C(1,−))∣=0.\boxed{|\mathrm{Nat}(\mathcal{C}(1,-),\mathcal{C}(0,-))|=1,\quad |\mathrm{Nat}(\mathcal{C}(0,-),\mathcal{C}(1,-))|=0.}

Common Misconceptions

⚠️ Common mistake

Local smallness is not optional. The bijection Φ\Phi presumes C(A,X)\mathcal{C}(A,X) is a genuine set so that hom-functors land in Set\mathbf{Set}. In a category that is not locally small, C(A,−)\mathcal{C}(A,-) may not be definable as a Set\mathbf{Set}-valued functor and the Yoneda statement fails to even type-check. Also note: the embedding is fully faithful but not surjective on objects — most presheaves are not representable, and a presheaf is representable iff its category of elements has a terminal object.

⚠️ Common mistake

"Naturally isomorphic" ≠\ne "isomorphic in each component." Two functors can have F(X)≅G(X)F(X)\cong G(X) for all XX (componentwise bijections) without being naturally isomorphic. The Yoneda isomorphism's force comes from naturality — the commuting squares — not mere cardinality matching. Forgetting naturality is the single most common error in applying the lemma.

Counterexample

Consider C=Grp\mathcal{C}=\mathbf{Grp} and let F(G)=Aut(G)F(G)=\mathrm{Aut}(G) — but treat it naively as a set-valued assignment ignoring that automorphisms don't transform functorially along arbitrary homomorphisms. There is no functor Grp→Set\mathbf{Grp}\to\mathbf{Set} with G↦Aut(G)G\mapsto\mathrm{Aut}(G) that is covariant in homomorphisms (a non-iso ϕ:G→H\phi:G\to H gives no induced map on automorphism groups), so asking whether "Aut\mathrm{Aut} is representable" is ill-posed until one fixes the variance/functoriality. The lesson: representability questions require a bona fide functor first; many natural-looking assignments are not functorial at all, so Yoneda does not apply.

Connections

connection

The Yoneda Lemma is the technical heart of Universal Properties: a universal element of FF is precisely a representation, and uniqueness up to unique isomorphism is the statement that representing objects are unique. It underlies Adjoint Functors — an adjunction L⊣RL\dashv R is equivalent to natural isomorphisms D(LA,B)≅C(A,RB)\mathcal{D}(L A,B)\cong\mathcal{C}(A,RB), i.e. representability of certain hom-functors. It powers Limits and Colimits, since a limit of DD represents the functor X↦lim⁡C(X,D(−))X\mapsto\lim\mathcal{C}(X,D(-)), and Yoneda gives the uniqueness. Through the embedding C↪[Cop,Set]\mathcal{C}\hookrightarrow[\mathcal{C}^{\mathrm{op}},\mathbf{Set}] it connects to Presheaves and Sheaves and the theory of Density and the Co-Yoneda Lemma, where every presheaf is a colimit of representables.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1942–1945 — Eilenberg and Mac Lane introduce categories, functors, and natural transformations, making "naturality" a precise notion and setting the stage.
- 1950s — Hom-functors and representability emerge implicitly in homological algebra (Cartan–Eilenberg).
- c. 1954 — Nobuo Yoneda explains the lemma to Saunders Mac Lane at the Gare du Nord in Paris; Mac Lane disseminates and names it.
- 1958 — Kan introduces adjoint functors, whose theory is intertwined with representability.
- 1960s — Alexander Grothendieck founds the functor-of-points viewpoint in algebraic geometry (EGA/SGA), making representability the organizing principle of scheme theory and moduli.
- 1962 — E. H. Brown proves the Brown Representability Theorem in homotopy theory.
- 1971 — Mac Lane's Categories for the Working Mathematician gives the canonical textbook treatment, cementing notation and the embedding.
- 1990s–2000s — Representability and Yoneda become central to higher category theory (∞-categories, Lurie), via ∞\infty-presheaves and the ∞\infty-Yoneda Lemma.
- 2010s–present — Formalization in proof assistants (Coq, Lean, Agda) and the HoTT program restate Yoneda constructively and homotopically.

Subtleties & Limits

open-problem

Size and largeness. For locally small but large categories, the presheaf category [Cop,Set][\mathcal{C}^{\mathrm{op}},\mathbf{Set}] may itself fail to be locally small, and care with Grothendieck universes is needed; controlling these size issues (accessible/presentable categories, the small object argument) is a delicate ongoing concern in foundations. Higher Yoneda. Stating and proving the Yoneda Lemma for (∞,1)(\infty,1)-categories required substantial machinery (simplicial/quasicategorical models); fully synthetic proofs in directed type theory and simplicial type theory are an active research frontier. Constructive and enriched versions. The enriched Yoneda Lemma (over a monoidal V\mathcal{V}) and its constructive content — when does representability hold without choice, and what is its computational meaning — remain areas of refinement, especially as proof assistants demand fully explicit witnesses.

See Also

Universal Properties · Adjoint Functors · Presheaves and Sheaves · Kan Extensions · Functor of Points · Brown Representability · Enriched Category Theory