Published March 20, 2021｜2 minute read

Today is the day I understood Yoneda’s lemma. Of course I’ve proven it several times before; in a sense the proof is trivial, since there’s only one thing you can do at each stage. But I never felt that I really understood what the lemma was saying, or why it should be true, until something clicked today.

I came upon this realization while reading the book ‘Category Theory for Programmers.’ Although the book’s clarity definitely helped, I have a feeling that my understanding was a gradual process. It’s been a long time in the making. (And as usual in math, obvious in hindsight.)

The fundamental reason the lemma works, and why the hom functor $-^a$ should be in a sense ‘universal,’ is that the elements of each image $x^a$ are themselves morphisms $f : a \to x$. As such, each point $f \in x^a$ contains precisely the information necessary to determine where it should be mapped. Namely, apply the corresponding map $F(f)$ to an arbitrary base point $p \in F(a)$. The fact this map is forced is aesthetically obvious, and enforced by natrality.

This is the same logic used to identify the vector space $\mathbb{R}^2$ with the the 2D plane (a set of points), once a basepoint is fixed. Each vector $\vec{v}$acts naturally on the plane by translation, so it’s natural to identify it with the image of the basepoint. From this point of view, it’s quite clear why the 2D plane can be identified with $\mathbb{R}^2$, and why there is exactly one identification corresponding to each possible basepoint in the plane.

[In fact, if you represent the vector space’s group structure as the hom-set of a one-object category, and identify the plane $P$ with the functor $* \mapsto P$ mapping vectors (automorphisms on $*$) to translations (automorphisms on $P$), this *is* Yoneda’s lemma.]