For two categories let denote the **functor category**, whose objects are functors and whose morphisms are natural transformations. For a **locally small** category, the **Yoneda embedding** is the functor sending an object to the contravariant functor and sending a morphism to the natural transformation given by composition. The goal of the next few posts is to discuss some standard properties of this embedding and try to gain some intuition about it.

Below, whenever we talk about the Yoneda lemma we implicitly restrict our attention to locally small categories.

**The Yoneda embedding**

Let be an object and be a (set-valued) **presheaf**. A natural transformation from the representable presheaf to is a collection of morphisms such that the square

commutes for all (where is abuse of notation for the action of the functor on morphisms ). In particular, we have a morphism , and taking the image of associates to every natural transformation an element .

**Yoneda lemma:** The above map is an isomorphism (of sets).

**Corollary:** The Yoneda embedding is fully faithful; that is, every natural transformation is induced by composition with an element of , and different morphisms give different natural transformations.

*Proof.* Set in the above commutative diagram to the diagram

where is now a morphism . By identifying the images of in obtained from tracing the two paths in this diagram we conclude that

.

In other words, for every (so the entire natural transformation) is completely determined by . This shows that the map we defined above from natural transformations to elements of is injective. On the other hand, it’s not hard to check that for any choice of the above defines a natural transformation .

**Morals of the Yoneda lemma**

The Yoneda lemma shows that an object in a category is determined up to isomorphism by the presheaf it represents. In other words, roughly speaking an object is determined by how other objects map into it. I once heard the following colorful analogy for this situation on MO: if one thinks of objects of a category as particles and morphisms as ways to smash one particle into another particle, then the Yoneda lemma says that it is possible to determine the identity of a particle by smashing other particles into it.

Another way to say this is the following. For an object , we call an element of a **generalized point** or **-point** of . If is the terminal object, a -point is also sometimes called a **global point.**

*Example.* In or more generally , a global point is a point in the usual sense.

*Example.* In , the category of -sets ( a group), a global point is a fixed point.

*Example.* Let be a field. In the category of affine varieties over , a global point is a point over (since is the terminal object). More general points often have geometric interpretations; for example, a -point is a one-parameter family of -points, and a is a -point together with a Zariski tangent vector.

The Yoneda lemma tells us, roughly speaking, that an object is determined by its generalized points. Yet another way to say this is that we can completely understand the morphisms between objects in an arbitrary category in terms of maps between the “sets” of generalized points

.

These disjoint unions don’t actually exist if the collection of objects of doesn’t form a set (for example if ). If actually has a set of objects (in addition to sets of morphisms), we say that is **small**. In any small category we can form the above disjoint unions, and so we conclude that that every small category is **concretizable** (admits a faithful functor to ).

**Yoneda for monoids**

Let be a monoid and be the corresponding one-object category with single object . Then a presheaf is precisely a right -set, and a natural transformation between presheaves is a morphism of right -sets. Furthermore, the unique representable presheaf corresponds to regarded as a right -set by right multiplication.

The Yoneda lemma in this case says that morphisms of right -sets are canonically in bijection with elements of (take the image of as above); in particular, the endomorphisms of form a monoid canonically isomorphic to (acting by left multiplication). This gives us a slight generalization of Cayley’s theorem: every monoid acts by endomorphisms on some set.

**Yoneda for posets**

Let be a poset regarded as a category where means there is a single morphism and otherwise there are no morphisms. Set-theoretic presheaves on are the wrong thing to consider; since we can think of posets as categories enriched over the category (which is also a poset) , we should actually be considering presheaves . By identifying such a presheaf with the elements mapping to , we can identify presheaves on with **downward closed sets** in , since functoriality just means that if then . In particular, the representable presheaves are the downward closed sets of the form .

A functor between two posets is just an order-preserving map. The functor category is itself a poset, with a single natural transformation existing if for all and no natural transformations existing otherwise. When and we identify the functors with downward closed sets, the corresponding partial order structure is containment.

The Yoneda lemma in this case says that a downward closed set contains if and only if it contains . Applied to two representable presheaves, it says that

.

The Yoneda embedding embeds a poset into its poset of downward-closed subsets, giving us a “Cayley’s theorem for posets”: every poset can be realized as subsets of some set under containment. It also gives a kind of “Dedekind completion” of : for example, when under the usual order, the poset of downward-closed subsets is the extended real line (**Edit, 11/1/2020:** This appears to be incorrect; see the comments.)

**Yoneda for the category of affine schemes**

For the purposes of this section, the category of affine schemes will be by definition the opposite of the category of commutative rings. If is a commutative ring, we write for that ring regarded as an object in . The Yoneda lemma tells us that is completely determined by the presheaf . A certain family of examples will be particularly instructive; if we take where is a finite collection of integer polynomials in variables, then the affine scheme is completely determined by the presheaf or, in the opposite category, by

.

But by the universal property of polynomial rings, this is nothing more than the set of such that ; in other words, precisely the set of solutions of the polynomial system over !

In other words, for affine schemes generalized points are like solutions to systems of polynomial equations. This point of view on algebraic geometry was pioneered by Grothendieck and is called the functor of points perspective. A particularly elegant feature of this perspective is how it uses the Yoneda lemma: the Yoneda lemma tells us that a morphism of affine schemes is precisely a consistent collection of ways to turn solutions of the “system of equations” described by into solutions of the “system of equations” described by .

General non-affine schemes are informally built by “gluing” affine schemes, and one way to make that precise is to think of affine schemes as representable presheaves on and then taking suitable colimits of these presheaves in the presheaf category .

on November 15, 2019 at 7:19 am |ziggurismI’m having some doubts about this claim that downward closed subsets of the poset of rational numbers Q is the extended real line. For any rational q, {x | x < q} and {x | x â‰¤ q} seem to be two distinct downward-closed subsets. Hence this "completion" of Q actually has two copies of every rational number, in order, but only one copy of every irrational?

on November 1, 2020 at 12:38 pm |Qiaochu YuanThat sounds right, I’ll edit the example, thanks!

on November 5, 2020 at 7:24 pm |sarahzrfthe extended real line is in fact the *reflexive completion* of Q, as in the category of fixed points of the isbell duality adjunction (here, that means downward-closed subsets which are fixed by taking their set of upper bounds and then the set of lower bounds of that again)

on December 31, 2020 at 8:34 pm |ziggurismSo this means that the extended reals are the fixed points of the Isbell adjunction between presheaves on Q and copresheaves on Q? Thank you

on May 5, 2013 at 3:14 am |Le lemme de Yoneda et l’opÃ©ration spirituelle | L'horreur islamique[…] Annoying precision […]

on September 8, 2012 at 1:39 pm |Yoneda’s Lemma « Mental Wilderness[…] If you haven’t seen it before, try proving Yoneda’s lemma. (It’s not too difficult if you’re familiar with basic category theory arguments… there is really only 1 choice for the map.) As a follow-up I recommend looking at Qiaochu Yuan’s article which gives additional examples:Â https://qchu.wordpress.com/2012/04/02/the-yoneda-lemma-i/ […]

on June 2, 2012 at 1:57 pm |wildildildlifeI guess one could say Hom(-,x) is a *represented* functor [with ‘tautological’ representation, namely the one corresponding to the universal element (x, id_x)].

on May 30, 2012 at 9:45 pm |Joe Hannon“elements of an arbitrary category”, instead of “objects”?

on May 30, 2012 at 10:01 pm |Qiaochu YuanWhoops! Yes, I meant “objects”.

on May 31, 2012 at 7:00 am |Joe HannonYeah, minor nit, I guess. Also, when you say Hom(-,x) is a representable presheaf, that just means it’s isomorphic to a hom-functor, a trivial fact in this case since it *is* a hom-functor?

on May 31, 2012 at 7:13 am |Qiaochu YuanYep.