Suppose $S$ is a commutative unitary ring and $R$ is a subring of $S$,naturally S becomes a $R$-module.
To prove: If S is a free $R$-module over R of rank $n$,then there is a ring isomorphism between $S$ and a subring of matrix ring $M_n(R)$.
Let $\{x_1,\dots,x_n\}$ be a basis of module S,then $\forall s\in S,s=a_1x_1+\dots+a_nx_n$,where all coefficients $a_1,\dots,a_n\in R$ are unique.
It is natural to define a mapping $\varphi:S\to M_n(R),s=a_1x_1+\dots+a_nx_n\mapsto \begin{pmatrix} a_1 & & & \\ & a_2 & & \\& & \ddots & \\ & & & a_n \end{pmatrix}$.
But how to prove it is a ring homomorphism?It is obvious that the mapping preserves addition.And if it preserves multiplication,it preserves the multiplicative identity,too.
So here is my problem:How to prove this mapping preserves multiplication?Or my definition is wrong to make it impossible?
Edit:Due to this case,I believe it is hard to construct such mapping,since we know very little about the ring.Perhaps non-constructive methods are needed to solve this problem.