# Direct sum

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Direct_sum
> Markdown URL: https://mediated.wiki/source/Direct_sum.md
> Source: https://en.wikipedia.org/wiki/Direct_sum
> Source revision: 1343541213
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Use American English|date = January 2019}}
{{Short description|Algebraic structure formed from a collection of algebraic structures}}
{{refimprove|date=December 2013}}
In [mathematics](/source/mathematics), more specifically in [algebra](/source/abstract_algebra), the '''direct sum''' of a collection of [abelian group](/source/abelian_group)s is an abelian group constructed by combining the given groups in a specific way, described below.<ref>Lang 2002, pp. 36–37.</ref>  If the input abelian groups have additional structure (for example, are [vector space](/source/vector_space)s, [modules](/source/module_(mathematics)), or [topological abelian group](/source/topological_abelian_group)s), then the direct sum also has that structure, typically.

As an example, the direct sum of two  [abelian groups](/source/abelian_groups) <math>A</math> and <math>B</math> is another abelian group <math>A\oplus B</math> consisting of the ordered pairs <math>(a,b)</math> where <math>a \in A</math> and <math>b \in B</math>. To add [ordered pairs](/source/ordered_pairs), the sum is defined <math>(a, b) + (c, d)</math> to be <math>(a + c, b + d)</math>; in other words, addition is defined coordinate-wise. For example, the direct sum <math> \Reals \oplus \Reals </math>, where <math> \Reals </math> is [real coordinate space](/source/real_coordinate_space), is the [Cartesian plane](/source/Cartesian_plane), <math> \R ^2 </math>. 

Direct sums can also be formed with any finite number of summands; for example, <math>A \oplus B \oplus C</math>, provided <math>A, B,</math> and <math>C</math> 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](/source/associative) [up to](/source/up_to) [isomorphism](/source/isomorphism). That is, <math>(A \oplus B) \oplus C \cong A \oplus (B \oplus C)</math> for any algebraic structures <math>A</math>, <math>B</math>, and <math>C</math> of the same kind. The direct sum is also [commutative](/source/commutative) up to isomorphism, i.e. <math>A \oplus B \cong B \oplus A</math> for any algebraic structures <math>A</math> and <math>B</math> of the same kind.

The direct sum of finitely many abelian groups, vector spaces, or modules is canonically [isomorphic](/source/isomorphism) to the corresponding [direct product](/source/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 <math>(A_i)_{i \in I}</math>, the direct sum <math display="block">\bigoplus_{i \in I} A_i</math> is defined to be the set of tuples <math>(a_i)_{i \in I}</math> with <math>a_i \in A_i</math> such that <math>a_i=0</math> for all but finitely many ''i''.  The direct sum <math display="inline">\bigoplus_{i \in I} A_i</math> is contained in the [direct product](/source/direct_product) <math display="inline">\prod_{i \in I} A_i</math>, but is strictly smaller when the [index set](/source/index_set) <math>I</math> is infinite, because an element of the direct product can have infinitely many nonzero coordinates.<ref>[Thomas W. Hungerford](/source/Thomas_W._Hungerford), ''Algebra'', p.60, Springer, 1974, {{ISBN|0387905189}}</ref>

==Examples==
The ''xy''-plane, a two-dimensional [vector space](/source/vector_space), can be thought of as the direct sum of two one-dimensional vector spaces: the ''x'' and ''y'' axes. In this direct sum, the ''x'' and ''y'' axes intersect only at the origin (the zero vector). Addition is defined coordinate-wise; that is, <math>(x_1,y_1) + (x_2,y_2) = (x_1+x_2, y_1 + y_2)</math>, which is the same as vector addition.

Given two structures <math>A</math> and <math>B</math>, their direct sum is written as <math>A\oplus B</math>. Given an [indexed family](/source/indexed_family) of structures <math>A_i</math>, indexed with <math>i \in I</math>, the direct sum may be written <math display="inline"> A=\bigoplus_{i\in I}A_i</math>. Each ''A<sub>i</sub>'' is called a '''direct summand''' of ''A''. If the index set is finite, the direct sum is the same as the direct product. In the case of groups, if the group operation is written as <math>+</math> the phrase "direct sum" is used, while if the group operation is written <math>*</math> the phrase "direct product" is used. When the index set is infinite, the direct sum is not the same as the direct product since the direct sum has the extra requirement that all but finitely many coordinates must be zero.

===Internal and external direct sums===
A distinction is made between internal and external direct sums though both are isomorphic. If the summands are defined first, and the direct sum is then defined in terms of the summands, there is an external direct sum. For example, if the real numbers <math>\mathbb{R}</math> are defined, followed by <math>\mathbb{R} \oplus \mathbb{R}</math>, the direct sum is said to be external.

If, on the other hand, some algebraic structure <math>S</math> is defined, and <math>S</math> is then defined as a direct sum of two substructures <math>V</math> and <math>W</math>, the direct sum is said to be internal. In that case, each element of <math>S</math> is expressible uniquely as an algebraic combination of an element of <math>V</math> and an element of <math>W</math>. For an example of an internal direct sum, consider <math>\mathbb Z_6</math> (the integers modulo six), whose elements are <math>\{0, 1, 2, 3, 4, 5\}</math>. This is expressible as an internal direct sum <math>\mathbb Z_6 = \{0, 2, 4\} \oplus \{0, 3\}</math>.

==Types of direct sums==
===Direct sum of abelian groups===
{{Main|Direct product of groups}}

The '''direct sum of [abelian group](/source/abelian_group)s''' is a prototypical example of a direct sum. Given two such [groups](/source/Group_(mathematics)) <math>(A, \circ)</math> and <math>(B, \bullet),</math> their direct sum <math>A \oplus B</math> is the same as their [direct product](/source/direct_product_of_groups). That is, the underlying set is the [Cartesian product](/source/Cartesian_product) <math>A \times B</math> and the group operation <math>\,\cdot\,</math> is defined component-wise:
<math display=block>\left(a_1, b_1\right) \cdot \left(a_2, b_2\right) = \left(a_1 \circ a_2, b_1 \bullet b_2\right).</math>
This definition generalizes to direct sums of finitely many abelian groups.

For an arbitrary family of groups <math>A_i</math> indexed by <math>i \in I,</math> their {{em|direct sum}}<ref name=nLabDirectSum/>
<math display=block>\bigoplus_{i \in I} A_i</math>
is the [subgroup](/source/subgroup) of the direct product that consists of the elements <math display="inline">\left(a_i\right)_{i \in I} \in \prod_{i \in I} A_i</math> that have finite [support](/source/Support_(mathematics)), where, by definition, <math>\left(a_i\right)_{i \in I}</math> is said to have {{em|finite support}} if <math>a_i</math> is the identity element of <math>A_i</math> for all but finitely many <math>i.</math><ref>Joseph J. Rotman, ''The Theory of Groups: an Introduction'', p. 177, Allyn and Bacon, 1965</ref> 
The direct sum of an infinite family <math>\left(A_i\right)_{i \in I}</math> of non-trivial groups is a [proper subgroup](/source/proper_subgroup) of the product group <math display="inline">\prod_{i \in I} A_i.</math>

===Direct sum of modules===
{{main|Direct sum of modules}}
The ''direct sum of modules'' is a construction that combines several [modules](/source/module_(mathematics)) into a new module.

The most familiar examples of that construction occur in considering [vector spaces](/source/vector_spaces), which are modules over a [field](/source/Field_(mathematics)). The construction may also be extended to [Banach spaces](/source/Banach_spaces) and [Hilbert spaces](/source/Hilbert_spaces).

===Direct sum in categories===
{{Main|Coproduct}}
An [additive category](/source/additive_category) is an abstraction of the properties of the category of modules.<ref>{{Cite web |url=http://www.math.jussieu.fr/~schapira/lectnotes/HomAl.pdf |title="p.45" |access-date=2014-01-14 |archive-date=2013-05-22 |archive-url=https://web.archive.org/web/20130522164408/http://www.math.jussieu.fr/~schapira/lectnotes/HomAl.pdf |url-status=dead }}</ref><ref>{{Cite web|url=http://www.princeton.edu/~hhalvors/aqft.pdf| title=Appendix| access-date=2014-01-14|archive-url=https://web.archive.org/web/20060917010409/http://www.princeton.edu/~hhalvors/aqft.pdf| archive-date=2006-09-17|url-status=dead}}</ref> In such a category, finite products and [coproducts](/source/coproducts) agree, and the direct sum is either of them: cf. [biproduct](/source/biproduct).

More generally,<ref name=nLabDirectSum>{{nlab|id=direct+sum|title=Direct Sum}}</ref>
in [category theory](/source/category_theory) the {{visible anchor|direct sum|Categorical direct sum}} is often but not always the coproduct in the [category](/source/category_(mathematics)) of the mathematical objects in question. For example, in the category of abelian groups, the direct sum is a coproduct. That is also true in the category of modules.

===Direct sum of group representations===
{{See also|Representation theory of finite groups#Direct sum of representations}}
The '''direct sum of group representations''' generalizes the [direct sum of the underlying modules](/source/direct_sum_of_modules) by adding a [group action](/source/Group_action_(mathematics)). Specifically, given a [group](/source/Group_(mathematics)) <math>G</math> and two [representations](/source/Group_representation) <math>V</math> and <math>W</math> of <math>G</math> (or, more generally, two [<math>G</math>-modules](/source/G-module)), the direct sum of the representations is <math>V \oplus W</math> with the action of <math>g \in G</math> given component-wise, that is,
<math display="block">g (v, w) := (g v, g  w).</math>

An equivalent way of defining the direct sum is as follows:
Given two representations <math>(V, \rho_V)</math> and <math>(W, \rho_W)</math> the vector space of the direct sum is <math>V \oplus W</math> and the homomorphism <math>\rho_{V \oplus W}</math> is given by <math>\alpha \circ (\rho_V \times \rho_W),</math> where <math>\alpha: GL(V) \times GL(W) \to GL(V \oplus W)</math> is the natural map obtained by coordinate-wise action as above.

Furthermore, if <math>V,\,W</math> are finite dimensional, then, given a basis of <math>V,\,W</math>, <math>\rho_V</math> and <math>\rho_W</math> are matrix-valued. In this case, <math>\rho_{V \oplus W}</math> is given as
<math display="block">g \mapsto \begin{pmatrix}\rho_V(g) & 0 \\ 0 & \rho_W(g)\end{pmatrix}.</math>

Moreover, if <math>V</math> and <math>W</math> are viewed as modules over the [group ring](/source/group_ring) <math>kG</math>, where <math>k</math> is the field, the direct sum of the representations <math>V</math> and <math>W</math> is equal to their direct sum as <math>kG</math>-modules.

===Direct sum of rings===
{{main|Product of rings}}
The [direct product](/source/direct_product) <math>R \times S</math> of rings should not be written as <math>R \oplus S</math>, since <math>R \times S</math> does not receive natural ring homomorphisms from <math>R</math> and <math>S</math>.<ref>[https://math.stackexchange.com/q/345501 Math StackExchange] on direct sum of rings vs. direct product of rings.{{User-generated source|date=November 2025}}</ref> In particular, the map <math>R \to R \times S</math> sending <math>r</math> to <math>(r, 0)</math> is not a ring homomorphism since it fails to send 1 to <math>(1, 1)</math> (assuming that <math>0 \neq 1</math> in <math>S</math>). Thus, <math>R \times S</math> is not a coproduct in the [category of rings](/source/category_of_rings), and should not be written as a direct sum.  (The coproduct in the [category of commutative rings](/source/category_of_commutative_rings) is the [tensor product of rings](/source/tensor_product_of_rings).<ref>{{harvnb|Lang|2002}}, section I.11</ref> In the category of rings, the coproduct is given by a construction similar to the [free product](/source/free_product) of groups.)

The use of direct sum terminology and notation is especially problematic in dealing with infinite families of rings. If <math>(R_i)_{i \in I}</math> is an infinite collection of nontrivial rings, the direct sum of the underlying additive groups may be equipped with termwise multiplication, but that produces a [rng](/source/rng_(algebra)), a ring without a multiplicative identity.

===Direct sum of matrices===
{{See also|Direct sum of matrices}}
If <math>\mathbf{A}</math> is an <math>m_1 \times n_1</math> matrix and <math>\mathbf{B}</math> is an <math>m_2 \times n_2</math> matrix, then the direct sum <math>\mathbf{A} \oplus \mathbf{B}</math> is defined as the <math>(m_1+m_2)\times(n_1+n_2)</math> [block diagonal matrix](/source/block_matrix) <math>
\begin{bmatrix}
\mathbf{A} & 0          \\
0          & \mathbf{B}
\end{bmatrix}.</math>

===Direct sum of topological vector spaces===
{{Main|Complemented subspace|Direct sum of topological groups}}
A [topological vector space](/source/topological_vector_space) (TVS) <math>X,</math> such as a [Banach space](/source/Banach_space), is said to be a {{em|[topological direct sum](/source/topological_direct_sum)}} of two vector subspaces <math>M</math> and <math>N</math> if the addition map
<math display=block>\begin{alignat}{4}
\  \;&& M \times N &&\;\to    \;& X \\[0.3ex]
     && (m, n) &&\;\mapsto\;& m + n \\
\end{alignat}</math>
is an [isomorphism of topological vector spaces](/source/TVS-isomorphism) (meaning that this [linear map](/source/linear_map) is a [bijective](/source/bijection) [homeomorphism](/source/homeomorphism)) in which case <math>M</math> and <math>N</math> are said to be {{em|topological complements}} in <math>X.</math> 
That is true if and only if when considered as [additive](/source/additive_group) [topological groups](/source/topological_groups) (so scalar multiplication is ignored), <math>X</math> is the [topological direct sum of the topological subgroup](/source/Direct_sum_of_topological_groups)s <math>M</math> and <math>N.</math> 
If this is the case and if <math>X</math> is [Hausdorff](/source/Hausdorff_space) then <math>M</math> and <math>N</math> are necessarily [closed](/source/Closed_set) subspaces of <math>X.</math> 

If <math>M</math> is a vector subspace of a real or complex vector space <math>X</math>, there is always another vector subspace <math>N</math> of <math>X,</math> called an {{em|algebraic complement of <math>M</math> in <math>X,</math>}} such that <math>X</math> is the {{em|algebraic direct sum}} of <math>M</math> and <math>N</math>, which happens if and only if the addition map <math>M \times N \to X</math> is a [vector space isomorphism](/source/vector_space_isomorphism).

In contrast to algebraic direct sums, the existence of such a complement is no longer guaranteed for topological direct sums. 

A vector subspace <math>M</math> of <math>X</math> is said to be a ({{em|topologically}}) {{em|[complemented subspace](/source/complemented_subspace) of <math>X</math>}} if there exists some vector subspace <math>N</math> of <math>X</math> such that <math>X</math> is the topological direct sum of <math>M</math> and <math>N.</math> 
A vector subspace is called {{em|uncomplemented}} if it is not a complemented subspace. 
For example, every vector subspace of a Hausdorff TVS that is not a closed subset is necessarily uncomplemented. 
Every closed vector subspace of a [Hilbert space](/source/Hilbert_space) is complemented. 
But every [Banach space](/source/Banach_space) that is not a Hilbert space necessarily possess some uncomplemented closed vector subspace.

==Homomorphisms==
{{clarify|date=February 2015| reason = the context is unclear}}
The direct sum <math display="inline">\bigoplus_{i \in I} A_i</math> comes equipped with a ''[projection](/source/Projection_(mathematics))'' [homomorphism](/source/homomorphism) <math display="inline">\pi_j \colon \, \bigoplus_{i \in I} A_i \to A_j</math> for each ''j'' in ''I'' and a ''coprojection'' <math display="inline">\alpha_j \colon \, A_j \to \bigoplus_{i \in I} A_i</math> for each ''j'' in ''I''.<ref name=Heu26>{{cite book | title=Categorical Quantum Models and Logics | series=Pallas Proefschriften | first=Chris | last=Heunen | publisher=Amsterdam University Press | year=2009 | isbn=978-9085550242 | page=26 }}</ref>  Given another algebraic structure <math>B</math> (with the same additional structure) and homomorphisms <math>g_j \colon A_j \to B</math> for every ''j'' in ''I'', there is a unique homomorphism <math display="inline">g \colon \, \bigoplus_{i \in I} A_i \to B</math>, called the sum of the ''g''<sub>''j''</sub>, such that <math>g \alpha_j =g_j</math> for all ''j''.  Thus the direct sum is the [coproduct](/source/coproduct) in the appropriate [category](/source/category_(mathematics)).

==See also==
*[Direct sum of groups](/source/Direct_sum_of_groups)
*[Direct sum of permutations](/source/Direct_sum_of_permutations)
*[Direct sum of topological groups](/source/Direct_sum_of_topological_groups)
*[Restricted product](/source/Restricted_product)
*[Whitney sum](/source/Whitney_sum)
*[Feferman–Vaught theorem](/source/Feferman%E2%80%93Vaught_theorem)

==Notes==
{{reflist}}

==References==
*{{Lang Algebra|edition=3r}}

Category:Abstract algebra

---
Adapted from the Wikipedia article [Direct sum](https://en.wikipedia.org/wiki/Direct_sum) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Direct_sum?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
