# Let $N$ be an $R$-module, $I$ be a set and $\left \{ M_i:i \in I\right \}$ a collection of $R$-modules. Show that the injective functions…

Let $N$ be an $R$-module, $I$ be a set and $\left \{ M_i:i \in I\right \}$ a collection of $R$-modules. Show that the injective functions $\iota_k:M_k\rightarrow \bigoplus_{i \in I}M_i$ induce a monomorphism of $R$-modules $$\bigoplus_{i \in I}\mathrm{Hom}(N, M_i)\rightarrow \mathrm{Hom}(N, \bigoplus_{i \in I} M_i),$$ and that is an isomorphism if $N$ is finitely generated.

I have tried to do this by considering the function $\varphi :\bigoplus_{i \in I}Hom (N, M_i)\rightarrow Hom(N, \bigoplus_{i \in I} M_i)$ given by $\varphi (f_1 , f_2, ..., f_n) = f$ where each $f_i: N \rightarrow M_i$ and $f$ is the sum of each of the extensions $\iota_j \circ f_j: N \rightarrow \bigoplus_{i \in I} M_i$ of $f_j$ but I do not know if this is okay, what do you say?

Don't forget that a typical element of $\oplus_i {\rm Hom}(N,M_i)$ looks like $$f_{i_1} + \dots + f_{i_n}$$ with $f_{i_1} \in {\rm Hom}(N, M_{i_1}), \dots, f_{i_n} \in {\rm Hom}(N, M_{i_n})$, say. Crucially, this sum must be finite.
As you say, the map $\varphi : \oplus_i {\rm Hom}(N, M_i) \to {\rm Hom}(N, \oplus_i M_i)$ is defined by $$\varphi(f_{i_1} + \dots + f_{i_n}) = \iota_{i_1} \circ f_{i_1} + \dots +\iota_{i_n} \circ f_{i_n} .$$
This $\varphi$ is not necessarily surjective. To understand why, observe that for every $f \in \varphi(\oplus_i {\rm Hom}(N, M_i))$, there is a finite collection of $M_i$'s such that $f$ maps all elements of $N$ into the direct sum of these $M_i$'s. (For example, $\varphi(f_{i_1} + \dots + f_{i_n})$ maps all elements of $N$ into $M_{i_1} \oplus \dots \oplus M_{i_n}$.)
A general homomorphism in ${\rm Hom}(N, \oplus_i M_i)$ is different. Yes, it maps every element of $N$ into a direct sum of finitely many $M_i$'s. But these $M_i$'s could be chosen differently for different elements of $N$.
However, if $N$ is finitely generated, then $\varphi$ is surjective. Indeed, suppose $\{e_1, \dots, e_k \}$ is a set of generators for $N$ and suppose we are given a homomorphism $f \in {\rm Hom}(N, \oplus_i M_i)$ that sends $$e_1 \mapsto m_{(1,1)} + \dots + m_{(1,n_1)} \ \ \ , \ \ \ \dots\ \ \ , \ \ \ e_k \mapsto m_{(k,1)} + \dots + m_{(k,n_k)}$$ where each $m_{(j,l)}$ is in $M_{i_{(j,l)}}$.
Then $$f = \varphi \left(\sum_{j = 1}^k \sum_{l=1}^{n_j} f_{(j,l)} \right),$$ where $f_{(j,l)}$ is in ${\rm Hom}(N, M_{i_{(j,l)}})$, and sends $$\sum_{J=1}^k r_{J} e_{J} \mapsto r_j m_{(j,l)}.$$ Of course, $\sum_{j = 1}^k \sum_{l=1}^{n_j} f_{(j,l)}$ is a finite sum, which is why this works.