Give an example of a commutative ring $R$, $R$ -modules $M,N,$ and$W$, and an injective $R$ module homomorphism $g:M \rightarrow N$ such that the induced homomorphism $Hom_{R}(N,W) \rightarrow Hom_{R}(M,W)$ is not surjective.
I'm just learning the basics of modules and I'm having trouble coming up with a good example here. I feel like the answer should be fairly easy. Any hints?
Take $g: \mathbb Z \rightarrow \mathbb Z/2 \mathbb Z$ and $W = \mathbb Z$, all modules are over $\mathbb Z$ i.e they are abelian groups. Try and compute what $\text{Hom}(\mathbb Z/2 \mathbb Z, \mathbb Z)$ and $\text{Hom}(\mathbb Z, \mathbb Z)$ are.