# How does the $2$-Yoneda embedding for the category of categories act on 2-morphisms?

Let $$\text{Cat}$$ be the category of small categories. I am interested in the Yoneda embedding

$$Y : \text{Cat}^{op} \rightarrow [\text{Cat}, \text{Cat}]$$

$$Y$$ is a $$2$$-functor- it can be applied to categories (objects in $$X$$), functors ($$1$$-morphisms in $$X$$), and natural transformations ($$2$$-morphisms). $$Y(C)$$ is a functor (an object in $$[\text{Cat}, \text{Cat}]$$). $$Y(C)(D) = [C, D]_{\text{Cat}}$$. $$Y(F)$$ is a natural transformation (a $$1$$-morphism in $$[\text{Cat}, \text{Cat}]$$).

My question is about $$Y(\eta)$$ for a natural transformation $$\eta : F \implies G$$ ($$2$$-morphism in $$C$$). I can't seem to work out what the data of $$Y(\eta)$$ is - it should be a $$2$$-morphism in $$[\text{Cat}, \text{Cat}]$$.


Let's do this a little more generally. Let $$\C$$, $$\D$$ be (strict) 2-categories. Then $$[\C,\D]$$ should also be a (strict) 2-category, and we want to understand the 0, 1, and 2-cells.

0-cells:

The objects are strict 2-functors, i.e., functors $$F:\C\to \D$$ which act on objects, morphisms, and 2-morphisms subject to compatibility criteria. More concretely, once we've decided where $$F$$ sends objects, then the maps on hom categories $$F_{X,Y} : \C(X,Y)\to \D(X,Y)$$ should all be functors, and moreover, $$\require{AMScd} \begin{CD} \C(Y,Z)\times \C(X,Y) @>\circ_{\C,X,Y,Z}>>\C(X,Z)\\ @VF_{Y,Z}\times F_{X,Y}VV @VVF_{X,Z}V\\ \D(FY,FZ)\times \D(FX,FY) @>\circ_{\D,FX,FY,FZ}>>\D(FX,FZ)\\ \end{CD}$$ should strictly commute.

1-cells:

The morphisms are (strictly) natural families of 1-cells. I.e., given $$F,G:\C\to \D$$, a 1-cell from $$F$$ to $$G$$ is a family $$T_X : FX\to GX$$ of 1-cells in $$\D$$, subject to the requirement that the usual diagram commute strictly for each 1-cell $$f:X\to Y$$ in $$\C$$: $$\begin{CD} FX @>Ff>> FY\\ @VT_X VV @VVT_Y V \\ GX @>Gf>> GY. \\ \end{CD}$$

2-cells:

Let $$F,G :\C \to \D$$ be 2-functors, $$T,S : F\to G$$ be 1-cells between them. A 2-cell $$\alpha : T \to S$$ is a natural family of 2-cells. More concretely, it is the choice for every $$X\in C$$ of a 2-cell in $$\D$$, $$\alpha_X : T_X\to S_X$$ natural in the sense that for every 1-cell of $$\C$$, $$f:X\to Y$$, we have that the following 2-cells from $$G(f)\circ T_X = T_Y\circ F(f)$$ to $$G(f)\circ S_X = S_Y\circ F(f)$$ are equal. The two cells are the whiskered composites $$G(f).\alpha_X$$ and $$\alpha_Y.F(f)$$.

Applying this to $$\C=\D=\Cat$$

Given a 2-cell $$\eta : F\to G$$ in $$\Cat$$, we need to produce for each category $$C$$ a 2-cell $$Y(\eta)_C : Y(F)_C\to Y(G)_C$$.

If $$X$$ and $$Y$$ are the categories such that $$F,G:X\to Y$$, then $$Y(F)_C: [Y,C]\to [X,C]$$ is the functor $$-\circ F$$, and similarly for $$G$$. Then $$Y(\eta)_C$$ should be the whiskered composite $$-.\eta$$.

In other words, for any functor $$K:Y\to C$$, for all $$x\in X$$, by definition, $$\eta_X : FX\to GX$$, so $$K.\eta_X = K(\eta_X) : KFX\to KGX$$ is a natural transformation.