Let $\varphi:A \rightarrow B$ be a ring morphism. Consider the corresponding map of schemes, $f: Spec\ B \rightarrow Spec\ A$. This map $f$ is given by $\varphi ^{-1},$ since prime ideals pull back to prime ideals. Let's denote $X=Spec\ B$ and $Y=Spec\ A$ so $f:X \rightarrow Y.$ We also have a map of sheaves $f^\# : \mathcal{O}_Y \rightarrow f_*\mathcal{O}_X,$ which by adjointness is equivalent to $f_\# :f^* \mathcal{O}_Y \rightarrow \mathcal{O}_X.$ I know that the map of sheaves (actually I mean the map on global sections of the sheaves) is supposed to be $\varphi:A \rightarrow B,$ and I know $\mathcal{O}_X=B$ and $\mathcal{O}_Y = A.$ So what exactly are $f^\#, f_\#, f_*\mathcal{O}_X,$ and $f^*\mathcal{O}_Y$ ?

I've looked at the definitions for direct image and inverse image sheaf, and neither seem very helpful. For example, $f_*\mathcal{O}_X$ is given by the following: for every open subset $U\subset Y, \ f_* \mathcal{O}_X (U):=\mathcal{O}_X(f^{-1}(U))$ . But I said $f=\varphi^{-1}$ so then $f^{-1}=\varphi,$ which doesn't make sense because prime ideals do not always map to prime ideals.

• I don't think it makes sense to treat ${}^{-1}$ the way you do in the last sentence if $f$ is not invertible. What text are you reading that doesn't spell out the definition of $f^\#$? That seems very cruel.
– Hoot
Commented Jun 1, 2015 at 17:17
• Note that the definitions for the direct and inverse image sheafs work in the context of general topological spaces. (That is, whenever $f\colon X \to Y$ is any continuous map between arbitrary topological spaces.) It might actually be easier to understand the definitions in this general context first, forgetting about all the scheme stuff. Besides, note that the assertion $\mathcal{O}_X = B$ is wrong (indeed, the left object is a sheaf of rings and the right object is just one ring) - what really holds is $\mathcal{O}_X(X) = B$ (you have to make the analog correction for $Y$, of course). Commented Jun 1, 2015 at 20:43

It doesn't make sense to say that $f^{-1} = \varphi$. Remember, $\varphi$ is a function that takes an element of $A$ and gives us an element of $B$, whereas $\varphi^{-1}$ is a function that takes a subset of $B$ and gives us a subset of $A$; in particular, it is not the inverse function of $\varphi$ (which probably doesn't even exist, since $\varphi$ is usually not going to be an isomorphism).
In general it's going to be pretty messy to describe what these maps look like for arbitrary choices of $U$, since an arbitrary open set $U$ is just the complement of some arbitrary collection of closed sets. However, we know that the open sets $D_f$ form a basis for the topology, and it's not too hard to describe what the maps
$$f^\#_{D_f} : \mathcal{O}_Y(D_f) \to (f_\ast \mathcal{O}_X)(D_f)$$