An abelian group $M$ can be given a structure of $A$-module for a commutative ring $A$ with $1$ either by defining an operation $A \times M \to M$ and checking that a handful of axioms hold, or more concisely by giving a ring homomorphism $A \to \mathrm{End}_\mathrm{Grp}(M)$. Given two A-modules $M$ and $M'$, and their corresponding homomorphisms $f : A \to \mathrm{End}_\mathrm{Grp}(M)$ and $f': A \to \mathrm{End}_\mathrm{Grp}(M')$, is there a way to express the property for a map $M \to M'$ to be $A$-linear involving $f$ and $f'$?
I had hoped that those maps $M \to M'$ which are $A$-linear might correspond to homomorphisms $\mathrm{End}_\mathrm{Grp}(M) \to \mathrm{End}_\mathrm{Grp}(M')$ of $A$-algebras but I was not able to fill in the details.
Thank you.
$\require{AMScd}$ Let $\varphi\colon M\rightarrow M'$ be a homomorphism of abelian groups. Then $\varphi$ is $A$-linear if and only if the following diagram commutes: $$ \begin{CD} A @>{f}>> {\rm End}(M)\\ @V{f'}VV & @VV{\varphi_*}V\\ {\rm End}(M') @>>{\varphi^*}> {\rm Hom}(M,M') \end{CD} $$ where $\varphi_*(g) = \varphi\circ g$ for $g\in {\rm End}(M)$ and $\varphi^*(g) = g\circ\varphi$ for $g\in {\rm End}(M')$.