Definition of direct sum of modules? I have just started studying modules, and am trying to figure out the definition of the direct sum of modules but I'm having trouble since different sources seem to give different definitions, for example:
MIT says:
The direct sum of the Mλ is the subset of restricted vectors:
$\bigoplus$ $M_{λ}$ := {($m_{λ}$) | $m_{λ}$ = 0 for almost all λ} 
Wolfram MathWorld says:
The direct sum of modules A and B is the module
A $\bigoplus$ B={a$\oplus$b|a $\in$ A,b $\in$ B},   
where all algebraic operations are defined componentwise.
[What is $\oplus$ anyway?]
My lecture notes say:
Define the direct sum of modules as the set theoretical product with the
natural addition and multiplication by elements of A.

The only one that makes sense to me is the last one, but it doesn't seem to agree with the other two

In the second definition, the $\oplus$ in the set is just a symbol - $a\oplus b$ is just another way of writing the pair $(a,b)$, which should tell you why this definition is the same as the one in your lecture notes. The first definition is slightly different because it's telling you how to define the direct sum of any (possibly infinite) set of modules. If $\lambda\in\{1,2\}$ then the condition in the definition is vacuous, and you have the set of pairs $(m_1,m_2)$ with $m_i\in M_i$, as in the other two definitions. (This first definition doesn't discuss the operations, but again they are the "natural" ones).
You can define the direct sum of any finite set of modules inductively using definitions 2 and 3, but the first one is the only one that tells you what to do if you have an infinite set of modules.
