[proofplan]
We prove the two implications by comparing the displayed two-term linearity condition with the defining properties of an $R$-[module homomorphism](/page/Module%20Homomorphism). In the forward direction, additivity and compatibility with the $R$-action immediately give the displayed identity. In the reverse direction, special choices of the scalars recover additivity and scalar compatibility separately: $r_1=r_2=1_R$ gives additivity, while $r_1=r$ and $r_2=0_R$ gives scalar compatibility. These two recovered properties are exactly the definition of an $R$-module homomorphism.
[/proofplan]
[step:Derive the two-term linearity identity from the homomorphism axioms]
Assume first that $f:M\to N$ is an $R$-module homomorphism. By definition, $f$ is additive and compatible with scalar multiplication: for all $x,y\in M$ and all $r\in R$,
\begin{align*}
f(x+y)=f(x)+f(y)
\end{align*}
and
\begin{align*}
f(rx)=rf(x).
\end{align*}
Let $m_1,m_2\in M$ and $r_1,r_2\in R$. Applying additivity to $x=r_1m_1$ and $y=r_2m_2$ gives
\begin{align*}
f(r_1m_1+r_2m_2)=f(r_1m_1)+f(r_2m_2).
\end{align*}
Applying scalar compatibility to each summand gives
\begin{align*}
f(r_1m_1)+f(r_2m_2)=r_1f(m_1)+r_2f(m_2).
\end{align*}
Therefore
\begin{align*}
f(r_1m_1+r_2m_2)=r_1f(m_1)+r_2f(m_2).
\end{align*}
[/step]
[step:Recover additivity by choosing both scalars equal to $1_R$]
Conversely, assume that for every $m_1,m_2\in M$ and every $r_1,r_2\in R$,
\begin{align*}
f(r_1m_1+r_2m_2)=r_1f(m_1)+r_2f(m_2).
\end{align*}
Let $m_1,m_2\in M$. Taking $r_1=1_R$ and $r_2=1_R$, and using the module identities $1_Rm_i=m_i$ in $M$ and $1_Rf(m_i)=f(m_i)$ in $N$, we obtain
\begin{align*}
f(m_1+m_2)=f(m_1)+f(m_2).
\end{align*}
Thus $f$ is additive.
[guided]
We now use the assumed two-term identity to extract the ordinary additivity condition. Let $m_1,m_2\in M$ be arbitrary. The assumption says that every linear combination of two inputs is sent to the corresponding linear combination of their images:
\begin{align*}
f(r_1m_1+r_2m_2)=r_1f(m_1)+r_2f(m_2).
\end{align*}
To isolate addition alone, choose both scalars to be the multiplicative identity of the ring:
\begin{align*}
r_1=1_R
\end{align*}
and
\begin{align*}
r_2=1_R.
\end{align*}
Substituting these choices into the assumed identity gives
\begin{align*}
f(1_Rm_1+1_Rm_2)=1_Rf(m_1)+1_Rf(m_2).
\end{align*}
Because $M$ and $N$ are unital left $R$-modules, $1_R$ acts as the identity on both modules. Hence $1_Rm_i=m_i$ in $M$ and $1_Rf(m_i)=f(m_i)$ in $N$ for $i=1,2$. Therefore the preceding equality becomes
\begin{align*}
f(m_1+m_2)=f(m_1)+f(m_2).
\end{align*}
Since $m_1$ and $m_2$ were arbitrary elements of $M$, this proves that $f$ is additive.
[/guided]
[/step]
[step:Recover scalar compatibility by making the second term zero]
Let $0_R$ denote the additive identity of the ring $R$, let $0_M$ denote the additive identity of the abelian group underlying $M$, and let $0_N$ denote the additive identity of the abelian group underlying $N$. Let $r\in R$ and $m\in M$. Apply the assumed identity with
\begin{align*}
r_1=r,\quad m_1=m,\quad r_2=0_R,\quad m_2=0_M.
\end{align*}
The module axioms give $0_R0_M=0_M$ in $M$ and $0_Rf(0_M)=0_N$ in $N$. Hence
\begin{align*}
f(rm)=f(rm+0_M)=rf(m)+0_N=rf(m).
\end{align*}
Thus $f$ is compatible with scalar multiplication.
[/step]
[step:Conclude that the defining homomorphism properties hold]
From the previous two steps, $f$ is additive and satisfies $f(rm)=rf(m)$ for every $r\in R$ and every $m\in M$. These are precisely the defining properties of an $R$-module homomorphism from $M$ to $N$. Therefore $f$ is an $R$-module homomorphism. Combining this with the forward implication proves the equivalence.
[/step]