Show that $\operatorname{Hom}_{R} (R,M) \cong M$
Let $R$ be a commutative ring with unit and $M$ a right $R$-module. Consider the assignment $\varphi: \operatorname{Hom}_{R} (R,M) \rightarrow M$, $f \mapsto \varphi(f) = f(1)$. Show that $\varphi$ is an isomorphism.
My approach: We have to prove $\varphi$ is a morphism, then $\varphi$ is a injection, surjection, hence $\varphi$ is an isomorphism.
$\forall f,g \in \operatorname{Hom}_{R} (R,M)$
$\varphi(fg) = (fg)(1) = f(1)g(1) = \varphi(f) \varphi(g)$
$\Rightarrow \varphi$ is a morphism
$\forall f,g \in \operatorname{Hom}_{R} (R,M)$
$\varphi(f) = \varphi(g) \Rightarrow f(1) = g(1) \Rightarrow f = g$
$\Rightarrow \varphi$ is injective $\Rightarrow \varphi$ is a homomorphism
How can I prove $\varphi$ is surjective to conclude $\varphi$ is an isomorphism? Sorry for my poor English.
First of all, for $\varphi$ to be a homomorphism, it means that $\varphi(fr + gs) = \varphi(f)r + \varphi(g)s$ for $r, s \in R$ and $f, g \in \operatorname{Hom}_R(R,M)$. Notice that multiplication is not an operation on modules, only addition and scalar multiplication.
Secondly, it is not clear to me why $f(1) = g(1) \implies f = g$. But we can handle this and surjectivity at the same time with the following realization.
Given $m \in M$ there is a unique map $f : R \to M$ with $f(1) = m$.
To see this, define $f(r) = mr$. Then clearly $f(1) = m$. If there is another $R$-linear map $g$ with $g(1) = m$, then $mr = g(1)r = g(r)$ for all $r \in R$ so $g = f$ .