# Yoneda's Lemma

Every man is like the company he is wont to keep.

One of the most consistent philosophies throughout all of category theory is "It's all about the arrows." This is built into the very core of the theory, in that you don't even really need objects to define a category: they are in one-to-one correspondence with the identity arrows!

At a metaphorical level, an arrow

But how does one formalize this idea?

# The original inspiration: universal properties

First revisit our pantheon of objects with universal properties. Looking over these examples, a clear pattern emerges. In each case was have an object

that is "natural in

# Examples

For illustration, we recall some specific examples of universal properties.

## Coequalizers of set maps

Suppose

- to each set
the set consisting of all pairs of set maps , ; and - to each set map
the set map that takes each pair of set maps , the pair of set maps , .

Then there is a bijection that is natural in:

## Quotients by normal subgroups

Let

Under this bijection, each group morphism

## Direct sums of abelian groups

If

Under this bijection, each group morphism

## Free -modules

Let

In the current context, let

# From objects to (hom) functors

We first notice that in every universal property, we are always characterizing morphisms from an object (or dually, to an object) in terms of a "natural" bijection with some other info. To make this functorial, consider the following:

For each object

- For each object
, we let . - For each arrow
, we let be the set map that takes each morphism to the morphism .

It is also common to write

We should verify that

First note that for each identity arrow

Next, for a pair of composable arrows

More formally, for each object

while

By the associativity of composition in

# From the category to the functor category

For each object

To that end, suppose

Given an element

However, there is an obvious way to take an element

This defines a set map **contravariant functor** from **opposite** category construction.^{[1]} In other words, we can use our construction above to define a (covariant) functor^{[2]}

Note that the category

For a given category

- For each object
(which is the same as an object ), we have . - For each arrow
in (which corresponds to an arrow in ), the natural transformation is defined by "pre-composition with ," i.e., for each the set map is given by sending each arrow to the arrow .

Note that the naturality of our supposedly natural transformation follows from the associativity of arrow composition. To see this, suppose

Starting from the top-left, suppose

# Was this a good idea?

If we hadn't been inspired by the myriad constructions objects with universal properties, this wouldn't seem like a great way to understand objects in a given category

Following the general principle of "knowing an object by knowing the maps from it"^{[3]}, we should first examine what we can say about arrows from

And here we at last come to it, the great lemma of category theory:

Suppose

In other words, there is a bijection

We can upgrade this bijection to a full-on natural isomorphism between two functors, but for now let's examine the proof of this lemma.

First suppose