# 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

Composing this functor with the forgetful functor $\text{Grp} \to \text{Set}$ gives a functor which turns out to be representable by the ring

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

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.