I have the following problem that I am unsure about.
Given a ring $R$, let $f:M\to N$ be a morphism of $R$-modules and let $(x_{j})_{j\in J}$ be a family of (not necessarily distinct) elements in $M$.
(i) If $f$ is injective and $(x_{j})_{j\in J}$ is linearly independent in $M$, prove that $(f(x_{j}))_{j\in J}$ is linearly independent in $N$.
(ii) If $f$ is surjective and $(x_{j})_{j\in J}$ is a system of generators for $M$, prove that $(f(x_{j}))_{j\in J}$ is a system of generators for $N$.
My thoughts: For (i), if $(x_{j})$ is linearly independent, then $\sum\lambda_{j}x_{j}=0$ implies that $\lambda_{j}=0$ for all $j\in J$, where $\lambda_{j}\in R$. Since $f$ is a morphism, we have $$f\left(\sum\lambda_{j}x_{j}\right)=\sum f(\lambda_{j}x_{j})=\sum\lambda_{j}\:f(x_{j}).$$ I'm not really sure where to go from there. For part (ii), I think that I need to show the existence of scalars such that each element in $N$ is a linear combination of the scalars and the $(f(x_{j}))$. Is that on the right track? Thanks in advance for any help or suggestions!
(i)If $\sum\limits_{j\in J}\lambda_{j}f(x_{j})=0,$ then $f(\sum\limits_{j\in J}\lambda_{j}x_{j})=0.$ Since $f$ is injective, $\sum\limits_{j\in J}\lambda_{j}x_{j}=0,$ but we have already know $\{x_{j}\}_{j\in J}$ is linearly independent, which means $\lambda_{j}=0,\forall j\in J.$ So $\{f(x_{j})\}_{j\in J}$ is linearly independent.
(ii)For any $y\in N,$ by the fact $f$ is surjective, there exists $x\in M$ such that $y=f(x).$ Let $x=\sum\limits_{j\in J}\lambda_{j}x_{j},\lambda_{j}\in R,$ then $y=\sum\limits_{j\in J}\lambda_{j}f(x_{j}).$ So $\{f(x_{j})\}_{j\in J}$ is a system of generators for $N$.