TITLE: Hom of the direct product of $\mathbb{Z}_{n}$ to the rationals is nonzero.
QUESTION [6 upvotes]: Why is $\mathrm{Hom}_{\mathbb{Z}}\left(\prod_{n \geq 2}\mathbb{Z}_{n},\mathbb{Q}\right)$ nonzero?
Context: This is problem $2.25 (iii)$ of page $69$ Rotman's Introduction to Homological Algebra:

Prove that
  $$\mathrm{Hom}_{\mathbb{Z}}\left(\prod_{n \geq 2}\mathbb{Z}_{n},\mathbb{Q}\right) \ncong \prod_{n \geq 2}\mathrm{Hom}_{\mathbb{Z}}(\mathbb{Z}_{n},\mathbb{Q}).$$

The right hand side is $0$ because $\mathbb{Z}_{n}$ is torsion and $\mathbb{Q}$ is not.

REPLY [2 votes]: $\mathbb{Q}$ is an injective $\mathbb{Z}$-module.
The exact sequence
$$0\rightarrow  \mathbb{Z} \rightarrow  \prod \mathbb{Z}_n\rightarrow C\rightarrow 0$$ yields the exact sequence
$$0\rightarrow  \mathrm{Hom}_{\mathbb{Z}}(C,\mathbb{Q}) \rightarrow  \mathrm{Hom}_{\mathbb{Z}}(\prod \mathbb{Z}_n, \mathbb{Q})\rightarrow \mathrm{Hom}_{\mathbb{Z}}(\mathbb{Z},\mathbb{Q})\rightarrow 0.$$
The last term in the latter exact sequence is just $\mathbb{Q}$, hence $\mathrm{Hom}_{\mathbb{Z}}(\prod \mathbb{Z}_n,\mathbb{Q})\neq 0.$