TITLE: Tensor product of localization is isomorphic to localization of tensor product
QUESTION [5 upvotes]: let $R$ be a commutative ring with unity, $S$ a multiplicatively closed subset (that is $1 \in S$ and $su \in S$ for all $u,s \in S$). I want to show that 
$$S^{-1}M \otimes_{S^{-1}R}S^{-1}N \cong S^{-1}(M \otimes_R N),$$
as $S^{-1}R$-modules. 
This is my attempt: First of all I have defined a map 
$$f: S^{-1}M \times S^{-1}N \to S^{-1}(M \otimes N): (m/s_1, n/s_2) \mapsto (m\otimes_R n)/(s_1s_2)$$
and I have shown that this map is well-defined, and that it is $S^{-1}R$-bilinear. 
By definition of the tensor product $S^{-1}M \otimes_{S^{-1}R}S^{-1}N$, there exists a unique $S^{-1}R$-morphism $\theta: S^{-1}M  \otimes_{S^{-1}R}S^{-1}N \to S^{-1}(M \otimes N)$ such that $\theta \circ h = f$, where $$h(m/s_1, n/s_2) = m/s_1 \otimes n/s_2.$$
I now have an idea for a map going the other direction, $\psi$ such that $\psi \circ \theta$ is the identity and $\theta \circ \phi$ is the identity, namely 
$$\psi: S^{-1}(M \otimes N) \to S^{-1}M  \otimes_{S^{-1}R}S^{-1}N: (m \otimes n)/s \mapsto m/s \otimes n/1$$
This map satisfies the condition I wanted (composition with $\theta$ equal to the identity), but I am not able to prove that $\psi$ is well-defined, since two tensors might be equal without it being obvious...
Any help?

REPLY [4 votes]: The localization of a module $S^{-1}M$ is equivalent to $M\otimes_R S^{-1}R$ where the latter part is the localization of the ring, which gives you the usual universal property of localization. As such we have
$$S^{-1}M\otimes_{S^{-1}R}S^{-1}N\cong(M\otimes_R S^{-1}R)\otimes_{S^{-1}R}(N\otimes_R S^{-1}R)$$
which is equivalent to
$$(M\otimes_R N)\otimes_{S^{-1}R}(S^{-1}R\otimes_RS^{-1}R)\cong (M\otimes_R N)\otimes_{S^{-1}R}S^{-1}R$$
as we have the isomorphism
$\varphi((m\otimes r)\otimes(n\otimes s))=(m\otimes n)\otimes (r\otimes s)$
which is easy to show being an isomorphism.
Then by the property of module localization we have the desires result.