For an R-module M, the set E = {e1, e2, ... en} is a free basis for Mif and only if:
1) E is a generating set for M, that is to say every element of M is a sum of elements of E multiplied by coefficients in R.
2) if r1e1 + r2e2 + ... + rnen = 0, then r1 = r2 = ... = rn = 0 (where 0 is the identity element of M and 0 is the identity element of R).
If M has a free basis with n elements, then M is said to be free of rank n, or more generally free of finite rank.
Note that an immediate corollary of (2) is that the coefficients in (1) are unique for each x.
The definition of an infinite free basis is similar, except that E will have infinitely many elements. However the sum must be finite, and thus for any particular x only finitely many of the elements of E are involved.
In the case of an infinite basis, the rank of M is the cardinality of E.
In mathematics, particularly in abstract algebra and homological algebra, the concept of projective module over a ring R is a more flexible generalisation of the idea of a freemodule (that is, a module with basis vectors).
Using a basis of a freemodule F, it is easy to see that if we are given a surjective module homomorphism from N to M, the corresponding mapping from Hom(F,N) to Hom(F,M) is also surjective (it's from a product of copies of N to the product with the same index set for M).
Submodules of projective modules need not be projective; a ring R for which every submodule of a projective left module is projective is called left hereditary.