Isomorphism between a Module and its Homomorphisms to a ring So I just did an exercise to prove that if M is a finitely generated free module then $M \cong \operatorname{Hom}_A(M,A)$ when $A$ is a commutative ring , and I was wondering when does it fail ? So I started thinking about $\mathbb{Z}^{\mathbb{N}}$ as a module over $\mathbb{Z}$ but I'm not quite sure it fails? Can u guys help me out? Thanks.
 A: When you write $\mathbb Z^{\mathbb N}$, do you mean the direct sum $\oplus_{i \in \mathbb N} \mathbb Z$, or the direct product $\prod_{i \in \mathbb N} \mathbb Z$? Presumably you mean the $\oplus_{i \in \mathbb N} \mathbb Z$, since you're talking about free $\mathbb Z$-modules.
$\oplus_{i \in \mathbb N} \mathbb Z$ and $\prod_{i \in \mathbb N} \mathbb Z$ are different modules! In $\prod_{i \in \mathbb N} \mathbb Z$, every element can be uniquely expressed in the form $\sum_{i \in \mathbb N} a_i e_i $. In $\oplus_{i \in \mathbb N} \mathbb Z$, the elements take a similar form, except that there is the additional constraint that, for any element, only finitely many of the $a_i$'s can be non-zero. So $\oplus_{i \in \mathbb N} \mathbb Z$ is a strict submodule of $\prod_{i \in \mathbb N} \mathbb Z$.
It turns out that:


*

*${\rm Hom}_{\mathbb Z}(\oplus_{i \in \mathbb N} \mathbb Z, \mathbb Z) = \prod_{i \in \mathbb N} \mathbb Z$.

*${\rm Hom}_{\mathbb Z}(\prod_{i \in \mathbb N} \mathbb Z, \mathbb Z) = \oplus_{i \in \mathbb N} \mathbb Z$.
The first of these claims can be proved as follows. A $\mathbb Z$-module morphism  $f \in {\rm Hom}_{\mathbb Z}(\oplus_{i \in \mathbb N} \mathbb Z, \mathbb Z)$ is uniquely determined once you specify the images of the generators, $b_i = f(e_i) \in \mathbb Z$ for $i \in \mathbb N$. Any choice of $\{ b_i \}_{i \in \mathbb N}$ defines a valid $f \in {\rm Hom}_{\mathbb Z}(\oplus_{i \in \mathbb N} \mathbb Z, \mathbb Z)$, and there is no restriction on whether the number of non-zero $b_i$'s is finite or infinite. In other words, homomorphisms  $f \in {\rm Hom}_{\mathbb Z}(\oplus_{i \in \mathbb N} \mathbb Z, \mathbb Z)$ are in direct correspondence with elements $\{ b_i \} \in \prod_{i \in \mathbb N} \mathbb Z$.
The second claim is more difficult to prove - see here
