Algebra of formal sums
In mathematics, a free abelian group is an abelian group with a basis. Being an abelian group means that it is a set with an addition operation that is associative, commutative, and invertible. A basis, also called an integral basis, is a subset such that every element of the group can be uniquely expressed as an integer combination of finitely many basis elements. For instance the two-dimensional integer lattice forms a free abelian group, with coordinatewise addition as its operation, and with the two points (1,0) and (0,1) as its basis. Free abelian groups have properties which make them similar to vector spaces, and may equivalently be called free formula_1-modules, the free modules over the integers. Lattice theory studies free abelian subgroups of real vector spaces. In algebraic topology, free abelian groups are used to define chain groups, and in algebraic geometry they are used to define divisors. 
The elements of a free abelian group with basis formula_2 may be described in several equivalent ways. These include formal sums over formula_2, which are expressions of the form formula_4 where each formula_5 is a nonzero integer, each formula_6 is a distinct basis element, and the sum has finitely many terms. Alternatively, the elements of a free abelian group may be thought of as signed multisets containing finitely many elements of formula_2, with the multiplicity of an element in the multiset equal to its coefficient in the formal sum. 
Another way to represent an element of a free abelian group is as a function from formula_2 to the integers with finitely many nonzero values; for this functional representation, the group operation is the pointwise addition of functions.
Every set formula_2 has a free abelian group with formula_2 as its basis. This group is unique in the sense that every two free abelian groups with the same basis are isomorphic. Instead of constructing it by describing its individual elements, a free abelian group with basis formula_2 may be constructed as a direct sum of copies of the additive group of the integers, with one copy per member of formula_2. Alternatively, the free abelian group with basis formula_2 may be described by a presentation with the elements of formula_2 as its generators and with the commutators of pairs of members as its relators. The rank of a free abelian group is the cardinality of a basis; every two bases for the same group give the same rank, and every two free abelian groups with the same rank are isomorphic. Every subgroup of a free abelian group is itself free abelian; this fact allows a general abelian group to be understood as a quotient of a free abelian group by "relations", or as a cokernel of an injective homomorphism between free abelian groups. The only free abelian groups that are free groups are the trivial group and the infinite cyclic group.
Definition and examples.
A free abelian group is an abelian group that has a basis. Here, being an abelian group means that it is described by a set formula_15 of its elements and a binary operation on formula_15, conventionally denoted as an additive group by the formula_17 symbol (although it need not be the usual addition of numbers) that obey the following properties:
A basis is a subset formula_2 of the elements of formula_15 with the property that every element of formula_15 may be formed in a unique way by choosing finitely many basis elements formula_6 of formula_2, choosing a nonzero integer formula_36 for each of the chosen basis elements, and adding together formula_36 copies of the basis elements formula_6 for which formula_36 is positive, and formula_40 copies of formula_41 for each basis element for which formula_36 is negative. As a special case, the identity element can always be formed in this way as the combination of zero basis elements, according to the usual convention for an empty sum, and it must not be possible to find any other combination that represents the identity.
The integers formula_43, under the usual addition operation, form a free abelian group with the basis formula_44. The integers are commutative and associative, with 0 as the additive identity and with each integer having an additive inverse, its negation. Each non-negative formula_19 is the sum of formula_19 copies of formula_47, and each negative integer formula_19 is the sum of formula_30 copies of formula_50, so the basis property is also satisfied.
An example where the group operation is different from the usual addition of numbers is given by the positive rational numbers formula_51, which form a free abelian group with the usual multiplication operation on numbers and with the prime numbers as their basis. Multiplication is commutative and associative, with the number formula_47 as its identity and with formula_53 as the inverse element for each positive rational number formula_19. The fact that the prime numbers forms a basis for multiplication of these numbers follows from the fundamental theorem of arithmetic, according to which every positive integer can be factorized uniquely into the product of finitely many primes or their inverses. If formula_55 is a positive rational number expressed in simplest terms, then formula_56 can be expressed as a finite combination of the primes appearing in the factorizations of formula_57 and formula_58. The number of copies of each prime to use in this combination is its exponent in the factorization of formula_57, or the negation of its exponent in the factorization of formula_58.
The polynomials of a single variable formula_19, with integer coefficients, form a free abelian group under polynomial addition, with the powers of formula_19 as a basis. As an abstract group, this is the same as (an isomorphic group to) the multiplicative group of positive rational numbers. One way to map these two groups to each other, showing that they are isomorphic, is to reinterpret the exponent of the formula_63th prime number in the multiplicative group of the rationals as instead giving the coefficient of formula_64 in the corresponding polynomial, or vice versa. For instance the rational number formula_65 has exponents of formula_66 for the first three prime numbers formula_67 and would correspond in this way to the polynomial formula_68 having the same coefficients formula_66 for its constant, linear, and quadratic terms. Because these mappings merely reinterpret the same numbers, they define a bijection between the elements of the two groups. And because the group operation of multiplying positive rationals acts additively on the exponents of the prime numbers, in the same way that the group operation of adding polynomials acts on the coefficients of the polynomials, these maps preserve the group structure; they are homomorphisms. A bijective homomorphism is called an isomorphism, and its existence demonstrates that these two groups have the same properties.
Although the representation of each group element in terms of a given basis is unique, a free abelian group has generally more than one basis, and different bases will generally result in different representations of its elements. For example, if one replaces any element of a basis by its inverse, one gets another basis. As a more elaborated example, the two-dimensional integer lattice formula_70, consisting of the points in the plane with integer Cartesian coordinates, forms a free abelian group under vector addition with the basis formula_71. For this basis, the element formula_72 can be written where 'multiplication' is defined so that, for instance, There is no other way to write formula_72 in the same basis. However, with a different basis such as formula_74, it can be written as Generalizing this example, every lattice forms a finitely-generated free abelian group. The formula_75-dimensional integer lattice formula_76 has a natural basis consisting of the positive integer unit vectors, but it has many other bases as well: if formula_77 is a formula_78 integer matrix with determinant formula_79, then the rows of formula_77 form a basis, and conversely every basis of the integer lattice has this form. For more on the two-dimensional case, see fundamental pair of periods.
Constructions.
Every set can be the basis of a free abelian group, which is unique up to group isomorphisms. The free abelian group for a given basis set can be constructed in several different but equivalent ways: as a direct sum of copies of the integers, as a family of integer-valued functions, as a signed multiset, or by a presentation of a group.
Products and sums.
The direct product of groups consists of tuples of an element from each group in the product, with componentwise addition. The direct product of two free abelian groups is itself free abelian, with basis the disjoint union of the bases of the two groups. More generally the direct product of any finite number of free abelian groups is free abelian. The formula_75-dimensional integer lattice, for instance, is isomorphic to the direct product of formula_75 copies of the integer group formula_1. The trivial group formula_84 is also considered to be free abelian, with basis the empty set. It may be interpreted as an empty product, the direct product of zero copies of formula_1.
For infinite families of free abelian groups, the direct product is not necessarily free abelian. For instance the Baer–Specker group formula_86, an uncountable group formed as the direct product of countably many copies of formula_43, was shown in 1937 by Reinhold Baer to not be free abelian, although Ernst Specker proved in 1950 that all of its countable subgroups are free abelian. Instead, to obtain a free abelian group from an infinite family of groups, the direct sum rather than the direct product should be used. The direct sum and direct product are the same when they are applied to finitely many groups, but differ on infinite families of groups. In the direct sum, the elements are again tuples of elements from each group, but with the restriction that all but finitely many of these elements are the identity for their group. The direct sum of infinitely many free abelian groups remains free abelian. It has a basis consisting of tuples in which all but one element is the identity, with the remaining element part of a basis for its group.
Every free abelian group may be described as a direct sum of copies of formula_43, with one copy for each member of its basis. This construction allows any set formula_2 to become the basis of a free abelian group.
Integer functions and formal sums.
Given a set formula_2, one can define a group formula_91 whose elements are functions from formula_2 to the integers, where the parenthesis in the superscript indicates that only the functions with finitely many nonzero values are included.
If formula_93 and formula_94 are two such functions, then formula_95 is the function whose values are sums of the values in formula_96 and formula_97: that is, This pointwise addition operation gives formula_91 the structure of an abelian group.
Each element formula_19 from the given set formula_2 corresponds to a member of formula_91, the function formula_102 for which formula_103 and for which formula_104 for all formula_105.
Every function formula_96 in formula_91 is uniquely a linear combination of a finite number of basis elements:
formula_108
Thus, these elements formula_102 form a basis for formula_91, and formula_91 is a free abelian group.
In this way, every set formula_2 can be made into the basis of a free abelian group.
The elements of formula_91 may also be written as formal sums, expressions in the form of a sum of finitely many terms, where each term is written as the product of a nonzero integer with a distinct member of formula_2. These expressions are considered equivalent when they have the same terms, regardless of the ordering of terms, and they may be added by forming the union of the terms, adding the integer coefficients to combine terms with the same basis element, and removing terms for which this combination produces a zero coefficient. They may also be interpreted as the signed multisets of finitely many elements of formula_2.
Presentation.
A presentation of a group is a set of elements that generate the group (meaning that all group elements can be expressed as products of finitely many generators), together with "relators", products of generators that give the identity element. The elements of a group defined in this way are equivalence classes of sequences of generators and their inverses, under an equivalence relation that allows inserting or removing any relator or generator-inverse pair as a contiguous subsequence. The free abelian group with basis formula_2 has a presentation in