A vector space V is a direct sum of subspaces X1, X2, …, Xk, written V = X1⊕X2⊕∙∙∙⊕Xk, if every v ∈ V can be written uniquely v = x1 + x2 + … + xk where xi ∈ Xi for each i. Such a direct sum is referred to as internal. Given vector spaces V1, V2, …, Vk, the external direct sum V1⊕V2⊕∙∙∙⊕Vk is defined on the Cartesian product V1×V2×∙∙∙×Vk with componentwise addition and scalar multiplication. In a similar fashion, the direct sum of abelian groups, rings, and modules can be defined.