# The Brilliance of the Yoneda Lemma

A beautiful revolution of the concept of “space”

I am often surprised by how unfamiliar most mathematicians are with the concept of the Yoneda Lemma. It has surprisingly widespread consequences. In this article, I’ll try to give the broad idea along with how it allows us to study “spaces” that have no traditional method for study.

If this ever gets too abstract, keep going. I promise I’ll shift back and forth between pictures, analogies, and scary terminology.

# Motivation

One of the most fundamental motivations in all of mathematics is to figure out how to describe a collection of objects. This is usually called the problem of ** classification**.

Examples:

- Describe all Riemann integrable functions on the real line.
- Describe all compact smooth n-dimensional manifolds.
- Describe all Radon measures.
- Describe all vector bundles on X.

Now I know what some of you are thinking: if I give necessary and sufficient conditions, that’s a description.

Yes, but this doesn’t tell us much about the collection as a whole. Can all the things we’re trying to describe be put into a space? If so, what is the dimension of this space? Can it be done so that nearby elements are actually similar?

If this is a bit much, let’s back up to an example that doesn’t use any fancy math.

Describe all the real numbers to me.

If your first thought was the real number line, then you see how useful this concept is. It has every one of the properties we’ll want in such a classification space.

The objects we’re classifying (the real numbers) are the points on the line/space. The real number line is a “space” with a bunch of properties. For example, it’s a one-dimensional smooth manifold (or topological space, or metric space, etc).

Each object (real number) appears ** exactly once** on the line, and nearby ones are close in “size.” This classifying space teaches us a lot about the objects we wanted to classify.

I’ve been calling this a “classifying space,” but in algebraic geometry, we’d call this a ** moduli space** for the real numbers (classifying space has different connotations in topology).

Giving a more precise definition of this term is far, far beyond the scope of this article. Whenever I use this term, think back to those few facts: it’s a “space” where each object we’re trying to classify is a point on the space and nearby points are “more similar” than far away objects.

## The Problem

We have some motivation for *something*, but you’re probably super confused by what this has to do with something called the Yoneda Lemma.

Let’s first describe a problem we’ll encounter if we take this concept to the real world.

The moduli space for any reasonably hard classification problem will almost never be recognizable as a traditional space.

We got super lucky that our example was actually a smooth manifold. Sometimes it might be an algebraic variety, sometimes a scheme, sometimes a topological space or stack.

But sometimes not even any of those.

Don’t worry if those words didn’t make sense. The point is that we need a way to “pretend” it’s a space from the barest description. Once we’re allowed to do that, we might end up proving it’s super nice, like a smooth manifold.

This is the problem. We have so little to go on.

We know the points are supposed to be the objects and nearby ones should be similar somehow. But how do you study this space that might not even be recognizable as a space?

## The Brilliant Insight

Every branch of math has some crowning achievements and insights into how to actually think about a problem so that it works.

The idea I’ll present here is a truly remarkable insight into geometry and topology. It is incredibly simple (despite the daunting language) which is what makes it so fascinating.

Forget about the motivation for a moment. We’ll get back to it. I promise.

Right now the goal is to come up with an alternate but absolutely equivalent way of thinking about “nice” spaces. This will allow for the generalization later.

### Probing

Here’s the idea. Suppose you care about some type of space (metric, topological, manifolds, varieties, or whatever).

Let X be one of your spaces.

In order to figure out what X is you could probe it by other spaces.

What does this mean? It just means you look at maps (functions) f: Y→ X.

If X is a topological space, then you can recover the points of by considering all the maps from a singleton (i.e. point)

f: {x} → X.

It’s crucial that you convince yourself of this before continuing. Think back to the real number line.

Describe every function from a set with one element to the real number line. The function is completely described by telling me where that single element goes.

Therefore, you can form a 1–1 correspondence between these functions and the value of the function.

Okay.

We might have struck upon something important with this probing idea. If we start with a space of any kind (even whacky ones), and we probe it by the set with one element, we get **all** of the points of that space.

A topological space is just a collection of points together with extra structure (the topology). We’ve recovered half of that information by probing with the simplest set imaginable: the set with one element.

Just imagine what will happen when we start considering maps from more complicated spaces.

The functions f: [0,1] → X are the paths and on and on.

If you want to understand more and more about X, then you probe by some other spaces. Simple.

### An aside for non-geometers

Even analysts use this idea all the time.

A distribution ϕ on ℝ is not a well-defined function, so you can’t just tell whether or not two distributions are the same by looking at values.

Instead, you probe it by test functions ∫ ϕ f dμ.

If these probes give you the same thing for all test functions, then the distributions are the same.

This is all we are doing with our spaces above.

## The Yoneda Lemma

Let’s take stock of where we are.

We have X, something that’s a “space.” We want to know if probing it is enough to recover everything about the space that we’d study in a more traditional way.

And this is the punchline. The Yoneda lemma says exactly that.

It says that if the maps (test functions) to X and the maps to Y are the same, then X and Y are the same.

One of the craziest parts about this lemma is that the proof is done at the level of categories. So it’s true for any category of spaces you want to consider: topological spaces, smooth manifolds, schemes, etc.

Before we get too deep here, I want to reiterate how useful this is for the motivational problem.

We start with a moduli space for the objects we want to classify.

Maybe it’s Calabi-Yau threefolds. This moduli space, X, should be some sort of geometric object where each point represents a Calabi-Yau threefold, every Calabi-Yau threefold is represented somewhere, and no two points represent the same one.

Moreover, it should be done in a way that has nearby ones as “similar” (for the insider they should be deformations).

*A priori*, we know nothing about this space. We don’t even know it’s a “space” in any sense that we’d recognize.

But maybe there’s a specific Calabi-Yau threefold, say A, that we know has nice properties.

Merely by probing around that point, maybe we prove X is smooth there (something that can be checked locally).

Once that’s done, we just test the dimension of the tangent space. Voila. We’d actually determine the local structure of X is n-dimensional. Or, put another way, A lives in an n-dimensional family of similar objects.

I know that’s vague and sounds implausible, but the tools I reference have been developed and used to great success in many branches of math. It’s not just a pipe dream.

For the Calabi-Yau example, the dimension of the tangent space is computable as the dimension of a cohomology group of A itself (something very well-known).

## More Details for the Brave

We can fancy up the language now.

Considering maps to X is a functor.

Hom( — , X): Spacesᴼᵖ → Set

Such a functor is called a ** presheaf** on the category of Spaces (recall, that for your particular situation this might be the category of smooth manifolds or metric spaces or algebraic varieties or whatever).

Don’t be scared. This is literally the definition of presheaf, so if you were following to now, then introducing this term requires no new definitions or concepts.

We’re just bundling all the probes to X into one thing and calling it a presheaf.

The Yoneda lemma is saying something very simple in this fancy language.

It says that there is a (fully faithful) embedding of Spaces into Pre(Spaces), the category of presheaves on Spaces. If we now work with this new category of functors, we just enlarge what we consider to be a space.

This is the fundamental important insight once you have the Yoneda Lemma.

If X is one of our old spaces, then we can just naturally identify it with the presheaf Hom( — , X) without losing any information. But there are now tons of presheaves arising as classification problems that might not be a nice, typical “space” in the original category.

Because we’ve enlarged our concept of “space” to include this now, we can still study properties of the moduli space without the space needing to be of an impossibly stringent type (a smooth manifold, for example).

This is sometimes called the “functor of points” of X. Once you start thinking this way, it’s super useful to stop thinking of honest points of X which are given by f: {x} → X and just think of any of these probes as a “generalized point.”

## Tying it Together

I’ll just reiterate how useful this is in concrete terms again.

Let’s say you want to classify vector bundles on a smooth manifold X. This is about as classical a problem in geometry as it gets.

The task is overwhelmingly complicated when trying to use traditional tools. But if you convert to the functor of points, it's almost trivial to write down what this “should” be.

If you can write that much down, the Yoneda Lemma says that you’ve got a “space” with geometry to work with. This moduli space of vector bundles on X is exactly the solution to the problem of classifying the vector bundles.

# Final Remarks

The Yoneda Lemma isn’t just useful for classifying or moduli spaces. When you allow yourself to think about points as probes to the space, you get a bunch of generalized points that aren’t “geometric” in nature.

I’m tempted to go into this in more depth, but I think that’s for another whole article.

Here’s a cool consequence to ponder. Algebraic varieties are the geometric objects determined by solutions to polynomial equations.

One thing generalized points allow for is to study how different the different points/solutions vary as you change what field (or even ring!) you work over.

This gives you actions of various Galois groups on these spaces, allowing you to translate classic number theory questions into geometry and vice versa.

This is basically the start of arithmetic geometry. If you’ve heard much about Fermat’s Last Theorem, then you might know it has to do with proving elliptic curves are modular.

What it means for a variety to be modular comes from these Galois actions, and none of it would be possible without the Yoneda Lemma shaping how we think about spaces!

## Comments ()