Proof that the map Hom$_R(R,M)\rightarrow M$ given by $f\mapsto f(1)$ is an isomorphism of $R$-modules

Let $M$ be a module over a commutative ring $R$ and let Hom$_R(R,M)$ be an $R$-module as well. How do I prove that the map Hom$_R(R,M)\rightarrow M$ given by $f\mapsto f(1)$ is an isomorphism of $R$-modules?

Edit: It's not that I haven't tried anything, it's just that I have no clue what to try.


$\phi: \mathrm{Hom}_R(R,M)\rightarrow M$ is given by $\phi(f)=f(1)$ for all $f\in \mathrm{Hom}_R(R,M)$

  1. To check it is an $R$-module map

(i) $\phi(f+g)=(f+g)(1)=f(1)+g(1)=\phi(f)+\phi(g)$

(ii) $\phi(rf)=rf(1)=r\cdot f(1)=r\cdot\phi(f)$

  1. To check it is bijective:

(i) injective: If $\phi(f)=0 \implies f(1)=0$

Now, $f$ is R-module homomorphism, i.e., $f(r)=f(r\cdot 1)=rf(1)=r\cdot 0=0$ i.e., $f$ is a zero-homomorphism.

(ii) Surjective: Let $x\in M$. Consider the function $g:R\rightarrow M $ defined by $g(1)=x$, check that $g$ is a $R$-module homomorphism from $R\rightarrow M$, then $\phi(g)=x$. Therefore, $\phi$ is bijective.

Hence, $\phi$ is an isomorphism of $R$-modules and $\mathrm{Hom}_R(R,M)\cong M$