Misc

## Equivalence relation

From Wikipedia:Equivalence relation:

An Equivalence relation is a generalization of the concept of "is equal to". It has the following properites:

* *a* = *a* (reflexive property),
* if *a* = *b* then *b* = *a* (symmetric property), and
* if *a* = *b* and *b* = *c* then *a* = *c* (transitive property).

As a consequence of the reflexive, symmetric, and transitive properties, any equivalence relation provides a partition of the underlying set into disjoint equivalence classes. Two elements of the given set are equivalent to each other if and only if they belong to the same equivalence class.

Back to top

### Modular arithmetic

From Wikipedia:Modular arithmetic :

Modular arithmetic can be handled mathematically by introducing a congruence relation.

a
≡
b

(
mod

n
)
.

{\displaystyle a\equiv b\pmod n.}

Two numbers *a* and *b* are said to be  *congruent modulo n* if *a* and *b* have the same remainder when divided by positive integer *n*.

# a
p
n
r
,

{\displaystyle a=pn+r,}

# b
q
n
r
,

{\displaystyle b=qn+r,}

The number *n* is called the  *modulus* of the congruence.

The congruence relation satisfies all the conditions of an equivalence relation.

The equivalence class consisting of the integers congruent to a modulo n, is called the congruence class or residue class.

Back to top

#### Quadratic reciprocity

See also: Reciprocity law and Class field theory
From Wikipedia:Quadratic reciprocity:

Consider the polynomial

f
(
n
# )

n

2

−
5

{\displaystyle f(n)=n^{2}-5}

 and its values for

n
∈

N

.

{\displaystyle n\in\mathbb{N}.}

 The prime factorizations of these values are given as follows:

The prime factors

p

{\displaystyle p}

 dividing

f
(
n
)

{\displaystyle f(n)}

 are

# p
2
,
5

{\displaystyle p=2,5}

, and every prime whose final digit is

1

{\displaystyle 1}

 or

9

{\displaystyle 9}

; no primes ending in

3

{\displaystyle 3}

 or

7

{\displaystyle 7}

 ever appear.

Now,

p

{\displaystyle p}

 is a prime factor of

n

2

−
5

{\displaystyle n^{2}-5}

 whenever

n

2

−
5
≡
0

(

mod

p
)

{\displaystyle n^{2}-5\equiv 0\ ({\text{mod }}p)}

In other words, whenever

n

2

≡
5

(

mod

p
)

{\displaystyle n^{2}\equiv 5\ ({\text{mod }}p)}

.
In this case this happens whenever

n

2

≡
p

(

mod

5
)

{\displaystyle n^{2}\equiv p\ ({\text{mod }}5)}

The law of Quadratic reciprocity gives a similar characterization of prime divisors of

f
(
n
# )

n

2

−
q

{\displaystyle f(n)=n^{2}-q}

 for any prime *q*, which leads to a characterization for any integer

q

{\displaystyle q}

.

**Law of quadratic reciprocity** — Let *p* and *q* be distinct odd prime numbers, and define the Legendre symbol as:

(

q
p

)

=

{

1

if

n

2

≡
q

(
mod

p
)

 for some unknown integer

n
,

0

if

q
≡
0

(
mod

p
)

−
1

otherwise.

{\displaystyle \left({\frac {q}{p}}\right)=\left\{{\begin{array}{rl}1&{\text{if }}\,n^{2}\equiv q\!{\pmod {p}}\,{\text{ for some unknown integer }}n,\\0&{\text{if }}q\equiv 0{\pmod {p}}\\-1&{\text{otherwise.}}\end{array}}\right.}

Where:

(

q
p

)

≡

q

p
−
1

2

(
mod

p
)

{\displaystyle \left({\frac {q}{p}}\right)\equiv q^{\frac {p-1}{2}}{\pmod {p}}}

Then:

(

p
q

)

(

q
p

)

=
(
−
1

)

p
−
1

2

q
−
1

2

.

{\displaystyle \left({\frac {p}{q}}\right)\left({\frac {q}{p}}\right)=(-1)^{{\frac {p-1}{2}}{\frac {q-1}{2}}}.}

This law allows the easy calculation of whether there exists any integer solution *n* for a quadratic equation of the form

n

2

≡
q

(
mod

p
)

{\displaystyle n^{2}\equiv q\,{\pmod {p}}}

 for *p* an odd prime. However it gives no help at all for *finding* a specific solution; for this, one uses quadratic residues.

## Ideal

In ring theory, a branch of abstract algebra, an **ideal** is a special subset of a ring. Ideals generalize certain subsets of the integers, such as the even numbers or the multiples of 3.

Addition and subtraction of even numbers preserves evenness, and multiplying an even number by any other integer results in another even number; these closure and absorption properties are the defining properties of an ideal.

An ideal can be used to construct a quotient ring similarly to the way that, in group theory, a normal subgroup can be used to construct a quotient group.

To understand the concept of an ideal, consider how ideals arise in the construction of rings of "elements modulo". For concreteness, let us look at the ring ℤ*n* of integers modulo a given integer *n* ∈ ℤ (note that ℤ is a commutative ring). The key observation here is that we obtain ℤ*n* by taking ℤ and wrapping it around itself so that *n* gets identified with 0 (since *n* is congruent to 0 modulo *n*). However, when doing so we must ensure that the resulting structure is again a ring. This requirement forces us to make some additional identifications. The notion of an ideal arises when we ask the question:

> What is the exact set of integers that we are forced to identify with 0?
>
>

 The answer is the set *n*ℤ = {*nm* | *m*∈ℤ} of all integers congruent to 0 modulo *n*. That is, we must wrap ℤ around itself infinitely many times so that the integers ..., *n ⋅ -2*, *n ⋅ -1*, *n ⋅ +1*, *n ⋅ +2*, ... will all align with 0. If we look at what properties this set must satisfy in order to ensure that ℤ*n* is a ring, then we arrive at the definition of an ideal. Indeed, one can directly verify that *n*ℤ is an ideal of ℤ.

**Remark.** Identifications with elements other than 0 also need to be made. For example, the elements in 1 + *n*ℤ must be identified with 1, the elements in 2 + *n*ℤ must be identified with 2, and so on. Those, however, are uniquely determined by *n*ℤ since *ℤ* is an additive group.

Back to top

### Coset

Let *G* be the additive group of the integers, Z = ({..., −2, −1, 0, 1, 2, ...}, +) and *H* the subgroup (*m***Z**, +) = ({..., −2*m*, −*m*, 0, *m*, 2*m*, ...}, +) where *m* is a positive integer. Then the cosets of *H* in *G* are the *m* sets *m***Z**, *m***Z** + 1, ..., *m***Z** + (*m* − 1), where *m***Z** + *a* = {..., −2*m*+*a*, −*m*+*a*, *a*, *m*+*a*, 2*m*+*a*, ...}. There are no more than *m* cosets, because *m***Z** + *m* = *m*(**Z** + 1) = *m***Z**. The coset (*m***Z** + *a*, +) is the congruence class of *a* modulo *m*.

Another example of a coset comes from the theory of vector spaces. The elements (vectors) of a vector space form an abelian group under vector addition. It is not hard to show that subspaces of a vector space are subgroups of this group. For a vector space *V*, a subspace *W*, and a fixed vector *a* in *V*, the sets

{
x
∈
V
:
# x
a
n
,
n
∈
W
}

{\displaystyle \{x\in V\colon x=a+n,n\in W\}}

are called affine subspaces, and are cosets (both left and right, since the group is abelian). In terms of geometric vectors, these affine subspaces are all the "lines" or "planes" parallel to the subspace, which is a line or plane going through the origin.

Back to top

## Polynomial ring

From Wikipedia:Polynomial ring:

The **polynomial ring**, *K*[*X*], in *X* over a field *K* is defined as the set of expressions, called **polynomials** in *X*, of the form

# p

p

0

p

1

X

p

2

X

2

⋯

p

m
−
1

X

m
−
1

p

m

X

m

,

{\displaystyle p=p\_{0}+p\_{1}X+p\_{2}X^{2}+\cdots +p\_{m-1}X^{m-1}+p\_{m}X^{m},}

The polynomial ring in *X* over *K* is equipped with an addition, a multiplication and a scalar multiplication that make it a commutative algebra. These operations are defined according to the ordinary rules for manipulating algebraic expressions. Specifically, if

# p

p

0

p

1

X

p

2

X

2

⋯

p

m

X

m

,

{\displaystyle p=p\_{0}+p\_{1}X+p\_{2}X^{2}+\cdots +p\_{m}X^{m},}

# q

q

0

q

1

X

q

2

X

2

⋯

q

n

X

n

,

{\displaystyle q=q\_{0}+q\_{1}X+q\_{2}X^{2}+\cdots +q\_{n}X^{n},}

then

p
# q

r

0

r

1

X

r

2

X

2

⋯

r

k

X

k

,

{\displaystyle p+q=r\_{0}+r\_{1}X+r\_{2}X^{2}+\cdots +r\_{k}X^{k},}

where

r

i

=

p

i

q

i

{\displaystyle r\_{i}=p\_{i}+q\_{i}}

# k
m
a
x
(
m
,
n
)

{\displaystyle k=max(m,n)}

and

p
# q

s

0

s

1

X

s

2

X

2

⋯

s

l

X

l

,

{\displaystyle pq=s\_{0}+s\_{1}X+s\_{2}X^{2}+\cdots +s\_{l}X^{l},}

where

s

i

=

p

0

q

i

p

1

q

i
−
1

⋯

p

i

q

0

.

{\displaystyle s\_{i}=p\_{0}q\_{i}+p\_{1}q\_{i-1}+\cdots +p\_{i}q\_{0}.}

# l
m
n
,

{\displaystyle l=m+n,}

The scalar multiplication is

p

0

(

q

0

q

1

X
…

q

n

X

n

# )

p

0

q

0

(

p

0

q

1

)
X
⋯
(

p

0

q

n

)

X

n

{\displaystyle p\_{0}(q\_{0}+q\_{1}X+\dots q\_{n}X^{n})=p\_{0}q\_{0}+(p\_{0}q\_{1})X+\cdots +(p\_{0}q\_{n})X^{n}}

It is easy to verify that these three operations satisfy the axioms of a commutative algebra. Therefore, polynomial rings are also called *polynomial algebras*.

Gauss remarked that the procedure of division with the remainder can also be defined for polynomials: given two polynomials *p* and *q* with *q* ≠ 0, one can write

# p
u
q
r
,

{\displaystyle p=uq+r,}

where the quotient *u* and the remainder *r* are polynomials, and the degree of *r* is strictly less than the degree of *q*. Moreover, a decomposition of this form is unique. The quotient and the remainder are found using polynomial long division.

x

2

x
3

x
−
3

)

x

3

−
2

x

2

0
x
−
4

¯

x

3

−
3

x

2

0
x
−
4

\_

x

2

0
x

−
4

x

2

−
3
x

−
4

\_

3
x
−
4

3
x
−
9

\_

5

{\displaystyle {\begin{array}{r}x^{2}+x+3\\x-3\,{\overline {)\,x^{3}-2x^{2}+0x-4}}\\{\underline {x^{3}-3x^{2}{\color {White}{}+0x-4}}}\\x^{2}+0x{\color {White}{}-4}\\{\underline {x^{2}-3x{\color {White}{}-4}}}\\3x-4\\{\underline {3x-9}}\\5\end{array}}}

therefore

x

3

−
2

x

2

0
x
−
# 4
(

x

2

x
3
)
(
x
−
3
)
5

{\displaystyle x^{3}-2x^{2}+0x-4=(x^{2}+x+3)(x-3)+5}

Using the existence of greatest common divisors, Gauss was able to simultaneously rigorously prove the fundamental theorem of arithmetic for integers and its generalization to polynomials.

For polynomials over the integers, over the rational numbers, or over a finite field, there are efficient algorithms for computing the factorization that are implemented in computer algebra systems (see Factorization of polynomials).

Polynomial rings occur in many parts of mathematics, and the study of their properties was among the main motivations for the development of commutative algebra and ring theory. Polynomial rings and their ideals are fundamental in algebraic geometry.

Many classes of rings, such as unique factorization domains, regular rings, group rings, rings of formal power series, Ore polynomials, graded rings, are generalizations of polynomial rings.

Further reading: Polynomial ring

Back to top

## Commutative algebra

From Wikipedia:Commutative algebra :

Commutative algebra is essentially the study of the rings occurring in algebraic number theory and algebraic geometry.

The notion of localization of a ring (in particular the localization with respect to a prime ideal, the localization consisting in inverting a single element and the total quotient ring) is one of the main differences between commutative algebra and the theory of non-commutative rings. It leads to an important class of commutative rings, the local rings that have only one maximal ideal. The set of the prime ideals of a commutative ring is naturally equipped with a topology, the Zariski topology. All these notions are widely used in algebraic geometry and are the basic technical tools for the definition of scheme theory, a generalization of algebraic geometry introduced by Grothendieck.

Many other notions of commutative algebra are counterparts of geometrical notions occurring in algebraic geometry. This is the case of Krull dimension, primary decomposition, regular rings, Cohen–Macaulay rings, Gorenstein rings and many other notions.

Back to top

### localization of a ring

From Wikipedia:Localization (commutative algebra)

In commutative algebra and algebraic geometry, **localization** is a formal way to introduce the "denominators" to a given ring or module. That is, it introduces a new ring/module out of an existing one so that it consists of fractions

m
s

,

{\displaystyle {\frac {m}{s}},}

 such that the denominator *s* belongs to a given subset *S* of *R*. If *S* is the set of the non-zero elements of an integral domain, then the localization is the field of fractions: this case generalizes the construction of the ring **Q** of rational numbers from the ring **Z** of rational integers.

The technique has become fundamental, particularly in algebraic geometry, as it provides a natural link to sheaf theory. In fact, the term *localization* originated in algebraic geometry: if *R* is a ring of functions defined on some geometric object (algebraic variety) *V*, and one wants to study this variety "locally" near a point *p*, then one considers the set *S* of all functions which are not zero at *p* and localizes *R* with respect to *S*. The resulting ring *R\** contains only information about the behavior of *V* near *p* (c.f. the example given at local ring).

An important related process is completion: one often localizes a ring/module, then completes.

Back to top

### Completion of a ring

From Wikipedia:Completion of a ring

In abstract algebra, a **completion** is any of several related functors on rings and modules that result in complete topological rings and modules. Completion is similar to localization, and together they are among the most basic tools in analysing commutative rings. Complete commutative rings have a simpler structure than general ones, and Hensel's lemma applies to them. In algebraic geometry, a completion of a ring of functions *R* on a space *X* concentrates on a **formal neighborhood** of a point of *X*: heuristically, this is a neighborhood so small that *all* Taylor series centered at the point are convergent. An algebraic completion is constructed in a manner analogous to completion of a metric space with Cauchy sequences, and agrees with it in case *R* has a metric given by a non-Archimedean absolute value.

## Calculus of variations

Calculus of variations, Functional, Functional analysis, Higher-order function
Whereas calculus is concerned with infinitesimal changes of variables, calculus of variations is concerned with infinitesimal changes of the underlying function itself.

Calculus of variations is a field of mathematical analysis that uses variations, which are small changes in functions and functionals, to find maxima and minima of functionals.

A simple example of such a problem is to find the curve of shortest length connecting two points. If there are no constraints, the solution is obviously a straight line between the points. However, if the curve is constrained to lie on a surface in space, then the solution is less obvious, and possibly many solutions may exist. Such solutions are known as geodesics. A related problem is posed by Fermat's principle: light follows the path of shortest optical length connecting two points, where the optical length depends upon the material of the medium. One corresponding concept in mechanics is the principle of least action.

Given an equation that you want to minimize

∫

a

b

F
(
x
,
y
(
x
)
,

y
′

(
x
)
)

d

x

{\displaystyle \int \_{a}^{b}F(x,y(x),y'(x))\,\mathrm {d} x}

You then solve the corresponding Euler–Lagrange equation for y(x).

∂
F

∂
y

−

d

d
x

∂
F

∂

y
′

=
0

{\displaystyle {\frac {\partial F}{\partial y}}-{\frac {d}{dx}}{\frac {\partial F}{\partial y'}}=0}

Back to top

## Direct product

From Wikipedia:Direct product

In mathematics, one can often define the **direct product** of objects already known, giving a new one. This generalizes the Cartesian product of the underlying sets, together with a suitably defined structure on the product set. More abstractly, one talks about the product in category theory, which formalizes these notions.

Examples are the product of sets, groups (described below), rings, and other algebraic structures. The product of topological spaces is another instance.

There is also the direct sum – in some areas this is used interchangeably, while in others it is a different concept.

### Examples

* If we think of

R

{\displaystyle \R}

 as the set of real numbers, then the direct product

R

×

R

{\displaystyle \R \times \R}

 is just the Cartesian product

{
(
x
,
y
)
∣
x
,
y
∈

R

}

{\displaystyle \{(x,y)\mid x,y\in \mathbb {R} \}}

.
* If we think of

R

{\displaystyle \R}

 as the group of real numbers under addition, then the direct product

R

×

R

{\displaystyle \R \times \R}

 still has

{
(
x
,
y
)
∣
x
,
y
∈

R

}

{\displaystyle \{(x,y)\mid x,y\in \mathbb {R} \}}

 as its underlying set. The difference between this and the preceding example is that

R

×

R

{\displaystyle \R \times \R}

 is now a group, and so we have to also say how to add their elements. This is done by defining

(
a
,
b
)
(
c
,
d
# )
(
a
c
,
b
d
)

{\displaystyle (a,b)+(c,d)=(a+c,b+d)}

.
* If we think of

R

{\displaystyle \R}

 as the ring of real numbers, then the direct product

R

×

R

{\displaystyle \R \times \R}

 again has

{
(
x
,
y
)
∣
x
,
y
∈

R

}

{\displaystyle \{(x,y)\mid x,y\in \mathbb {R} \}}

 as its underlying set. The ring structure ring consists of addition defined by

(
a
,
b
)
(
c
,
d
# )
(
a
c
,
b
d
)

{\displaystyle (a,b)+(c,d)=(a+c,b+d)}

 and multiplication defined by

(
a
,
b
)
(
c
,
d
# )
(
a
c
,
b
d
)

{\displaystyle (a,b)(c,d)=(ac,bd)}

.
* However, if we think of

R

{\displaystyle \R}

 as the field of real numbers, then the direct product

R

×

R

{\displaystyle \R \times \R}

 does not exist – naively defining addition and multiplication componentwise as in the above example would not result in a field since the element

(
1
,
0
)

{\displaystyle (1,0)}

 does not have a multiplicative inverse.

In a similar manner, we can talk about the direct product of finitely many algebraic structures, e.g.

R

×

R

×

R

×

R

{\displaystyle \mathbb {R} \times \mathbb {R} \times \mathbb {R} \times \mathbb {R} }

. This relies on the fact that the direct product is associative up to isomorphism. That is,

(
A
×
B
)
×
C
≅
A
×
(
B
×
C
)

{\displaystyle (A\times B)\times C\cong A\times (B\times C)}

 for any algebraic structures

A

{\displaystyle A}

,

B

{\displaystyle B}

, and

C

{\displaystyle C}

 of the same kind. The direct sum is also commutative up to isomorphism, i.e.

A
×
B
≅
B
×
A

{\displaystyle A\times B\cong B\times A}

 for any algebraic structures

A

{\displaystyle A}

 and

B

{\displaystyle B}

 of the same kind. We can even talk about the direct product of infinitely many algebraic structures; for example we can take the direct product of countably many copies of

R

{\displaystyle \R}

, which we write as

R

×

R

×

R

×
⋯

{\displaystyle \mathbb {R} \times \mathbb {R} \times \mathbb {R} \times \dotsb }

.

### Group direct product

Main articles: Direct product of groups
In group theory one can define the direct product of two groups (*G*, ∘) and (*H*, ∙), denoted by *G* × *H*. For abelian groups which are written additively, it may also be called the direct sum of two groups, denoted by

G
⊕
H

{\displaystyle G\oplus H}

.

It is defined as follows:

* the set of the elements of the new group is the *Cartesian product* of the sets of elements of *G* and *H*, that is {(*g*, *h*): *g* ∈ *G*, *h* ∈ *H*};
* on these elements put an operation, defined element-wise:
(*g*, *h*) × (*g'*, *h'* ) = (*g* ∘ *g'*, *h* ∙ *h'*)

(Note that (*G*, ∘) may be the same as (*H*, ∙))

This construction gives a new group. It has a normal subgroup isomorphic to *G* (given by the elements of the form (*g*, 1)), and one isomorphic to *H* (comprising the elements (1, *h*)).

The reverse also holds, there is the following recognition theorem: If a group *K* contains two normal subgroups *G* and *H*, such that *K*= *GH* and the intersection of *G* and *H* contains only the identity, then *K* is isomorphic to *G* × *H*. A relaxation of these conditions, requiring only one subgroup to be normal, gives the semidirect product.

As an example, take as *G* and *H* two copies of the unique (up to isomorphisms) group of order 2, *C*2: say {1, *a*} and {1, *b*}. Then *C*2×*C*2 = {(1,1), (1,*b*), (*a*,1), (*a*,*b*)}, with the operation element by element. For instance, (1,*b*)\*(*a*,1) = (1\**a*, *b*\*1) = (*a*,*b*), and (1,*b*)\*(1,*b*) = (1,*b*2) = (1,1).

With a direct product, we get some natural group homomorphisms for free: the projection maps define by

π

1

:
G
×
H
→
G
,

π

1

(
g
,
h
)

=
g

π

2

:
G
×
H
→
H
,

π

2

(
g
,
h
)

=
h

{\displaystyle {\begin{aligned}\pi \_{1}:G\times H\to G,\ \ \pi \_{1}(g,h)&=g\\\pi \_{2}:G\times H\to H,\ \ \pi \_{2}(g,h)&=h\end{aligned}}}

called the **coordinate functions**.

Also, every homomorphism *f* to the direct product is totally determined by its component functions

f

i

=

π

i

∘
f

{\displaystyle f\_{i}=\pi \_{i}\circ f}

.

For any group (*G*, ∘) and any integer *n* ≥ 0, repeated application of the direct product gives the group of all *n*-tuples *G**n* (for *n* = 0 we get the trivial group), for example **Z***n* and **R***n*.

### Direct product of modules

The direct product for modules (not to be confused with the tensor product) is very similar to the one defined for groups above, using the Cartesian product with the operation of addition being componentwise, and the scalar multiplication just distributing over all the components. Starting from **R** we get Euclidean space **R***n*, the prototypical example of a real *n*-dimensional vector space. The direct product of **R***m* and **R***n* is **R***m*+*n*.

 Note that a direct product for a finite index

∏

# i
1

n

X

i

{\displaystyle \prod \_{i=1}^{n}X\_{i}}

 is identical to the direct sum

⨁

# i
1

n

X

i

{\displaystyle \bigoplus \_{i=1}^{n}X\_{i}}

. The direct sum and direct product differ only for infinite indices, where the elements of a direct sum are zero for all but for a finite number of entries. They are dual in the sense of category theory: the direct sum is the coproduct, while the direct product is the product.

 For example, consider

# i
1

∞

R

{\displaystyle X=\prod \_{i=1}^{\infty }\mathbb {R} }

 and

# i
1

∞

R

{\displaystyle Y=\bigoplus \_{i=1}^{\infty }\mathbb {R} }

, the infinite direct product and direct sum of the real numbers. Only sequences with a finite number of non-zero elements are in *Y*. For example, (1,0,0,0,...) is in *Y* but (1,1,1,1,...) is not. Both of these sequences are in the direct product *X*; in fact, *Y* is a proper subset of *X* (that is, *Y* ⊂ *X*).

## Direct sum

From Wikipedia:Direct sum

The **direct sum** is an operation from abstract algebra, a branch of mathematics. For example, the direct sum

R

⊕

R

{\displaystyle \mathbf {R} \oplus \mathbf {R} }

, where

R

{\displaystyle \mathbf{R}}

 is real coordinate space, is the Cartesian plane,

R

2

{\displaystyle \mathbf{R}^{2}}

.

To see how direct sum is used in abstract algebra, consider a more elementary structure in abstract algebra, the abelian group. The direct sum of two abelian groups

A

{\displaystyle A}

 and

B

{\displaystyle B}

 is another abelian group

A
⊕
B

{\displaystyle A \oplus B}

 consisting of the ordered pairs

(
a
,
b
)

{\displaystyle (a,b)}

 where

a
∈
A

{\displaystyle a \in A}

 and

b
∈
B

{\displaystyle b\in B}

.

* (Confusingly this ordered pair is also called the cartesian product of the two groups.)

To add ordered pairs, we define the sum

(
a
,
b
)
(
c
,
d
)

{\displaystyle (a, b) + (c, d)}

 to be

(
a
c
,
b
d
)

{\displaystyle (a + c, b + d)}

; in other words addition is defined coordinate-wise.

A similar process can be used to form the direct sum of any two algebraic structures, such as rings, modules, and vector spaces.

We can form direct sums with any finite number of summands, for example

A
⊕
B
⊕
C

{\displaystyle A\oplus B\oplus C}

, provided

A
,
B
,

{\displaystyle A,B,}

 and

C

{\displaystyle C}

 are the same kinds of algebraic structures (that is, all groups, rings, vector spaces, etc.).

* This relies on the fact that the direct sum is associative up to isomorphism. That is,

(
A
⊕
B
)
⊕
C
≅
A
⊕
(
B
⊕
C
)

{\displaystyle (A\oplus B)\oplus C\cong A\oplus (B\oplus C)}

 for any algebraic structures

A

{\displaystyle A}

,

B

{\displaystyle B}

, and

C

{\displaystyle C}

 of the same kind.
* The direct sum is also commutative up to isomorphism, i.e.

A
⊕
B
≅
B
⊕
A

{\displaystyle A\oplus B\cong B\oplus A}

 for any algebraic structures

A

{\displaystyle A}

 and

B

{\displaystyle B}

 of the same kind.

In the case of any finite number of summands, the direct sum is the same as the direct product. If the arithmetic operation is written as +, as it usually is in abelian groups, then we use the direct sum. If the arithmetic operation is written as × or ⋅ or using juxtaposition (as in the expression

x
y

{\displaystyle xy}

) we use direct product.

In the case where infinitely many objects are combined, most authors make a distinction between direct sum and direct product. As an example, consider the direct sum and direct product of infinitely many real lines. An element in the direct product is an infinite sequence, such as (1,2,3,...) but in the direct sum, there would be 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.

* More generally, 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
∈
I

{\displaystyle (A\_{i})\_{i\in I}}

, the direct sum

⨁

i
∈
I

A

i

{\displaystyle \bigoplus \_{i\in I}A\_{i}}

 is defined to be the set of tuples

(

a
i

)

i
∈
I

{\displaystyle (a\_i)\_{i \in I}}

 with

a

i

∈

A

i

{\displaystyle a\_{i}\in A\_{i}}

 such that

a
i

=
0

{\displaystyle a\_i = 0}

 for all but finitely many *i*.

The direct sum

⨁

i
∈
I

A

i

{\displaystyle \bigoplus \_{i\in I}A\_{i}}

 is contained in the direct product

∏

i
∈
I

A
i

{\displaystyle \prod\_{i \in I} A\_i}

, but is usually strictly smaller when the index set

I

{\displaystyle I}

 is infinite, because direct products do not have the restriction that all but finitely many coordinates must be zero.

1. ↑ Herstein p. 153
2. ↑ Wikipedia:Calculus of variations