Vakil's Exercise 1.3.K.(a): Ring homomorphism and induced module structure on tensor product This exercise is from Vakil's Foundations of Algebraic Geometry:

Exercise 1.3.K. (a) If $M$ is an $A$-module and $A \to B$ is a morphism of rings, give $B \otimes_A M$ the structure of a $B$-module.

What I worked out so far:


*

*In order for $B \otimes_A M$ to make sense, $B$ must be an $A$-module. But $B$ can be considered an $A$-module indeed by defining the scalar multiplication by $b \cdot a := \varphi(a) \cdot b$ where $a \in A$, $b \in B$ and $\varphi: A \to B$ is the ring map from the assumption.

*If $B \otimes_A M$ should be a $B$-module, we need a $B$-module structure on both $B$ and $M$ as well.  For $B$, we could just define the scalar multiplication through the ring multiplication.  However, I struggle to find a suitable scalar multiplication on $M$. If $\varphi$ would be bijective, we could could set $b \cdot m := \varphi^{-1}(b) \cdot M$ since $M$ has an $A$-module structure. However, the map $\varphi$ is not bijective in general.


Could you please help me with this problem? Thanks a lot!
 A: You do not need $M$ to be a $B$-module here. For $B \otimes_A M$ to be a $B$-module, you need to tell me what I should do with $b \cdot (b' \otimes m)$. It seems you already know the answer.
A: Fact : a $C$-module $P$ is the same as an abelian group $P$ equipped with a rings arrow $C \to \textrm{End}_{\mathbf{Z}} (P)$.
Now $B \otimes_A M$ is indeed an $A$-module so it is an abelian group. To give a rings arrow $B \to \textrm{End}_{\mathbf{Z}} (B \otimes_A M)$ you start from the rings arrow $\varphi : A \to \textrm{End}_{\mathbf{Z}}(M)$ that you tensor with $B$ to get $\varphi_B : B \otimes_ A A \to B \otimes_ A  \textrm{End}_{\mathbf{Z}}(M)$ that you compose with the $B \otimes_ A  \textrm{End}_{\mathbf{Z}}(M) \to  \textrm{End}_{\mathbf{Z}}(B \otimes_ A M)$ sending $b\otimes u$ to the $v$ defined by $v(b' \otimes m) = b' \otimes u(m)$. This gives you a $B \otimes_A A \to \textrm{End}_{\mathbf{Z}}(B \otimes_ A M)$ and finally a rings arrow $B \to \textrm{End}_{\mathbf{Z}}(B \otimes_ A M)$.
