# Ideal is a free module

Let $R$ be a commutative ring and consider the ideal $I = (r_{1}, r_{2})$ where $r_{1}, r_{2}$ are 2 linear independent generators of $R$.

Now consider the $R-$modules. Here $I$ is a $R-$submodule of the $R-$module $R$. Can I then conclude that $I$ is free?

Argument

I have this proposition:

Given any set $B$, there exists a free $R-$module with basis $B$.

If I let $B = \lbrace r_{1}, r_{2} \rbrace$. This proposition gives me that there exists a free $R$-module contained in $I$. But this free $R-$module must be an ideal and hence equals $I$.

Does it make sense? Or is there a more easy way to show this?

Any two elements in a commutative ring $R$ are linearly dependent. If $r,s\in R$ are non-zero then $0=s\cdot r-r\cdot s$ is a non-trivial linear dependence relation. Free modules of any rank over $R$ exist, but are not submodules of $R$ (except in the case of rank zero or one). Namely, for any set $X$, the direct sum $R[X]:=\bigoplus_{x\in X}R$ of copies of the $R$-module $R$ indexed by the set $X$ is free with basis $\{e_x:x\in X\}$, where, for $x\in X$, $e_x\in R[X]$ has $(e_x)_x=1$ and $(e_x)_y=0$ for $y\neq x$.
Also, ideals of $R$ are not necessarily free. In fact, every ideal of $R$ is free (necessarily of rank one if non-zero) if and only if $R$ is a principal ideal domain.
The elements $x = r_1$ and $y = r_2$ are not linearly independent in $R$, since $r_2 x - r_1 y = 0$.
The theorem you mentioned is not applicable. For example, if $B = \{4,6\}$, the free $\mathbf{Z}$-module with basis $B$ would be the set $\{x \cdot 4 + y \cdot 6 \, | \, x, y \in \mathbf{Z}\}$, where $4$ and $6$ are treated merely as symbols, and we identify $1 \cdot 4 + 0 \cdot 6$ with the symbol $4$, and do similarly for $6$.
Since $4$ and $6$ are merely symbols, the module that we have just constructed has nothing to do with the submodule of $\mathbf{Z}$ generated by $4$ and $6$, where the elements $4$ and $6$ are not linearly independent.