Morphisms out of direct sum I would like to know if my usage of the universal property of the direct sum of $k$-modules ($k$ a commutative ring) is appropriate.
Let $f:\oplus_{i\in I}M_i\to N$ be any map. If I want to show that this map is a morphism of $k$-modules I find it hard to consider general elements in $\oplus_{i\in I}M_i$ to check the properties upon.
Can I now consider the modules $M_0\oplus 0 \oplus 0\oplus ...$, $0\oplus M_1 \oplus 0\oplus ...$, etc. as submodules of $\oplus_{i\in I}M_i$ and therefore get by the universal property of the direct sum that $f:\oplus_{i\in I}M_i\to N$ is given by $f((m_i)_{i\in I})=\sum_{n\ge 0}f_n(m_n)$ where $f_n=f|_{0\oplus 0...\oplus 0 \oplus M_n \oplus 0\oplus ...}$?
Then I can check the properties for any $f_n$.
Is this possible at all, and if, is it possible in any category with coproducts? I explicitely need here that $f$ splits as the sum of the $f_n$ which I only know for $k$-modules and similiar stuff.
Thank you
 A: Since you are also asking about the more general situation, let $\mathscr{C}$ be a category and let $X_i$, $i\in I$ for some index set $I$, be objects in that category. A coproduct $(X, (\iota_i)_{i\in I})$ of the $X_i$'s in $\mathscr{C}$ is an object $X$ in $\mathscr{C}$ together with morphisms $\iota_i\colon X_i\to X$ in $\mathscr{C}$ such that the universal property is satisfied: For any object $Y$ and morphisms $f_i\colon X_i \to Y$ there exists a unique morphism $f\colon X \to Y$ with $f\circ \iota_i=g_i$ for all $i\in I$.
In general, you do not have a forgetful functor from an arbitrary category to $Sets$, i.e. the objects aren't based on an underlying set and the morphisms cannot be thought of as map of sets.
However, letting $\mathscr{C}$ be the category of $A$-modules for a commutative ring $A$, you do have the forgetful functor $F\colon \mathscr{C} \to Sets$ which just forgets all of the algebraic structure of a module and considers an $A$-linear map as a map of sets.  
You seem to already know that $M=\bigoplus_{{i\in I}} M_i$ is the coproduct of the $A$-modules $M_i$ in the category of $A$-modules; the maps $\iota_j\colon M_j\to M$ are in this case are just given by sending $x_j\in M_j$ to the element $x$ having $x_j$ in the $j$th spot and $0$ else.
So, to check that a given map of sets $f\colon F(M)\to F(N)$ actually is (or rather comes from) a morphism in $\mathscr{C}$ , you only need to check that it is induced by morphisms $f_i\colon M_i\to N$ in $\mathscr{C}$ in the sense of the universal property described above. Precisely, the $f_i$ induce an $A$-linear map $\phi\colon M\to N$ with $\phi\circ \iota_i=f_i$ and you wish that $F(\phi)=f$.
To answer your question: Yes, you have got it right and the maps $\iota_j$ are just a formal way of describing the restriction of $f$ the way you did.
