# What use is the Yoneda lemma?

Although I know very little category theory, I really do find it a pretty branch of mathematics and consider it quite useful, especially when it comes to laying down definitions and unifying diverse concepts. Many of the tools of category theory seem quite useful to me, such as Mitchell's embedding theorem, which allows one to prove theorems in any abelian category using diagram chasing. It lets me the ability to treat lots of objects I would not otherwise feel comfortable with as if they were modules over some ring; in essence, I feel like I've gained some tools from it.

However, I simply cannot see where to apply the Yoneda lemma to some useful end. This is not to say that I don't think it is a very pretty lemma, which I do, or that I do not appreciate the aesthetic of being able to study an object in a category by looking at the morphisms from that object, which I also do. And I do find it useful to consider the modules over a ring rather than the ring itself when studying that ring, or to treat groups as subgroups of permutation groups, which are the two applications I've heard of the Yoneda lemma. The problem is that I already knew these things could be done. Essentially, I don't feel like I've gained any tools from the Yoneda lemma.

My question is this: how can the Yoneda lemma be applied to make problems more approachable, other than in cases like those I have listed above which can easily be treated without a general result like the Yoneda lemma? Basically, what new tools does it give us?

Some elaboration on Dylan Moreland's comment is in order. Consider the gadget $\text{GL}_n(-)$. What sort of gadget is this, exactly? To every commutative ring $R$, it assigns a group $\text{GL}_n(R)$ of $n \times n$ invertible matrices over $R$. But there's more: to every morphism $R \to S$ of commutative rings, it assigns a morphism $\text{GL}_n(R) \to \text{GL}_n(S)$ in the obvious way, and this assignment satisfies the obvious compatibility conditions. That is, $\text{GL}_n(-)$ defines a functor $$\text{GL}_n(-) : \text{CRing} \to \text{Grp}.$$

Composing this functor with the forgetful functor $\text{Grp} \to \text{Set}$ gives a functor which turns out to be representable by the ring $$\mathbb{Z}[x_{ij} : 1 \le i, j \le n, y]/(y \det_{1 \le i, j \le n} x_{ij} - 1).$$

Now, this ring itself only defines a functor $\text{CRing} \to \text{Set}$. What extra structure do we need to recover the fact that we actually have a functor into $\text{Grp}$? Well, for every ring $R$ we have maps $$e : 1 \to \text{GL}_n(R)$$ $$m : \text{GL}_n(R) \times \text{GL}_n(R) \to \text{GL}_n(R)$$ $$i : \text{GL}_n(R) \to \text{GL}_n(R)$$

satisfying various axioms coming from the ordinary group operations on $\text{GL}_n(R)$. These maps are all natural transformations of the corresponding functors, all of which are representable, so by the Yoneda lemma they come from morphisms in $\text{CRing}$ itself. These morphisms endow the ring above with the extra structure of a commutative Hopf algebra, which is equivalent to endowing its spectrum with the extra structure of a group object in the category of schemes, or an affine group scheme.

In other words, in a category with finite products, saying that an object $G$ has the property that $\text{Hom}(-, G)$ is endowed with a natural group structure in the ordinary set-theoretic sense is equivalent to saying that $G$ itself is endowed with a group structure in a category-theoretic sense. I discuss these ideas in some more detail, using a simpler group scheme, in this blog post.

• Purely out of curiosity, is "gadget" a technical term? Jan 2 '12 at 4:06
• @Alex: nope, I just didn't want to say "functor" yet. Jan 2 '12 at 4:17

I think one of the classical examples of the Yoneda lemma in action was Serre's observation that "cohomology operations" (i.e. natural transformations $H^n(X; G) \to H^m(X; H)$ for some $n, m, G, H$) are entirely classified by elements in the cohomology $H^m( K(G, n); H)$ (in view of the fact that Eilenberg-MacLane spaces represent cohomology on the homotopy category). This is not a deep observation once you believe the Yoneda lemma, but it means that one can determine what all possible cohomology operations are by computing the cohomology rings of these spaces $K(G, n)$ (which Serre and others did using the spectral sequence).

This led to the development of the Steenrod algebra, which is the algebra $\mathcal{A}{}{}{}{}$ of all "stable" cohomology operations in mod 2 cohomology; as a result of Serre's observation and some computation, $\mathcal{A}$ can be explicitly written down via generators and relations. The use of algebraic methods with $\mathcal{A}$ to solve geometric problems is huge, a lot of which has to do with the Adams spectral sequence; this essentially lets one compute (in some favorable cases) stable homotopy classes of maps in terms of cohomology.

Serre's observation is literally a consequence of the statement of the Yoneda lemma, but I think the "philosophy" of the Yoneda lemma is also very important; namely, one can characterize an object by how other objects map into it. In algebraic geometry, for instance, many complicated schemes (such as the Hilbert scheme) are literally defined in terms of the functor they represent. This has the benefit that one can reason about an object without necessarily knowing much about its "internal" structure (which may be prohibitively complex); for instance, one can talk about the tangent space to the Hilbert scheme (or any scheme defined by a moduli problem) in a very concrete way, in terms of that moduli problem evaluated on $\mathrm{Spec} k[\epsilon]/\epsilon^2$.

• There's a minor typo where you've written $H^m(K(G,n),m)$ for $H^m(K(G,n),H)$. I tried to edit, but my edit was rejected for being involving fewer than six (more precisely, exactly one) characters. Aug 11 '14 at 0:41

This answer is much more naive than the others, but I'll post it anway.

The most standard application of Yoneda's Lemma seems to be the uniqueness, up to unique isomorphism, of the limit of an inductive or projective system.

See for instance this pdf file by Pierre Schapira, or, more classically, the very beginning of:

Grothendieck, Alexander, Éléments de Géométrie Algébrique (rédigés avec la collaboration de Jean Dieudonné) : III. Étude cohomologique des faisceaux cohérents, Première partie. Publications Mathématiques de l'IHÉS, 11 (1961), p. 5-167.

I don't see how to prove this uniqueness without using (explicitly or implicitly) Yoneda's Lemma.

EDIT A. Let me try to explain more precisely what I have in mind by taking the example of final objects. (This example is given by Grothendieck in Section $(8.1.10)$ page $8$ of the linked text.)

First, let $S$ be the category of sets, and let $C$ be any category. Denote by $C(x,y)$ the set of $C$-morphisms from $x$ to $y$. Let $F:C\to S$ be a contravariant functor.

Say that a representation of $F$ consists of an object $a$ of $C$ together with an isomomorphism $F\simeq C(?,a)$. (By an enormous abuse of language, one usually expresses this by saying that $a$ represents $F$.)

Yoneda's Lemma tells us that, to each pair $F\simeq C(?,a)$ and $F\simeq C(?,b)$ of representations of $F$ is attached a perfectly defined isomorphism $a\simeq b$, and that the isomorphisms attached to any three representations of $F$ form a commuting triangle.

So, we won't get in trouble if, among all representations of $F$, we pick one of them, call the object involved the representative of $F$, and denote it by a symbol like $a_F$.

This is something we all do almost always.

(This is explained by Grothendieck in Section $(8.1.8)$ page $7$.)

Going back to our final object, let $s$ be a set with a single element, and $F:C\to S$ the contravariant functor attaching $s$ to any object of $C$. If $F\simeq C(?,\omega)$ is an isomorphism, we say, that $\omega$ is the final object of $C$.

This of course applies (as pointed out by Grothendieck in Section $(8.1.9)$ page $7$) to any projective system.

EDIT B. This is just a complement to t.b.'s interesting comment, which mentions this answer of ineff's about adjoint functors.

The interested reader might take a look at Section 1.5 pages 38 to 41 about adjoint functors in this pdf scan taken from the Springer edition of EGA I. More precisely, the scan contains pages 19 to 41 of

Éléments de Géométrie Algébrique I, Volume 166 of Grundlehren der mathematischen Wissenschaften in Einzeldarstellungen mit besonderer Berücksichtigung der Anwendungsgebiete, A. Grothendieck, Jean Alexandre Dieudonné, Springer-Verlag, 1971.

Apart from this Section on adjoint functors, these pages are essentially contained into the part of the IHES edition of EGA referred to in the previous edit.

This scan (I think) can be read with almost no prerequisite, and I don't know any other part of Grothendieck's work for which this can be said.

• Unfortunately, I cannot read french. Is it possible to give a quick summary of Grothendieck's argument (which I assume assets the uniqueness of schemes)? Jan 2 '12 at 7:22
• Dear @Alex: For the point I'm trying to make (and which is a very soft one), Grothendieck's and Schapira's texts are interchangeable. Grothendieck, immediately after having stated Yoneda's Lemma, gives this uniqueness of limits as the first example. I just wanted to say that, beside the deep applications of YL (which I don't understand), there are elementary applications. The few pages of the EGA I'm referring to are (I think) genuinely elementary. Jan 2 '12 at 8:15
• I took a look in the intervening time at Schapira's text and found the implicit use of Yoneda's you were talking about. Not the kind of answer I was looking for, but very interesting. +1'd. Jan 2 '12 at 8:20
• Dear Pierre-Yves I'm not entirely sure about the point you're making. Do you mean to say that by definition limit and colimit are adjoint to the diagonal functor and verifying the universal property amounts to that statement by the "adjointness via universals" corollary of Yoneda's lemma?
– t.b.
Jan 3 '12 at 21:41
• Dear @t.b.: Thank you very much for your comment. I edited the answer. By all means, let me know if there is anything wrong with what I wrote. Jan 4 '12 at 5:44