Let $\left\{ M_{i}\right\} _{i\in I}$ be a family of submodules of $R$-module $M$. Prove that $M$ is direct sum of $\left\{ M_{i}\right\} _{i\in I}$ i.e $M=\oplus M_{i}$ iff for all $m\in M$, $m$ is written uniquely with the form $m=\sum_{finite}m_{i},m_{i}\in M_{i}$
Help me some hints.
Thanks a lot.