I know that for Groups $G$, $G'$ and $G''$, if $f_1: G \rightarrow G'$ and $f_2: G \rightarrow G''$ are homomorphisms of groups, then the function $f :G \rightarrow G' \times G''$ defined by $f(g) = (f_1(g),f_2(g))$ is a homomorphism of groups.
My question is does this extend to $R$-modules, where $R$ is a commutative ring. In other words, for $R$- Modules $M$, $M'$ and $M''$, if $f_1: M \rightarrow M'$ and $f_2: M \rightarrow M''$ are homomorphisms of $R$ -Modules , then the function $f: M \rightarrow M' \oplus M''$ defined by $f(m) = (f_1(m),f_2(m))$ is a homomorphism of $R$-modules.
I feel like this should be the case, since the $M$'s are abelian groups.