# Applying Yoneda’s Lemma

Let’s write down Yoneda’s lemma one more time. For a locally small category, and functors from that category into $\textsc{Set}$,

$\mbox{Nat}(\hom(A,-),F)\cong F(A)$.

One instance of Yoneda’s lemma is to take the second functor $F$ to be $\hom(B,-)$. Then we have a nice symmetric looking statement:

$\mbox{Nat}(\hom(A,-),\hom(B,-))\cong \hom(B,A)$.

This is called the Yoneda embedding. Now let’s do some magic. Let $G$ be a group. We can regard $G$ as a category with one element (the elements of the group are the morphisms in the category). Call that element *. If we take $A$ and $B$ both to be $*$, then we get

$\mbox{Nat}(\hom(*,-),\hom(*,-))\cong \hom(*,*)$.

The righthand-side is just the homomorphisms from group itself. The homomorphisms from $*$ to $*$ form a group; that’s what we said. Okay, technically, it’s the set of all of those homomorphisms, but the correspondenc we’ll get from Yoneda will give it a group structure.

On the lefthand-side, we need to understand $\hom(*,-)$. As we defined it, it composes morphisms. That is, $\hom(*,f)$ is “composition on the left with $f$.” So I’m looking for the ways to transform composition on the left to composition on the left that make the related square commute. This is likely difficult to picture, but these are going to correspond to functions on sets. Specifically, it ccorresponds to the permutations of the set $\hom(*,*)$ (pushing the elements around by composing on the left with them).

If I’ve done my explaining correctly (I most certainly have not) this should be a rough sketch of a proof of Cayley’s theorem in group theory. Indeed, the Yoneda Lemma is a generalization of this theorem. Cayley is easy to prove without Yoneda, but the correspondence is an important one to see. At least for me, it helps me understand Yoneda’s lemma slightly better. I think of Yoneda as Cayley’s big brother.