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

• The universal property doesn't tell you whether or not a mapping is a $k$-module mapping. That you need to check directly. The definition of $\bigoplus_{i\in I}M_i$ is $$\bigoplus_{i\in I}M_i=\left\{\left.(m_i)\in \prod_{i \in I}M_i\right| m_i=0 \text{ for all but finitely many } i\in I\right\}$$ Commented Jul 4, 2016 at 17:44
• I see that. I just want to use the universal property in order to reduce the problem on every component, i.e. check on the $f_n$ that they are $k$-module mapping and conclude that $f$ is too as a sum of the $f_n$. Commented Jul 4, 2016 at 17:46
• Oh I see, if that is the case, yes you can do that. If $f_n$ are $k$-linear maps, then there exists a unique $k$-linear map $f:\oplus M_i\to N$ such that $f|_{M_i}=f_n$. This unique $k$-linear map cannot be anything but $f$. Commented Jul 4, 2016 at 17:53
• Thank you very much for your comment! This helped a lot since you kind of rephrased my text. You explained how the $k$-linearity of the $f_n$ induce nothing but the $k$-linearity of $f$. This is much clearer than my attempt to describe the situation which was like upside down ;) Commented Jul 4, 2016 at 19:26

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.
• Thanks a lot for your helpful answer Plankton! These were exactly the missing links in my understanding. I see now that maybe the most special thing about my $k$-Mod example is the forgetful functor to Sets. Also that you pointed out that my strangely written restriction maps are indeed the compositions with the $\iota_i$ clarified a lot! Commented Jul 4, 2016 at 19:28