# Maximal linearly independent subsets in module over a domain has equal number of elements.

Let $M$ be an $R$ module and $R$ be an integral domain. Then I want to know if any two maximal linearly independent set has the same number of elements or not.

Actually I am reading Modules over PID from Dummit and Foote, where they define Rank of an $R$-module to be the maximum number of linearly independent elements in $M.$ Is it well defined ?

• You might want to have a look here – 57Jimmy Apr 10 '18 at 14:49
• But not clear why any two maximal linearly independent subset has same number of elements! – user371231 Apr 10 '18 at 14:58
• His argument is that if $\{m_1,\dots,m_n\}$ is a maximal linearly independent subset, then $\{m_1 \otimes_R 1,\dots, m_n \otimes_R 1\}$ is a $K-$ basis of $M \otimes_R K$, where $K= \mathrm{Frac}(R)$. Since the dimension of a vector space is well-defined, this implies what you want. But yes, the proof of the first part is not included. I may try to write it down, but I can't guarantee anything. – 57Jimmy Apr 10 '18 at 15:53
• I've posted a question here about it. – 57Jimmy Apr 10 '18 at 16:57

As explained (a bit differently) here and here, the trick is to show that a maximal $R-$linearly independent subset $\{m_i\}_{i \in I}$ of $M$ gives a $K-$basis $\{\frac{m_i}{1}\}_{i \in I}$ of $M_{(0)} = (R \backslash\{0\})^{-1}M$, the localization of $M$ away from $(0)$, which is a $K-$vector space. Then the result follows from the fact that the cardinality of a basis of a vector space does not depend on the choice of the basis.
First of all, notice that there is always a (possibly infinite) maximal $R-$linearly independent subset of $M$, by Zorn's lemma. Let $\{m_i\}_{i \in I}$ be such a set. Then $\{\frac{m_i}{1}\}_{i \in I}$ is linearly independent in $M_{(0)}$, because if it were not, we'd get an equation of linear dependence, and by clearing denominators and multiplying by a non-zero element of $R$, this would give an equation of linear dependence of the $m_i$ over $R$, contradiction. On the other hand, if $\{\frac{m_i}{1}\}_{i \in I}$ is not maximal, we can add some other fraction, say $\frac{m}{s}$, so that they stay linearly independent. But considering the element $m \in M$ together with the $m_i$, we get an equation of linear dependence, and (multiplying by $s$ the coefficient of $m$) the same coefficients give an equation of linear dependence of the $\{\frac{m_i}{1}\}_{i \in I}$ and $\frac{m}{s}$, contradiction. Hence $\{\frac{m_i}{1}\}_{i \in I}$ is a basis of $M_{(0)}, as desired. The key fact, in some sense, is that$\frac{m}{1}$is zero if and only if$m\$ is torsion, and that torsion elements are never part of a linearly independent set.