Let $R$ be integral domain and $M$ be an $R$ module.
I want to prove if $M$ is a free module, then any maximal linearly independent subset of $M$ has cardinality equal to the cardinality of a basis of $M$.
Any maximal linearly independent subset of $M$ must have the same cardinality. So it only remains to prove the cardinality is equal to the cardinality of a basis of $M$. So if $\{m_i\}_{i\in I}$ is a maximal linearly independent subset of $M$, then we need to prove $\{m_i\}_{i\in I}$ is a basis of $M$? But how? Any helps would be appreciated greatly.
The general ideal to show this type of results is to use localisation. Let $N$ be a maximal ideal of $R$. Write $R/N=k$, if $R/N\otimes M=V$ is a $k$-vector space. If $(m_1,..,m_n)$ is a maximal independent, $1\otimes m_1,...,1\otimes m_n$ is a basis of $V$, otherwise there exists $v=\sum u_i\otimes v_i$ which is not in $Vect(1\otimes m_1,..,1\otimes m_n)$. Write $x=u'_1v_1+...+u'_nv_n$ where $u'_i$ is the image of $u_i$ by the quotient map $R\rightarrow R/M$, $(m_1,...,m_n,x)$ is independent.