# Left and right Kan extensions

Let $$F:\mathcal{C}\to\mathcal{D}$$ be a functor between small categories. We define the functor \begin{align*} f:\hat{\mathcal{D}}&\longrightarrow\hat{\mathcal{C}} \\ G&\longmapsto G\circ F^{\mathrm{op}}, \end{align*} where $$\hat{\mathcal{C}}=[\mathcal{C}^{\mathrm{op}},Sets]$$ and $$\hat{\mathcal{D}}=[\mathcal{D}^{\mathrm{op}},Sets]$$ are the presheaf categories of $$\mathcal{C}$$ and $$\mathcal{D}$$ respectively.

I want to show that $$f$$ has both left and right adjoints.

For the right adjoint, defining a functor $$f^{*}:\hat{\mathcal{C}}\to\hat{\mathcal{D}}$$ by setting $$\begin{equation*} f^{*}(H)(D):=\mathrm{Hom}_{\hat{\mathcal{C}}}(f(y_{D}),H) \end{equation*}$$ for each presheaf $$H\in\hat{\mathcal{C}}$$ and each object $$D\in\mathcal{D}$$, we get the desired right adjoint since by the Yoneda lemma we get that $$\begin{equation*} f^{*}(H)(D)\cong \mathrm{Hom}_{\hat{\mathcal{C}}}(y_{D},f_{*}(H)). \end{equation*}$$

However, I have a problem finding the left adjoint. I have a strong feeling that the desired map is the functor $$f_{*}:\hat{\mathcal{C}}\to\hat{\mathcal{D}}$$ which is induced by the composition arrow $$$${\mathcal{C}}\xrightarrow{F}{\mathcal{D}}\xrightarrow{y_{\mathcal{D}}}\hat{\mathcal{D}}$$$$ via the universal property of the Yoneda embedding $$y_{\mathcal{C}}:{\mathcal{C}}\to\hat{\mathcal{C}}$$, i.e. the unique colimit preserving functor that makes the diagram

commute. It is known that this functor has a right adjoint. I want to prove that this right adjoint is isomorphic to $$f$$.

I am having trouble showing this. I have started doubting that this map is the desired one. Any help?

That is indeed the right answer: the left adjoint is determined by what it does on (the Yoneda image of) $$\mathcal{C}$$, since it is a colimit-preserving functor, and there we have $$\mathrm{Hom}_{\hat{\mathcal{C}}}(y(c), F^* \phi)\cong\phi(Fc) \cong \mathrm{Hom}_{\hat{\mathcal{D}}}(y(Fc),\phi),$$ where $$F^*$$ is the functor given by composition with $$F$$.