# 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?

Any right adjoint $$R$$ to a cocontinuous functor $$L:\widehat{\mathcal{C}}\to \mathcal E$$ from a presheaf category is defined by $$R(e)(c)=\mathcal E(L(y_c),e)$$. So the right adjoint $$R$$ of $$f_*$$ is defined by $$R(H)(c)=\widehat{\mathcal{D}}(f(y_c),H)=\widehat{\mathcal D}(y_{F(c)},H)=H(F(c)),$$ showing $$R$$ coincides with $$f$$, as desired.
By the way, your notation choices could be improved, as there's no notation connection between $$F$$ and $$f$$. A common options are to call $$f$$, instead, $$F^*$$, to give the impression of "pullback of presheaves along $$F$$"; of course, one could also just write this as $$(-)\circ F$$ to be quite transparent. The right Kan extension is sometimes denoted by $$F_*$$, close to the notation you chose for the left, in which case the left Kan extension would be denoted $$F_!$$. Again, there is also the more explicit option of $$\mathrm{Ran}_F$$ and $$\mathrm{Lan}_F$$, respectively.