Prove equivalence: Internal Direct Sum of Modules (HW)

Let $$M$$ be a module and $$M_1, M_2, M_3,..., M_n$$ be submodules of $$M$$ verify that the following are equivalent:

(1) $$M$$ is the internal direct sum of the $$M_i$$'s. (i.e. $$M=M_1+M_2+M_3+...+M_n$$)

(2) each $$m\in M$$ can be expressed uniquely as $$m=m_1+m_2+m_3+...+m_n$$ with $$m_i\in M_i$$

Here are the things I know about modules so far:

The definition of a module and a submodule.

The definition of an internal direct sum given by:

An R-Module $$M$$ is the internal direct sum of submodules $$M_1, M_2, M_3,..., M_n$$ if:

$$a)$$ $$M=M_1+M_2+M_3+...+M_n$$

$$b)$$ $$M_i \cap \sum_{j\neq i} M_j = \{0\}$$

I'm kind of stuck with this problem. Can I immediately assume that if $$M=M_1+M_2+M_3+...+M_n$$ , $$m\in M$$ can be expressed as $$m=m_1+m_2+m_3+...+m_n$$ with $$m_i\in M_i$$?

Any hint on how I could start this? I just need some ideas. Thank you! :)

Yes, you can. $M=\sum M_i$ by definition means that every $m\in M$ can be expressed as $m=\sum m_i$. Now you can assume that for some $m\in M$ there are two such expressions and try to find contradiction with $b)$.
For the second implication again by definition if every $m$ has such expression then $M=\sum M_i$. Now assume that $b)$ is false and try to find contradiction with $(2)$.