# What are the objects of Hom$(y,x)$ in the contra-variant Yoneda functor

I am reading about the contra-variant Yoneda functor and I am bit confused about what objects actually are in the Hom set.

More specifically, if $$Hom(-,x):\mathcal{C}^{op}\rightarrow Set$$ is the contra-variant Yoneda functor, then are the elements of $$Hom(-,x)(y) = Hom(y,x)$$ morphisms in $$\mathcal{C}$$ between $$y$$ and $$x$$? Or are they morphisms in $$\mathcal{C}^{op}$$ from $$y$$ to $$x$$, which then would correspond to morphism $$x$$ to $$y$$ in $$\mathcal{C}$$?

• Minor nit. Usually the Yoneda embedding is the functor that produces $\mathsf{Hom}(-,X)$, i.e. it is a functor $\mathcal C\to[\mathcal C^{op},\mathbf{Set}]$ were $[\mathcal D,\mathcal E]$ stands for the category of functors from $\mathcal D$ to $\mathcal E$. The idea is that $\mathcal C$ is embedded into $[\mathcal C^{op},\mathbf{Set}]$. Since this overall functor is covariant, it is the (covariant) Yoneda embedding. The other way, $\mathcal C^{op}\to[\mathcal C,\mathbf{Set}]$ is sometimes called the contravariant Yoneda embedding, though in reality they are the same thing. – Derek Elkins Feb 2 at 21:15

The confusion comes from the notation $$C^{op}$$, which is often used only to indicate that the functor is contravariant.

The covariant Yoneda lemma uses the covariant functor $$Hom(x,-):C\to Set$$, while the contravariant Yoneda lemma uses the contravariant functor $$Hom(-,x):C\to Set$$. This contravariant functor is equivalent to the covariant functor $$Hom(x,-):C^{op}\to Set$$ if we want to be strict with the notation, but as I said, usually one only means by $$C^{op}\to Set$$ that the functor is contravariant.

To sum up, $$Hom(-,x)(y)=Hom(y,x)$$ is the set of morphism $$y\to x$$ in $$C$$, which is the same as morphisms $$x\to y$$ in $$C^{op}$$.

• Great. Thanks for your answer. I will accept it when I am allowed to. – fosho Feb 2 at 13:17
• Thanks, I'm gald it helped :) – Javi Feb 2 at 13:17

Indeed, the elements of $$Hom(-,x)(y)=Hom(y,x)$$ are the morphisms from $$y$$ to $$x$$ in $$\mathcal{C}$$. For this reason, this functor is often written $$\mathcal{C}(-,x)$$ as well.

The reason why $$\mathcal{C}^{op}$$ gets involved is that this functor is contravariant. Given a morphism $$f:y \rightarrow z$$ in $$\mathcal{C}$$, the only natural way to understand $$\mathcal{C}(-,x)(f)$$ is as a function $$\mathcal{C}(z,x) \rightarrow \mathcal{C}(y,x)$$ given by composing i.e. $$g:z \rightarrow x$$ is sent to $$g \circ f: y \rightarrow z \rightarrow x$$.

This makes the functor $$\mathcal{C}(-,x)$$ contravariant on $$\mathcal{C}$$, or covariant on $$\mathcal{C}^{op}$$.