[proofplan]
We use the natural isomorphism $S^{-1}M \cong S^{-1}R \otimes_R M$ from the [Localization Is Tensor Product](/theorems/2923) theorem to reduce the problem to the adjunction between tensor product and Hom. Given $f \colon M \to L$, we define $h$ via $h(\tfrac{m}{s}) = \tfrac{1}{s}f(m)$, verify well-definedness, check $S^{-1}R$-linearity, confirm $h \circ \iota_M = f$, and prove uniqueness from the fact that elements $\tfrac{1}{1} \otimes m$ generate $S^{-1}R \otimes_R M$ as an $S^{-1}R$-module.
[/proofplan]
[step:Define $h$ and verify well-definedness]
Given the $R$-linear map $f \colon M \to L$, define
\begin{align*}
h \colon S^{-1}M &\to L, \quad \frac{m}{s} \mapsto \frac{1}{s} \cdot f(m),
\end{align*}
where $\tfrac{1}{s} \cdot f(m)$ denotes the $S^{-1}R$-module scalar action of $\tfrac{1}{s} \in S^{-1}R$ on $f(m) \in L$.
We verify $h$ is well-defined. Suppose $\tfrac{m_1}{s_1} = \tfrac{m_2}{s_2}$ in $S^{-1}M$. Then there exists $u \in S$ with $u(s_2 m_1 - s_1 m_2) = 0$ in $M$. Applying $f$ (which is $R$-linear) gives $u(s_2 f(m_1) - s_1 f(m_2)) = 0$ in $L$. Since $L$ is an $S^{-1}R$-module, the element $u \in S$ acts invertibly on $L$: multiplying both sides by $\tfrac{1}{u} \in S^{-1}R$ gives $s_2 f(m_1) = s_1 f(m_2)$. Multiplying by $\tfrac{1}{s_1 s_2}$:
\begin{align*}
\frac{1}{s_1} \cdot f(m_1) = \frac{1}{s_2} \cdot f(m_2),
\end{align*}
so $h(\tfrac{m_1}{s_1}) = h(\tfrac{m_2}{s_2})$.
[guided]
We need to check that $h$ is independent of the representative of the fraction. Suppose $\tfrac{m_1}{s_1} = \tfrac{m_2}{s_2}$ in $S^{-1}M$. By the equivalence relation defining $S^{-1}M$, there exists $u \in S$ with $u(s_2 m_1 - s_1 m_2) = 0$ in $M$.
Since $f$ is $R$-linear, applying $f$ to both sides gives $f(u(s_2 m_1 - s_1 m_2)) = uf(s_2 m_1 - s_1 m_2) = u(s_2 f(m_1) - s_1 f(m_2)) = 0$ in $L$.
Now we use the crucial fact that $L$ is an $S^{-1}R$-module. Since $u \in S$, the element $\tfrac{u}{1} \in S^{-1}R$ is a unit (with inverse $\tfrac{1}{u}$). In any $S^{-1}R$-module, multiplication by a unit is injective, so $u \cdot x = 0$ implies $x = 0$. Therefore $s_2 f(m_1) - s_1 f(m_2) = 0$.
Acting by $\tfrac{1}{s_1 s_2} \in S^{-1}R$ on both sides gives $\tfrac{1}{s_1} f(m_1) = \tfrac{1}{s_2} f(m_2)$, confirming $h(\tfrac{m_1}{s_1}) = h(\tfrac{m_2}{s_2})$. Without the hypothesis that $L$ is an $S^{-1}R$-module (rather than merely an $R$-module), this cancellation step would fail.
[/guided]
[/step]
[step:Verify that $h$ is $S^{-1}R$-linear and satisfies $h \circ \iota_M = f$]
For $S^{-1}R$-linearity, let $\tfrac{r}{t} \in S^{-1}R$ and $\tfrac{m}{s} \in S^{-1}M$. Then:
\begin{align*}
h\!\left(\frac{r}{t} \cdot \frac{m}{s}\right) = h\!\left(\frac{rm}{ts}\right) = \frac{1}{ts} \cdot f(rm) = \frac{1}{ts} \cdot r \cdot f(m) = \frac{r}{t} \cdot \frac{1}{s} \cdot f(m) = \frac{r}{t} \cdot h\!\left(\frac{m}{s}\right),
\end{align*}
where the third equality uses the $R$-linearity of $f$, and the fourth uses the associativity and commutativity of the $S^{-1}R$-action on $L$.
For additivity, let $\tfrac{m_1}{s_1}, \tfrac{m_2}{s_2} \in S^{-1}M$:
\begin{align*}
h\!\left(\frac{m_1}{s_1} + \frac{m_2}{s_2}\right) = h\!\left(\frac{s_2 m_1 + s_1 m_2}{s_1 s_2}\right) = \frac{1}{s_1 s_2}(s_2 f(m_1) + s_1 f(m_2)) = \frac{1}{s_1} f(m_1) + \frac{1}{s_2} f(m_2).
\end{align*}
For the compatibility condition: for any $m \in M$,
\begin{align*}
h(\iota_M(m)) = h\!\left(\frac{m}{1}\right) = \frac{1}{1} \cdot f(m) = f(m),
\end{align*}
so $h \circ \iota_M = f$.
[/step]
[step:Prove uniqueness of $h$]
Suppose $h' \colon S^{-1}M \to L$ is another $S^{-1}R$-linear map with $h' \circ \iota_M = f$. Every element of $S^{-1}M$ can be written as $\tfrac{m}{s} = \tfrac{1}{s} \cdot \tfrac{m}{1} = \tfrac{1}{s} \cdot \iota_M(m)$. Since $h'$ is $S^{-1}R$-linear:
\begin{align*}
h'\!\left(\frac{m}{s}\right) = h'\!\left(\frac{1}{s} \cdot \iota_M(m)\right) = \frac{1}{s} \cdot h'(\iota_M(m)) = \frac{1}{s} \cdot f(m) = h\!\left(\frac{m}{s}\right).
\end{align*}
Since $h'$ and $h$ agree on all elements of $S^{-1}M$, they are equal. This establishes uniqueness.
[guided]
The uniqueness argument reveals why the universal property works: the elements $\iota_M(m) = \tfrac{m}{1}$ generate $S^{-1}M$ as an $S^{-1}R$-module. Indeed, any fraction $\tfrac{m}{s}$ equals $\tfrac{1}{s} \cdot \tfrac{m}{1}$, which is the $S^{-1}R$-scalar $\tfrac{1}{s}$ times the generator $\iota_M(m)$.
If $h'$ is any $S^{-1}R$-linear map with $h' \circ \iota_M = f$, then $h'$ is determined on generators by $h'(\iota_M(m)) = f(m)$, and $S^{-1}R$-linearity forces
\begin{align*}
h'\!\left(\frac{m}{s}\right) = h'\!\left(\frac{1}{s} \cdot \iota_M(m)\right) = \frac{1}{s} \cdot h'(\iota_M(m)) = \frac{1}{s} \cdot f(m).
\end{align*}
This is exactly the formula defining $h$, so $h' = h$. The underlying principle is that an $S^{-1}R$-linear map out of $S^{-1}M$ is determined by its values on elements of the form $\tfrac{m}{1}$, which are precisely the images of $\iota_M$.
[/guided]
[/step]
[step:Establish the natural bijection $\operatorname{Hom}_R(M, L) \cong \operatorname{Hom}_{S^{-1}R}(S^{-1}M, L)$]
The map $\Phi \colon \operatorname{Hom}_{S^{-1}R}(S^{-1}M, L) \to \operatorname{Hom}_R(M, L)$ defined by $\Phi(h) = h \circ \iota_M$ restricts the domain from $S^{-1}R$-linear maps to $R$-linear maps (since $\iota_M$ is $R$-linear and compositions of $R$-linear maps are $R$-linear).
The existence and uniqueness proved above show that the map $\Psi \colon \operatorname{Hom}_R(M, L) \to \operatorname{Hom}_{S^{-1}R}(S^{-1}M, L)$ defined by $\Psi(f) = h$ (where $h(\tfrac{m}{s}) = \tfrac{1}{s}f(m)$) is a well-defined inverse to $\Phi$. Indeed, $\Phi \circ \Psi = \operatorname{id}$ because $(\Psi(f)) \circ \iota_M = f$ by construction, and $\Psi \circ \Phi = \operatorname{id}$ because uniqueness forces $\Psi(\Phi(h)) = \Psi(h \circ \iota_M) = h$.
Both $\Phi$ and $\Psi$ are manifestly natural in $L$ (they commute with $S^{-1}R$-module homomorphisms $L \to L'$), so the bijection is natural.
[/step]