For an *R*-module *M*, the set *E* = {*e*_{1}, *e*_{2}, ... *e*_{n}} is a free basis for *M* if 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 *r*_{1}*e*_{1} + *r*_{2}*e*_{2} + ... + *r*_{n}*e*_{n} = **0**, then *r*_{1} = *r*_{2} = ... = *r*_{n} = *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. In general, the summation which generates the elements *x* of *M* may be infinite but must converge in whatever sense is appropriate for *M*. For some modules this will mean that it must be a finite sum, and thus that 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*.