I tried to search for a similar problem on the site, but none appear.
Definition 1 : Let $A$ be a commuting ring with identity. If $M = \sum_{i \in I } Ax_i$ then $x_i$ are said to be a set of generators of $M$. An $A$-Module is said to be finitely generated if it has a finite set of generators.
Definition 2 : A free $A$-module is one which is isomoprhic to an $A$-module of the form $\bigoplus_{i \in I } M_i$ where each $M_i \cong A$.
Statement : A finitely generated free $A$-module is therefore isomorphic to $A \oplus \cdots \oplus A$ for some $n > 0 $.
What I attempted: I tried constructing an explicit isomorphism. By Def 1. There exists a minimal finite set $\{x_1, \ldots, x_k \} \subseteq M$ such that it generates $M = \bigoplus_{i \in I } A_i$. Hence, consider $$ \phi: A^k \rightarrow M, \quad (a_1, a_2, \ldots a_k ) \mapsto a_1x_1 + \cdots a_kx_k $$ $\phi$ is a homomorphism, and is surjective by definition 1. Suppose exists non zero $(b_1, \cdots, b_k) \in A^k$ such that $b_1 x_1 + \cdots b_k x_k = 0_M$...
but unlike vector space we cannot replace $x_1$ to contradict minimality...