The Yoneda Lemma:
Objects Are Their Relationships
There is a recurring idea in mathematics that an object is not intrinsically interesting on its own, but only through its relationships with other objects. The Yoneda lemma is the precise version of this idea. It says that any object in a category is completely and faithfully determined by the functor that encodes how every other object maps into it.
The Setting
Let 𝒞 be a locally small category — one where for any two objects A and B, the collection of morphisms hom(A, B) is a genuine set. Fix an object A ∈ 𝒞. We can define a functor
𝗵A = hom(A, −) : 𝒞 → Setwhich sends each object X to the set hom(A, X), and each morphism f : X → Y to the function hom(A, f) = f ∘ −. This is the representable functor represented by A.
The Statement
Now let F : 𝒞 → Set be any functor at all. The Yoneda lemma asserts a natural bijection:
Nat(hom(A, −), F) ≅ F(A)That is: a natural transformation from the representable functor 𝗵A to F is the same thing as an element of F(A). This bijection is natural in both A and F.
The Yoneda lemma is arguably the most important result in category theory — not because it is deep in the technical sense, but because it is the conceptual engine behind representability, adjunctions, and the notion of universal property. — roughly paraphrasing Mac Lane & Moerdijk
The Proof Idea
The proof is almost entirely forced by naturality. Given a natural transformation α : hom(A, −) ⟹ F, its component at A is a function αA : hom(A, A) → F(A). The identity morphism idA is a distinguished element of hom(A, A), and so we get an element
αA(idA) ∈ F(A)Conversely, given any element x ∈ F(A), we can define a natural transformation by sending any morphism f : A → X to F(f)(x) ∈ F(X). Naturality forces these two constructions to be inverses. The identity determines the entire natural transformation: there is nowhere to hide.
Why It Matters
The first consequence is the Yoneda embedding: the functor 𝒞 → [𝒞op, Set] sending each object A to 𝗵A is full and faithful. This means every category embeds into its presheaf category, and morphisms between objects in 𝒞 correspond exactly to natural transformations between their representable functors. Objects are fully recoverable from their relationships.
The second consequence is a clean characterisation of universal properties. A construction is universal precisely when it represents a functor: a product A × B is an object representing hom(−, A) × hom(−, B). A free group on a set S represents the functor HomSet(S, U(−)) where U is the forgetful functor. Adjunctions are, at root, a mutual representability condition.
The third is a shift in perspective. Once you accept the Yoneda lemma, you stop thinking of objects as things-in-themselves and start thinking of them as nodes in a web of morphisms. The identity morphism is not a trivial piece of data — it is the element of hom(A, A) that, through the Yoneda lemma, names the object A itself within that web.
A Note on Intuition
The hard part of internalising the Yoneda lemma is not the proof — it really is just a few lines — but accepting that something this sparse carries so much weight. My own understanding shifted when I stopped reading the statement as a bijection of sets and started reading it as a claim about what information is available once you fix a functor. The natural transformation has to commute with every morphism in the category; that constraint is so rigid that a single element of F(A) determines the entire thing. There is a lesson here about the power of naturality as a condition.