Direct sums are defined for a number of different sorts of mathematical objects, including subspaces, matrices, modules, and groups.
The matrix direct sum is defined by
| 
 
(1)
 
 | |||
| 
 
(2)
 
 | 
(Ayres 1962, pp. 13-14).
The direct sum of two subspaces  and 
 is the sum of subspaces in which 
 and 
 have only the zero vector in common (Rosen 2000, p. 357).
The significant property of the direct sum is that it is the coproduct in the category of modules
 (i.e., a module direct sum). This general definition
 gives as a consequence the definition of the direct sum  of Abelian groups 
 and 
 (since they are 
-modules, i.e., modules over the
 integers) and the direct sum of vector
 spaces (since they are modules over a field).
 Note that the direct sum of Abelian groups is the same as the group
 direct product, but that the term direct sum is not used for groups which are
 non-Abelian.
Note that direct products and direct sums differ for infinite indices. An element of the direct sum is zero for all but a finite number of entries, while an element of the direct product can have all nonzero entries.