# Direct sum

The direct sum is an operation between structures in abstract algebra, a branch of mathematics. It is defined differently, but analogously, for different kinds of structures. To see how the direct sum is used in abstract algebra, consider a more elementary kind of structure, the abelian group. The direct sum of two abelian groups $A$ and $B$ is another abelian group $A\oplus B$ consisting of the ordered pairs $(a,b)$ where $a\in A$ and $b\in B$ . To add ordered pairs, we define the sum $(a,b)+(c,d)$ to be $(a+c,b+d)$ ; in other words addition is defined coordinate-wise. For example, the direct sum $\mathbb {R} \oplus \mathbb {R}$ , where $\mathbb {R}$ is real coordinate space, is the Cartesian plane, $\mathbb {R} ^{2}$ . A similar process can be used to form the direct sum of two vector spaces or two modules.

We can also form direct sums with any finite number of summands, for example $A\oplus B\oplus C$ , provided $A,B,$ and $C$ are the same kinds of algebraic structures (e.g., all abelian groups, or all vector spaces). This relies on the fact that the direct sum is associative up to isomorphism. That is, $(A\oplus B)\oplus C\cong A\oplus (B\oplus C)$ for any algebraic structures $A$ , $B$ , and $C$ of the same kind. The direct sum is also commutative up to isomorphism, i.e. $A\oplus B\cong B\oplus A$ for any algebraic structures $A$ and $B$ of the same kind.

The direct sum of finitely many abelian groups, vector spaces, or modules is canonically isomorphic to the corresponding direct product. This 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. As an example, consider the direct sum and 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 $(A_{i})_{i\in I}$ , the direct sum

$\bigoplus _{i\in I}A_{i}$ is defined to be the set of tuples $(a_{i})_{i\in I}$ with $a_{i}\in A_{i}$ such that $a_{i}=0$ for all but finitely many i. The direct sum ${\textstyle \bigoplus _{i\in I}A_{i}}$ is contained in the direct product ${\textstyle \prod _{i\in I}A_{i}}$ , but is strictly smaller when the index set $I$ is infinite, because then an element of the direct product can have infinitely many nonzero coordinates.