Overview

The Yoneda lemma says that a natural family of operations defined on all maps into one object is determined by its value on that object’s identity map. It makes precise the idea of understanding an object through the ways other objects map to it. The statement is abstract, but its proof is a direct calculation with naturality.

Prerequisites

Know locally small categories and contravariant set-valued functors. Such a functor P:Cop→SetP:\mathcal C^{\mathrm{op}}\to\mathbf{Set} is a presheaf. For a small C\mathcal C, its presheaves form an ordinary locally small functor category. Broader size settings require a fixed universe or explicit control of the transformation collections.

Definition and conventions

For an object AA of a small category C\mathcal C and a presheaf PP, write hA=Hom⁡C(−,A)h_A=\operatorname{Hom}_{\mathcal C}(-,A). Yoneda gives a bijection, natural in AA and PP,

Nat⁡(hA,P)≅P(A),η⟼ηA(1A).\operatorname{Nat}(h_A,P)\cong P(A), \qquad \eta\longmapsto\eta_A(1_A).

This is the contravariant formulation. A dual formulation applies to covariant functors using maps out of AA. Keeping these variances explicit avoids reversing the formula by accident.

Intuition

The identity 1A1_A is a universal input. Every map f:X→Af:X\to A is obtained from it by precomposition. If the operation respects all precompositions, its value at ff is forced by its value at the identity. Thus a huge family can be encoded by a single element.

Examples and non-examples

Let C\mathcal C be the ordered category {0<1<2}\{0<1<2\}, with one arrow precisely when the order permits it. Then h1h_1 takes singleton values at zero and one, and the empty value at two. Take PP to be the constant two-element presheaf with every restriction map the identity.

A natural transformation h1→Ph_1\to P must choose the same value at zero and one because of the arrow 0→10\to1. Its component at two is the unique empty function. There are exactly two transformations, corresponding to P(1)P(1).

Choosing zero at object zero and one at object one gives correctly typed component functions, but violates naturality. It is a non-example of a transformation, not an extra solution missed by the lemma.

Important properties

Given u∈P(A)u\in P(A), define ηX(f)=P(f)(u)\eta_X(f)=P(f)(u). Contravariant functoriality proves naturality. Conversely, naturality at f:X→Af:X\to A forces exactly that formula from ηA(1A)\eta_A(1_A); the two constructions are inverse.

Taking P=hBP=h_B shows that natural transformations hA→hBh_A\to h_B correspond to arrows A→BA\to B. Hence the Yoneda embedding is fully faithful. A natural isomorphism of these representable functors forces AA and BB to be isomorphic, not necessarily equal.

Connections and further reading

Representability is the existence of a universal element whose induced transformation is invertible. Limits, moduli problems, and many universal constructions can be studied through this language. See Leinster, Theorem 4.2.1 and Corollary 4.3.7 and Li, “可表函子,” theorem labelled prop:Yoneda-lemma.