An -module is free if it has a basis: a subset such that every element has a unique expression as a finite -linear combination of elements of .
Choose a maximal ideal of the nonzero ring . If , quotienting by gives
These are vector spaces over the field , so equality of dimension gives . This proves invariant basis number for a commutative ring.
A direct summand of a free module need not be free. Take . Its ideals and satisfy
so . But has three elements, whereas a finite-rank free -module has elements; hence is not free.