TITLE: Hartshorne's Exercise II.5.1 - Projection formula
QUESTION [7 upvotes]: I'm trying to solve Exercise 5.1 of Chapter II of Hartshorne - Algebraic Geometry.
I'm fine with the first $3$ parts, but I'm having troubles with the very last part, which asks to prove the projection formula:

Let $f:X\to Y$ be a morphism of ringed spaces, $\mathscr{F}$ an $\mathcal{O}_X$-module and $\mathcal{E}$ a locally free $\mathcal{O}_Y$-module of finite rank. Then there is a natural isomorphism
  $$ f_*(\mathscr{F}\otimes f^*\mathcal{E}) \;\cong\; f_*(\mathscr{F})\otimes \mathcal{E} $$

After thinking quite a long time about it, I checked on the internet and I found the following solution:

$$
\begin{eqnarray} 
f_*(\mathscr{F}\otimes f^*\mathcal{E}) 
&\;\cong\;& f_*(\mathscr{F}\otimes \mathcal{O}_X^{\,n}) \\\\
&\;\cong\;& f_*(\mathscr{F}\otimes \mathcal{O}_X)^{n} \\\\ 
&\;\cong\;& f_*(\mathscr{F})^{n} \\\\ 
&\;\cong\;& f_*(\mathscr{F})\otimes \mathcal{O}_Y^{\,n} \\\\ 
&\;\cong\;& f_*(\mathscr{F})\otimes \mathcal{E} \\\\ 
\end{eqnarray}
$$

Is this correct? If it is, could you explain me why do we have the isomorphism
$$ f_*(\mathscr{F}\otimes \mathcal{O}_X^{\,n})
\;\cong\; f_*(\mathscr{F}\otimes \mathcal{O}_X)^{n} \quad ?  $$

REPLY [2 votes]: Consider the morphism 
$$
 f^*(f_* \mathscr{F} \otimes_{\mathscr{O}_Y} \mathscr{E}) \simeq f^* f_* \mathscr{F} \otimes_{\mathscr{O}_X} f^* \mathscr{E} \to \mathscr{F} \otimes_{\mathscr{O}_X} f^* \mathscr{E}
$$
obtained by tensoring the morphism $f^* f_* \mathscr{F} \to \mathscr{F}$ with $f^* \mathscr{E}$ over $\mathscr{O}_X$. By the push-pull adjunction, this corresponds to a morphism 
$$
 f_* \mathscr{F} \otimes_{\mathscr{O}_Y} \mathscr{E} \to f_*(\mathscr{F} \otimes_{\mathscr{O}_X} f^* \mathscr{E}). 
$$
Note that it is defined by "doing nothing to sections", e.g. if $U \subseteq X$ is an open subset, $s \in \mathscr F(f^{-1}(U))$ and $t \in \mathscr E(U)$, then the morphism of presheaves associated to the tensor product sends $s \otimes t$ to the section $s \otimes (1 \otimes [(U,t)])$ of $\mathscr F \otimes_{\mathscr O_X} f^* \mathscr E$ over $f^{-1}(U)$  (recall that $f^*\mathscr E = \mathscr O_X \otimes_{f^{-1} \mathscr O_Y} f^{-1} \mathscr E$, hence the direct limit of sheaves notation $[(U,t)]$). If you are curious as to why, look at what the push-pull adjunction does to morphisms and the isomorphism of $f^*$ commuting with tensor products. 
To check that it is an isomorphism when $\mathscr{E}$ is locally free, we may work locally, which means we may assume $\mathscr{E}$ is free of finite rank. Because both sides commute with direct sums (they are all compositions of additive functors), we may assume $\mathscr{E} = \mathscr{O}_Y$. We have isomorphisms
$$
 f_* \mathscr{F} \otimes_{\mathscr{O}_Y} \mathscr{O}_Y \simeq f_* \mathscr{F} \simeq f_*(\mathscr{F} \otimes_{\mathscr{O}_X} \mathscr{O}_X) \simeq f_* (\mathscr{F} \otimes_{\mathscr{O}_X} f^* \mathscr{O}_Y). 
$$
Since this morphism corresponds to the morphism $f^*(f_* \mathscr{F} \otimes_{\mathscr{O}_Y} \mathscr{O}_Y) \to \mathscr{F} \otimes_{\mathscr{O}_X} f^* \mathscr{O}_Y$ (because it also "does nothing to sections" as above), we see that our morphism is an isomorphism by the pull-push adjunction. 
Hope that helps,