TITLE: Question regarding adjoint functors
QUESTION [5 upvotes]: Suppose $B \rightarrow A$ is a morphism of rings. If $M$ is an $A$-module, one can create
$M_B$ by considering it as a $B$-module. This gives a functor $\cdot_B: \mathrm{Mod}_A \rightarrow \mathrm{Mod}_B$. The exercise I am working on says to show that this functor is right adjoint to $\cdot \otimes_B A$ by showing 
that
$$
\mathrm{Hom}_A(N \otimes_BA,M) \cong \mathrm{Hom}_B(N,M_B)
$$
functorial in both arguments. 
What I am confused with is for the above isomorphism, what kind of morphism do I need?
Would morphism of sets suffice or does it have to be morphisms of $B$-modules? Thanks!

REPLY [2 votes]: This is actually a special case of the adjunction between Hom and tensor; the $\cdot_B$ functor can be seen as a Hom:
$$
M_B\cong\operatorname{Hom}_B(A,M)
$$
the natural isomorphism being $x\mapsto\hat{x}$, where $\hat{x}(a)=xa$. This is natural in a very easy way: basically, the definition of the morphism doesn't depend on $M$. The inverse is the map $f\in\operatorname{Hom}_B(A,M)\mapsto f(1)\in M$. 
Then one can apply the general fact that the functor ${-}\otimes_B A$ is a left adjoint of $\operatorname{Hom}_B(A,{-})$.
But you can write explicitly the isomorphism
$$
\operatorname{Hom}_A(N \otimes_BA,M) \cong \operatorname{Hom}_B(N,M_B)
$$
in the following way. First, for $f\in\operatorname{Hom}_A(N \otimes_BA,M)$, define $\hat{f}\colon N\to M$ by
$$
\hat{f}(y)=f(y\otimes 1)
$$
and verify $\hat{f}\in\operatorname{Hom}_B(N,M_B)$. Then, for $g\in\operatorname{Hom}_B(N,M_B)$, first define a $B$-bilinear map
$$
\bar{g}\colon N\times A\to M
$$
by $\bar{g}(y,a)=g(y)a$ and apply the universal property of the tensor product to obtain $\check{g}\in\operatorname{Hom}_A(N \otimes_BA,M)$.
Both maps $f\mapsto \hat{f}$ and $g\mapsto\check{g}$ are natural: they don't depend on $N$ and $M$ for their definition, so it's only tedious to verify naturality; moreover they are clearly inverse of one another.