Let $R$ be an integral domain and $M$ a module over $R$. Let $N$ be a submodule of $M$. I want to confirm my proof is correct and also am wondering why the argument doesn't work in general for any ring?
The definition of rank that my book uses is that the rank of a module $M$ is the supremum of the cardinalities of all linearly independent subsets of $M$.
My proof: Let $N$ be a submodule of $M$. Let $S= \{n_i: n_i \in N, i \in I\}$ (where $I$ is some index set) be a maximal linearly independent subset of $N$. Then $S$ is also a subset of $M$ and still a linearly independent set. So the supremum of the collection of cardinalities of linearly independent subsets of $M$ (which contains the cardinality of the subset $S$) must be bigger or equal to the cardinality of $S$, hence the rank of $M$ is bigger or equal to the rank of $N$.
Could someone check my proof and also explain how exactly I am using the fact that $R$ is an integral domain?
Since I cannot comment above... I believe it has to do with the fact that in the ring R, being an integral domain it has no zero divisors. R is an R-module. If R was not an ID, then the notion of a linearly independent set may run into trouble with zero-divisors causing a linear combination of supposedly independent elements summing to zero even when the ring elements acting on the module elements are all non-zero.