Free abelian group

In abstract algebra, a free abelian group is an abelian group that has a "basis" in the sense that every element of the group can be written in one and only one way as a finite linear combination of elements of the basis, with integer coefficients. Unlike vector spaces, not all abelian groups have a basis, hence the special name for those that do. A typical example of a free abelian group is the direct sum Z ⊕ Z of two copies of the infinite cyclic group Z; a basis is {(1,0),(0,1)}. The trivial abelian group {0} is also considered to be free abelian, with basis the empty set.
Note a point on terminology: a free abelian group is not the same as a free group that is abelian; in fact the only free groups that are abelian are those of rank 0 (the trivial group) and rank 1 (the infinite cyclic group).
If F is a free abelian group with basis B, then we have the following universal property: for every arbitrary function f from B to some abelian group A, there exists a unique group homomorphism from F to A which extends f. This universal property can also be used to define free abelian groups.
For every set B, there exists a free abelian group with basis B, and all such free abelian groups having B as basis are isomorphic. One exemplar may be constructed as the abelian group of functions on B, taking integer values all but finitely many of which are zero. This is the direct sum of copies of Z, one copy for each element of B. Formal sums of elements of a given set B are nothing but the elements of the free abelian group with basis B.
Every finitely generated free abelian group is therefore isomorphic to Z^{n} for some natural number n called the rank of the free abelian group. In general, a free abelian group F has many different bases, but all bases have the same cardinality, and this cardinality is called the rank of F. This rank of free abelian groups can be used to define the rank of all other abelian groups: see rank of an abelian group.
Given any abelian group A, there always exists a free abelian group F and a surjective group homomorphism from F to A. This follows from the universal property mentioned above.
Importantly, every subgroup of a free abelian group is free abelian. As a consequence, to every abelian group A there exists a short exact sequence
 0 → G → F → A → 0
with F and G being free abelian (which means that A is isomorphic to the factor group F/G). This is called a free resolution of A. Furthermore, the free abelian groups are precisely the projective objects in the category of abelian groups.
All free abelian groups are torsion free, and all finitely generated torsion free abelian groups are free abelian. (The same applies to flatness, since an abelian group is torsion free if and only if it is flat.) The additive group of rational numbers Q is a (not finitely generated) torsion free group that's not free abelian. The reason: Q is divisible but nonzero free abelian groups are never divisible.
Free abelian groups are a special case of free modules, as abelian groups are nothing but modules over the ring Z.
It can be surprisingly difficult to determine whether a concretely given group is free abelian. Consider for instance the BaerSpecker group Z^{N}, the direct product of countably many copies of Z. R. Baer proved in 1937 that this group is not free abelian; Specker proved in 1950 that every countable subgroup of Z^{N} is free abelian.de:Freie abelsche Gruppe