Consequences of Yoneda Lemma

A Representation is a Universal Element The Yoneda Embedding is Full and Faithful Objects Known by Their Representables Uniqueness from Universal Properties

A Representation is a Universal Element

The Yoneda lemma is fundamental, and its reach is best seen through its consequences. Three of them organize the present page. They are the three readings of the lemma identified at the close of the previous page: a representation is a single universal element, the embedding of a category into its presheaves loses nothing, and an object is pinned down by the maps it receives. We take them in that order, beginning with the one that turns the abstract definition of a representation into a concrete object one can point to.

Recall that a representation of a presheaf \(X\) is an object \(A\) together with a natural isomorphism \(\alpha : H_A \xrightarrow{\sim} X\). Such a natural isomorphism is, by the Yoneda lemma, the same data as a single element of \(X(A)\), namely the element \(\alpha_A(1_A)\) to which the isomorphism corresponds. The question is which elements arise this way, and the answer names the elements that deserve to be called universal.

Corollary: Representations are Universal Elements

Let \(\mathscr{A}\) be a locally small category and \(X : \mathscr{A}^{\mathrm{op}} \to \mathbf{Set}\) a presheaf. To give a representation of \(X\) is to give an object \(A \in \mathscr{A}\) together with an element \(u \in X(A)\) with the following property: \[ \begin{align*} &\text{for each } B \in \mathscr{A} \text{ and each } x \in X(B), \\\\ &\text{there is a unique map } \bar{x} : B \to A \text{ with } \big(X(\bar{x})\big)(u) = x . \end{align*} \] An element \(u\) with this property is called a universal element of \(X\).

Proof.

By the Yoneda lemma, an element \(u \in X(A)\) corresponds to a natural transformation \(\widetilde{u} : H_A \to X\), and a representation of \(X\) is exactly a choice of \(A\) for which the corresponding \(\widetilde{u}\) is a natural isomorphism. By the componentwise criterion, a natural transformation is a natural isomorphism precisely when each of its components is an isomorphism, and an isomorphism of sets is a bijection, so \(\widetilde{u}\) is an isomorphism if and only if, for every \(B \in \mathscr{A}\), the component \[ \widetilde{u}_B : H_A(B) = \mathscr{A}(B, A) \to X(B) \] is a bijection.

By construction of the backward map in the Yoneda lemma, \(\widetilde{u}_B(\bar{x}) = \big(X(\bar{x})\big)(u)\) for a map \(\bar{x} : B \to A\). The assertion that this component is a bijection is exactly the assertion that for each \(x \in X(B)\) there is a unique \(\bar{x} : B \to A\) with \(\big(X(\bar{x})\big)(u) = x\), which is the displayed property. Requiring it for all \(B\) is requiring \(\widetilde{u}\) to be an isomorphism, hence requiring \((A, u)\) to be a representation.

The pairs \((B, x)\) with \(B \in \mathscr{A}\) and \(x \in X(B)\) are, in the light of the Yoneda lemma, the elements of the presheaf \(X\). Such an \(x\) is a generalized element of \(X\) of shape \(H_B\). The corollary says that a representation singles out one element \(u\), sitting at the representing object, through which every other factors uniquely. This is the meaning that the word universal has carried throughout. A universal element is one from which all others are reached in exactly one way.

The corollary was stated for a presheaf, a contravariant functor, where the universal element sits at \(A\) and every other element factors through a map into \(A\). Every example below is instead a covariant functor \(X : \mathscr{A} \to \mathbf{Set}\), for which the statement dualizes. A representation is then an object \(A\) and an element \(u \in X(A)\) such that for each \(B\) and each \(x \in X(B)\) there is a unique map \(\bar{x} : A \to B\) with \(\big(X(\bar{x})\big)(u) = x\). The only change is that the factoring map now points out of the representing object, as the change of variance forces. The content is identical, and the familiar constructions of algebra take this covariant form.

The free-forgetful case in two voices

A single example shows the corollary doing its characteristic work, which is to reveal that a statement one already knew in an explicit form is the same as a statement one knew in a slicker form. For a fixed set \(S\), consider the functor sending a vector space \(V\) over a field \(k\) to the set \(\mathbf{Set}\big(S, U(V)\big)\) of functions from \(S\) into the underlying set of \(V\). There are two familiar and true statements about it.

The first says that there exist a vector space \(F(S)\) and an isomorphism \[ \mathbf{Vect}_k\big(F(S), V\big) \cong \mathbf{Set}\big(S, U(V)\big) , \] natural in \(V\). This is the free-forgetful adjunction. The second says that there exist a vector space \(F(S)\) and a function \(u : S \to U\big(F(S)\big)\) such that every function \(f : S \to U(V)\) factors as \(U(\bar{f}) \circ u\) for a unique linear map \(\bar{f} : F(S) \to V\). This is the universal property of the basis inclusion. The first is the compact statement that the functor is representable, and the second is the explicit statement that \(u\) is a universal element.

The second looks at first to assert more than the first, for it specifies not merely that the two functors are isomorphic but that the isomorphism arises in a particular way, through composition with the single function \(u\). The corollary dispels the appearance. Representations and universal elements are in bijection, so every natural isomorphism of the first kind comes from a universal element of the second kind, and nothing is hidden by the word natural except the explicit element it conceals. The slick statement and the hands-on statement are one.

Universal elements of an adjunction and of a forgetful functor

The pattern is not confined to vector spaces. For any adjunction \(F \dashv G\) with \(F : \mathscr{A} \to \mathscr{B}\) and \(G : \mathscr{B} \to \mathscr{A}\) between locally small categories, and any fixed \(A \in \mathscr{A}\), the functor \(\mathscr{A}(A, G(-))\) is representable, represented by \(F(A)\). Read through the present corollary, the universal element of this representation is the unit \(\eta_A : A \to G(F(A))\), and the universal property it satisfies is precisely the statement that \(\eta_A\), regarded as an object of the relevant comma category, is initial. The same fact was met earlier as a reformulation of adjointness and is now seen again from the side of representability.

The smallest instance is the most familiar. For the forgetful functor \(U : \mathbf{Grp} \to \mathbf{Set}\), the element \(1 \in U(\mathbb{Z})\) is a universal element. Every group element \(x \in U(G)\) is the image of \(1\) under a unique homomorphism \(\phi : \mathbb{Z} \to G\), because a homomorphism out of the infinite cyclic group is fixed freely by where it sends the generator. So \(\mathbb{Z}\) represents the forgetful functor, with universal element \(1\).

The choice of \(1\) was not forced. The element \(-1\) generates \(\mathbb{Z}\) just as well and furnishes a second universal element, hence a second representation. The corollary's bijection between universal elements and representations guarantees that these two are genuinely different representations, not the same one described twice. Once the embedding theorem is in hand, we return to count the representations exactly.

The Yoneda Embedding is Full and Faithful

The second consequence redeems the promise of the previous page. The Yoneda embedding sends each object \(A\) to the presheaf \(H_A\) and each map to post-composition with it. The word embedding was used in anticipation, and we now justify it by showing that the functor is full and faithful, so that a map between two representables is the same thing as a map between the objects they represent.

Corollary: The Yoneda Embedding is Full and Faithful

For any locally small category \(\mathscr{A}\), the Yoneda embedding \[ H_\bullet : \mathscr{A} \to [\mathscr{A}^{\mathrm{op}}, \mathbf{Set}] \] is full and faithful. Informally, for objects \(A, A' \in \mathscr{A}\), a natural transformation \(H_A \to H_{A'}\) of presheaves is the same thing as a map \(A \to A'\) in \(\mathscr{A}\).

Proof.

Full and faithful means that for each pair \(A, A'\) the function \[ \mathscr{A}(A, A') \to [\mathscr{A}^{\mathrm{op}}, \mathbf{Set}](H_A, H_{A'}), \quad f \mapsto H_f , \] sending a map to the natural transformation it induces, is a bijection. Apply the Yoneda lemma with the presheaf \(X\) taken to be \(H_{A'}\). It supplies a bijection \[ [\mathscr{A}^{\mathrm{op}}, \mathbf{Set}](H_A, H_{A'}) \cong H_{A'}(A) = \mathscr{A}(A, A') , \] whose forward direction sends a natural transformation \(\alpha\) to \(\widehat{\alpha} = \alpha_A(1_A)\).

It is therefore enough to check that this Yoneda bijection and the function \(f \mapsto H_f\) are mutually inverse, for which it suffices to compute one composite. Given \(f : A \to A'\), the transformation \(H_f\) is sent by the Yoneda bijection to \[ \widehat{H_f} = (H_f)_A(1_A) = f \circ 1_A = f , \] since the component of \(H_f\) at \(A\) is post-composition by \(f\). Thus \(f \mapsto H_f\) followed by the Yoneda bijection returns \(f\). As the Yoneda map is already a bijection, the function \(f \mapsto H_f\) is its inverse and hence a bijection itself. The embedding is full and faithful.

A full and faithful functor earns the name embedding. Such a functor, say \(J\), is full, faithful, and essentially surjective onto the full subcategory of its codomain whose objects are those isomorphic to some \(J(A)\), so by the characterization of equivalences it makes its domain equivalent to that full subcategory. Thus \(\mathscr{A}\) is realized, up to equivalence, as the full subcategory of \([\mathscr{A}^{\mathrm{op}}, \mathbf{Set}]\) whose objects are the representables. Every locally small category sits inside its presheaf category as the representable presheaves, with all and only the maps it already had.

What a full and faithful functor preserves

Embeddings of this kind transport isomorphisms faithfully in both directions, a fact used repeatedly below and worth isolating.

Lemma: Full and Faithful Functors Reflect Isomorphism

Let \(J : \mathscr{A} \to \mathscr{B}\) be full and faithful, and let \(A, A' \in \mathscr{A}\). Then:

(a) a map \(f\) in \(\mathscr{A}\) is an isomorphism if and only if \(J(f)\) is an isomorphism in \(\mathscr{B}\).

(b) for any isomorphism \(g : J(A) \to J(A')\) in \(\mathscr{B}\), there is a unique isomorphism \(f : A \to A'\) in \(\mathscr{A}\) with \(J(f) = g\).

(c) the objects \(A\) and \(A'\) are isomorphic in \(\mathscr{A}\) if and only if \(J(A)\) and \(J(A')\) are isomorphic in \(\mathscr{B}\).

Proof.

(a)
A functor preserves identities and composites, so if \(f\) has a two-sided inverse \(f^{-1}\) then \(J(f)\) has the two-sided inverse \(J(f^{-1})\). This direction needs no hypothesis on \(J\). Conversely, suppose \(J(f) : J(A) \to J(A')\) is an isomorphism, with inverse \(h : J(A') \to J(A)\). Since \(J\) is full, \(h = J(k)\) for some \(k : A' \to A\). Then \[ \begin{align*} J(k \circ f) &= J(k) \circ J(f) \\\\ &= h \circ J(f) \\\\ &= 1_{J(A)} \\\\ &= J(1_A) , \end{align*} \] and \(J\) faithful forces \(k \circ f = 1_A\). Symmetrically, \(f \circ k = 1_{A'}\). So \(f\) is an isomorphism with inverse \(k\).

(b)
Given an isomorphism \(g : J(A) \to J(A')\), fullness provides \(f : A \to A'\) with \(J(f) = g\), and by part (a) this \(f\) is an isomorphism. If \(J(f) = J(f') = g\), then faithfulness gives \(f = f'\), so \(f\) is unique.

(c)
If \(A \cong A'\) in \(\mathscr{A}\) then applying \(J\) to an isomorphism gives one between \(J(A)\) and \(J(A')\), by the easy direction of (a). Conversely an isomorphism \(J(A) \to J(A')\) is lifted to an isomorphism \(A \to A'\) by (b). Hence \(A \cong A'\) if and only if \(J(A) \cong J(A')\).

Counting the representations of the forgetful functor

The deferred count can now be settled. The forgetful functor \(U : \mathbf{Grp} \to \mathbf{Set}\) is represented by \(\mathbb{Z}\), so the covariant hom-functor \(H^{\mathbb{Z}}\) is naturally isomorphic to \(U\). How many such natural isomorphisms \(H^{\mathbb{Z}} \xrightarrow{\sim} U\) are there? Since \(H^{\mathbb{Z}} \cong U\), they are as numerous as the natural isomorphisms \(H^{\mathbb{Z}} \xrightarrow{\sim} H^{\mathbb{Z}}\), which are as numerous as the group isomorphisms \(\mathbb{Z} \xrightarrow{\sim} \mathbb{Z}\).

The last step is the embedding theorem read in the opposite category \(\mathbf{Grp}^{\mathrm{op}}\). Passing to the opposite category turns \(H^{\mathbb{Z}}\) into the presheaf \(H_{\mathbb{Z}}\) on \(\mathbf{Grp}^{\mathrm{op}}\), and \(\mathbf{Grp}^{\mathrm{op}}\) is again locally small. The corollary and part (b) of the lemma therefore match the natural isomorphisms \(H^{\mathbb{Z}} \xrightarrow{\sim} H^{\mathbb{Z}}\) with the isomorphisms \(\mathbb{Z} \to \mathbb{Z}\) in \(\mathbf{Grp}^{\mathrm{op}}\), and these are the isomorphisms of \(\mathbf{Grp}\) with their arrows reversed. The integers have exactly two automorphisms as a group, the identity and negation, corresponding to the two generators \(\pm 1\). There are therefore exactly two natural isomorphisms \(H^{\mathbb{Z}} \xrightarrow{\sim} U\). By the bijection between representations and universal elements, there are exactly two universal elements of \(U(\mathbb{Z})\), namely \(1\) and \(-1\). The two representations found earlier are all of them.

Objects Known by Their Representables

The third consequence turns the embedding into a principle of identity. If the passage from an object to its representable loses nothing, then objects with isomorphic representables must be isomorphic. The precise statement collects both variances at once.

Corollary: Isomorphism of Representables

Let \(\mathscr{A}\) be a locally small category and \(A, A' \in \mathscr{A}\). Then \[ H_A \cong H_{A'} \iff A \cong A' \iff H^A \cong H^{A'} , \] where \(H_A, H_{A'}\) are the contravariant representables and \(H^A, H^{A'}\) the covariant ones.

Proof.

The second equivalence follows from the first applied to \(\mathscr{A}^{\mathrm{op}}\). Reversing arrows turns \(H^A\) into the contravariant representable of \(\mathscr{A}^{\mathrm{op}}\) at \(A\), leaves local smallness intact, and preserves the relation \(A \cong A'\). So it suffices to prove the first, \(H_A \cong H_{A'} \iff A \cong A'\). The Yoneda embedding \(H_\bullet\) was just shown to be full and faithful, and a full and faithful functor reflects and preserves isomorphism of objects. Hence \(A \cong A'\) if and only if \(H_\bullet(A) \cong H_\bullet(A')\), that is, if and only if \(H_A \cong H_{A'}\). This is exactly the asserted equivalence.

One direction is the easy half and deserves separate mention, since it holds for any functor at all. Isomorphisms are preserved by every functor, so \(A \cong A'\) always implies \(H_A \cong H_{A'}\). The substance of the corollary is the converse, that isomorphic representables force the objects themselves to be isomorphic.

Writing \(\mathscr{A}(B, A)\) as \(A\) viewed from \(B\), the converse says that two objects agreeing in every view are isomorphic. If a thing looks the same from every vantage point, it is the same up to isomorphism. This is the categorical form of the maxim that a creature looking, walking, and sounding like a duck is one. Here being a duck means being isomorphic to one, not being literally identical to it. Categorically an object is known only up to isomorphism, and the corollary respects that by concluding \(A \cong A'\), never \(A = A'\).

How much a single view reveals

The corollary requires agreement in all views, taken compatibly, that is, naturally in \(B\). No single view suffices in general, and the category of groups shows how partial the information from one vantage point can be. Suppose two groups \(A\) and \(A'\) satisfy \(H_A(B) \cong H_{A'}(B)\) for some particular \(B\), meaning they admit the same number of homomorphisms from \(B\).

Viewed from the trivial group, \(H_A(1) = \mathbf{Grp}(1, A)\) is a one-element set for every \(A\), so agreement there says nothing whatever. Viewed from the infinite cyclic group, \(H_A(\mathbb{Z})\) is the underlying set of \(A\), so agreement says only that \(A\) and \(A'\) have the same number of elements, not how they multiply.

Viewed from a cyclic group of prime order, \(H_A(\mathbb{Z}/p\mathbb{Z})\) counts the elements of \(A\) whose order divides \(p\), so agreement for every prime says \(A\) and \(A'\) have the same number of elements of each prime order. That constraint is real, but still far short of isomorphism. The cyclic group \(\mathbb{Z}/8\mathbb{Z}\) and the quaternion group \(Q_8 = \{\pm 1, \pm i, \pm j, \pm k\}\) both have order \(8\) and a single element of order \(2\), so they agree in every view named so far, yet they are not isomorphic. Each view contributes a fragment, and only the demand that all of them agree, and agree naturally, assembles the fragments into the conclusion \(A \cong A'\).

The exceptional simplicity of sets

Against this background the category of sets is exceptional. For any set \(A\), \[ A \cong \mathbf{Set}(1, A) = H_A(1) , \] so the single view from the one-element set already recovers the whole set up to isomorphism. Two sets that look the same from the one-point set are isomorphic, that is, in bijection. The reason is that the only thing a set carries, categorically, is the supply of maps into it from a point, and these are exactly its elements. For a general category the corollary insists on all views. For sets, one view is enough, namely the generalized elements of shape \(1\). The contrast measures how much structure an object can hide from any fixed probe. In \(\mathbf{Set}\) it can hide none, while in \(\mathbf{Grp}\) it can hide a great deal, recoverable only by probing from every shape at once.

Uniqueness from Universal Properties

The three consequences combine into a tool used constantly in practice. An object defined by a universal property is determined up to isomorphism, and that isomorphism is itself canonical. The reasoning is always the same. A universal property presents an object as the representing object of some functor. Isomorphic representables force isomorphic objects, so any two solutions of the same universal property are isomorphic. The isomorphism is canonical because it is not merely known to exist. Two representations \((A, u)\) and \((A', u')\) of the same presheaf \(X\) give a specific natural isomorphism \(H_A \cong X \cong H_{A'}\), and the lemma's part (b) lifts it to a unique isomorphism \(A \to A'\), namely the map that the universal property of \(u'\) assigns to \(u\). We draw out two instances. The first settles a uniqueness that had earlier been asserted but not proved, and the second recasts a uniqueness that had been proved by hand.

Left adjoints are unique

Suppose a functor \(G : \mathscr{B} \to \mathscr{A}\) has two left adjoints, \(F\) and \(F'\). For each object \(A \in \mathscr{A}\), the two adjunctions give natural isomorphisms \[ \mathscr{B}(F(A), B) \cong \mathscr{A}(A, G(B)) \cong \mathscr{B}(F'(A), B) , \] natural in \(B\). The outer two functors are the covariant representables \(H^{F(A)}\) and \(H^{F'(A)}\), so the composite is a natural isomorphism \(H^{F(A)} \cong H^{F'(A)}\). By the isomorphism-of-representables corollary, \(F(A) \cong F'(A)\). It remains to see that these isomorphisms can be chosen natural in \(A\), so that \(F \cong F'\) as functors.

Write \(\varphi_{A,B} : \mathscr{B}(F'(A), B) \to \mathscr{B}(F(A), B)\) for the composite bijection, read from right to left, and set \(\theta_A = \varphi_{A, F'(A)}(1_{F'(A)}) : F(A) \to F'(A)\). Naturality in \(B\) says that \(\varphi_{A,B}(g \circ h) = g \circ \varphi_{A,B'}(h)\) for \(h : F'(A) \to B'\) and \(g : B' \to B\), and taking \(h = 1_{F'(A)}\) gives \[ \varphi_{A,B}(g) = g \circ \theta_A \quad \text{for every } g : F'(A) \to B . \] The inverse bijection has the same form, \(\varphi_{A,B}^{-1}(h) = h \circ \theta'_A\) for some \(\theta'_A : F'(A) \to F(A)\), and applying the two formulas to identity maps shows \(\theta_A \circ \theta'_A = 1_{F'(A)}\) and \(\theta'_A \circ \theta_A = 1_{F(A)}\), so \(\theta_A\) is an isomorphism.

Both adjunction bijections are also natural in \(A\), and a composite of natural bijections is natural, so for a map \(a : A \to A''\) in \(\mathscr{A}\) and every \(g' : F'(A'') \to B\) we have \(\varphi_{A,B}(g' \circ F'(a)) = \varphi_{A'',B}(g') \circ F(a)\). Taking \(B = F'(A'')\) and \(g' = 1_{F'(A'')}\) yields \[ F'(a) \circ \theta_A = \theta_{A''} \circ F(a) , \] which is the naturality square for \(\theta : F \to F'\). Each component is an isomorphism, so \(\theta\) is a natural isomorphism \(F \cong F'\). A left adjoint, when it exists, is therefore unique up to natural isomorphism, which proves the uniqueness asserted when adjunctions were first introduced. Dually, right adjoints are unique.

The tensor product, revisited

The second instance revisits the tensor product, already met as an example of a representable functor. For finite-dimensional real vector spaces \(U\) and \(V\), the functor sending a space \(W\) to the set of bilinear maps \(U \times V \to W\) is representable. There is a space \(T\) and a natural isomorphism \[ \{\text{bilinear } U \times V \to W\} \cong \mathbf{Vect}_{\mathbb{R}}(T, W), \quad \text{natural in } W , \] and the representing object is the tensor product \(U \otimes V\), whose characteristic property asserts exactly this natural isomorphism. That property was proved together with the statement that it determines \(U \otimes V\) up to a unique isomorphism, and the proof there was by hand, playing the two universal maps against each other. The corollary now exhibits that uniqueness as an instance of a general principle. Any two spaces representing the same functor are isomorphic, so up to isomorphism there is at most one space \(T\) with the displayed property, whatever the details of its construction.

The definite article in the tensor product is earned by the uniqueness, and the uniqueness is an instance of the Yoneda principle. The functor determines its representing object, if one exists, and the tensor product is what that object is called.

Why a universal property is a specification

The pattern licenses a habit of definition that runs throughout modern mathematics and its computational descendants. To define an object by a universal property is to specify the functor it represents rather than to build the object by hand. The corollary guarantees that the specification has at most one solution up to canonical isomorphism, so the construction details may be forgotten once existence is known. Products, quotients, free objects, limits, and tensor products are each named by what they are universal for, and each is interchangeable with any other object satisfying the same universal property.

In settings where objects are built compositionally, this is the pattern behind replacing a component by any implementation meeting the same interface without disturbing what surrounds it. The universal property is the interface, and the Yoneda principle guarantees that the interface determines the component up to the only kind of sameness that matters.