# Homomorphism from a finitely generated module to a direct sum of modules

Let $R$ be a commutative ring with unit. If $M$ and $N_i$ are arbitrary $R$-modules, the module $\operatorname{Hom}_R(M,\bigoplus_{i\in I}N_i)$ is not isomorphic to $\bigoplus_{i\in I}\operatorname{Hom}(M,N_i)$ in general. But if $M$ is finitely generated, does the isomorphism hold?

Define a homomorphism $\phi: \bigoplus_{i \in I} Hom(M,N_i) \rightarrow Hom(M, \bigoplus_{i \in I} N_i)$ by sending $f = (f_k)_{k \in I^*}$ to $\phi(f) = \sum_{k \in I^*} f_k$, where $I^*$ is a finite subset of $I$.
Clearly $\phi$ is injective. For surjectivity, take $f \in Hom(M, \bigoplus_{i \in I} N_i)$ and let $x_1,\dots,x_n$ be the generators of $M$. Then for $j \in \left\{1,\dots,n\right\}$, $f(x_j)$ will be non-zero in finitely many indices $I_j \subset I$. So the image of $f$ will be non-zero for at most finitely many indices $I^* = \bigcup_{j=1}^n I_j$. For each $k \in I^*$, $f$ induces a homomorphism $f_k : M \rightarrow N_k$, from which we can see that $f = \phi((f_k)_{k \in I^*})$.
Hence if $M$ is finitely generated, then $\phi$ is an isomorphism.
• How this $f_{k}:M \to N_{k}$ are defined? Im thinking about composing $f$ with a projection into $N_{k}$ but doesnt seems to work. Thanks! @Manos – Cos Mar 12 '20 at 1:13