# Every $R$-module $M$ has a maximal linearly independent subset $A$. If submodule $M_A$ is generated by $A$, then $M_A$ is free on $A$.

I am stuck at proving

Every $$R$$-module $$M$$ has a maximal linearly independent subset $$A$$. If the submodule $$M_A$$ is generated by $$A$$, then $$M_A$$ is free on $$A$$, and for a non-zero submodule $$M_1\subseteq M$$, $$M_1 \cap M_A \neq 0$$.

I know for the first part I should just apply Zorn's lemma, but I am not clear about the rest of the problem. Could anyone help me with that?

To show that $$M_A$$ is free, you need an isomorphism $$M_A\to \bigoplus_{\lambda\in\Lambda} Re_\lambda$$ for some index set $$\Lambda$$ and where the $$e_\lambda$$ are formal symbols. The natural choice is to let $$\Lambda=A$$ and send $$a\mapsto e_a$$. Extend this by $$R$$-linearity to show it is a homomorphism; surjectivity is easy, and injectivity follows from linear independence.
The last statement isn't true, and I don't see an easy fix. As a counterexample, let $$R=\Bbb Z$$ and $$M=\Bbb Z_2$$. Then $$M$$ does not have any nonempty linearly independent subsets, so $$M_A=0$$. This is not just a problem with the empty set or the zero module; we can just as easily consider $$M=\Bbb Z\oplus \Bbb Z_2$$, where a qualitatively similar issue arises with $$A=\{(1,0)\}$$.