Direct sum
In mathematics, more specifically in algebra, the direct sum of a collection of abelian groups is an abelian group constructed by combining the given groups in a specific way, described below. If the input abelian groups have additional structure (for example, are vector spaces, modules, or topological abelian groups), then the direct sum also has that structure, typically.
As an example, the direct sum of two abelian groups and is another abelian group consisting of the ordered pairs where and . To add ordered pairs, the sum is defined to be ; in other words, addition is defined coordinate-wise. For example, the direct sum , where is real coordinate space, is the Cartesian plane, .
Direct sums can also be formed with any finite number of summands; for example, , provided and are the same kinds of algebraic structures (e.g., all abelian groups, or all vector spaces). That relies on the fact that the direct sum is associative up to isomorphism. That is, for any algebraic structures , , and of the same kind. The direct sum is also commutative up to isomorphism, i.e. for any algebraic structures and of the same kind.
The direct sum of finitely many abelian groups, vector spaces, or modules is canonically isomorphic to the corresponding direct product. That is false, however, for some algebraic objects like nonabelian groups.
In the case where infinitely many objects are combined, the direct sum and direct product are not isomorphic even for abelian groups, vector spaces, or modules. For example, consider the direct sum and the direct product of (countably) infinitely many copies of the integers. An element in the direct product is an infinite sequence, such as (1,2,3,...) but in the direct sum, there is a requirement that all but finitely many coordinates be zero, so the sequence (1,2,3,...) would be an element of the direct product but not of the direct sum, while (1,2,0,0,0,...) would be an element of both. Often, if a + sign is used, all but finitely many coordinates must be zero, while if some form of multiplication is used, all but finitely many coordinates must be 1.
In more technical language, if the summands are , the direct sum is defined to be the set of tuples with such that for all but finitely many i. The direct sum is contained in the direct product , but is strictly smaller when the index set is infinite, because an element of the direct product can have infinitely many nonzero coordinates.