Bases and linearly independent sets in free R-modules

Let $R$ be a ring with unit, and let $M$ be any left $R$-module. We say that a subset $\{e_1, \ldots, e_n\}$ of $M$ is linearly indepedent if $\sum r_i e_i = 0$ implies $r_i = 0$. If the subset also generates $M$, then we say that it is a base. In this case $M \cong R^n$, the free $R$-module of rank $n$.

In Jacobson's Basic Algebra I it is mentioned that $R^m \cong R^n$ is possible for $m \neq n$ when $R$ is not commutative. I am more interested in the commutative case, and basically I would like to know which results of linear algebra are true in $R^n$ when $R$ is commutative. If $R$ is commutative, then $R^m \cong R^n$ if and only if $m = n$.

Let $A = \{e_1, \ldots, e_k\}$ be a subset of $R^n$, where $R$ is commutative. If $A$ is linearly independent, does it follow that $k \leq n$? If $A$ is linearly independent, can we extend $\{e_1, \ldots, e_k\}$ to a base of $R^n$? If $A$ generates $R^n$, does it follow that $k \geq n$?

Although not the best way to answer, let me give you some links to answer your questions (always assuming we are in the commutative setting and consider subsets of a free module $R^n$):
• A linear independent set has fewer than $n$ elements. This is proven e.g. in this Matheplanet article (German)
• You can't extend every linearly independent set to a base, e.g. even for $R=\mathbb{Z}$ and $n=1$, $\{2\}$ is a linearly independent subset of $R$, but it cannot be extended to a base.
• A generating set has more than $n$ elements. This is the content of math.stackexchange answer.