What is the definition of direct sum of submodules? Given a ring $R$ and $M_1,\ldots,M_n$ $R$-submodules of an $R$-module $M$, what is the definition of this set?
$$\bigoplus_{i=1}^n M_i$$
From where I am reading it seems that it is: $M_1 + \cdots + M_n$ with $M_i$ mutually disjoint. But I read in many places that it is the direct product $M_1 \times \cdots \times M_n$.
So what is it? Thanks for your help.
 A: The ("external") direct sum of modules $M_i$ is defined as a subset of the Cartesian product of the $M_i$.
Now, there is another thing called the "internal" direct sum of submodules of a module. This is usually defined as the submodules summing to the whole module, and having the property that each component intersects the sum of others trivially. It amounts to each element having a unique representation as a sum of elements from each submodule.
The two are related this way: if you decompose $M$ as an internal direct sum of submodules $M_i$, the internal direct sum is isomorphic to an "external" direct sum via the map $m_1+m_2+\ldots \mapsto (m_1,m_2,\ldots)$.
Conversely, every decomposition of a module as a direct sum of other modules corresponds to an internal decomposition. You just look at the images of the components of the decomposition inside your module, and they form a family of submodules that defines an internal decomposition.
So you see the two are basically the same, it's just that one emphasizes working with tuples of elements in the Cartesian product, and the other works with sums of elements inside the module. 
A: A finite direct sum is equivalent to the analogous Cartesian product.  This stops being true for infinite sums/products.
As an example, $(1,1,1,1,1,\dots) \in \Bbb{Z} \times \Bbb{Z} \times \cdots$, but $(1,1,1,1,1,\dots) \not\in  \Bbb{Z} \oplus \Bbb{Z} \oplus \cdots$, because elements in the direct sum have only a finite number of nonzero entries.
The product topology and the box topology also capture this distinction.
A: $M_1 + ... + M_n$ with $M_i$ mutually disjoint and $n$ a finite, positive integer 
is exactly $M_1 \times ... \times M_n$ as a set. If you consider them "equipped" with pointwise operations (addition and multiplication with elements of $R$), then they are isomorphic as $R$ modules. 
The isomorphism stops being valid, only when we have an infinite number of summands, in which case the direct sum and direct product are different as sets. 
