# A module that has a basis shorter than its rank?

Rank has been defined to me as the maximum number of elements of M which are linearly independent, allowing the rank to be $$0$$ if the module is of torsion, or $$\infty$$ if there is no maximum. Now, the course is based pretty much on the book Abstract Algebra by Dummit and Foote, and there the rank is defined to be as the length of a basis of $$M$$ (assume $$M$$ has a finite basis and that $$R$$ is commutative with $$1$$ here to have a well defined rank).

We now are seeing the following theorem:

Let $$R$$ be a PID and $$M$$ a free module of rank $$n$$. Then any submodule $$N$$ of $$M$$ satisfies:

(1) $$N$$ is free of rank less than $$n$$.

(2) There is a basis $$y_1,...,y_n$$ of $$M$$ such that $$r_1y_1,...,r_ty_t$$ is a basis for $$N$$, for some $$t \le n$$.

I think that, according to my definition, the length of the basis' of M doesn't have to be n. It certainly can't be more than n, cause then the elements would be l.d., but it could be less than n. In consequence, the assertion (2) makes no sense a priori.

My question is whether the fact that $$R$$ is a PID and $$M$$ is a free module over $$R$$ implies that both definitions of rank coincide (i.e., that the maximum number of l.i. elements is also the length of a basis's of $$M$$), or whether this was just a mistake due to my professor giving a different definition of rank.

This is actually proven in Dummit and Foote. To distinguish the two definitions of rank, call the maximum number of elements of $M$ which are linearly independent the LI rank, and for a free $R$-module $M$ call the size of a basis of $M$ the free rank.
As you observe, since a basis must be linearly independent, then free rank $\leq$ LI rank. Proposition 3 of $\S12.1$ of Dummit and Foote (p. 459) implies the reverse inequality.
Proposition 3. Let $R$ be an integral domain and let $M$ be a free $R$-module of rank $n < \infty$. Then any $n+1$ elements of $M$ are $R$-linearly dependent, i.e., for any $y_1, \ldots, y_{n+1} \in M$ there are elements $r_1, \ldots, r_{n+1} \in R$, not all zero, such that $$r_1 y_1 + \cdots + r_{n+1} y_{n+1} = 0 \, .$$
If you know about localization, you can give a quick proof of this by passing to the field of fractions $F$ of $R$. Let $S = R \setminus \{0\}$ so $S^{-1}R = F$. Then $S^{-1} M$ is a vector space over the field $F$, so a maximal linearly independent set is a basis by results about vector spaces. There is an alternative proof included in Dummit and Foote.