How to show that for any abelian group $G$, $\text{Hom}(\mathbb{Z},G)$ is isomorphic to $G$

How do I show that $\text{Hom}(\mathbb{Z},G)$ and $G$ are isomorphic?

The method suggested by the book is to define a map $k$: $\text(\mathbb{Z},G) \to G$ by $f \to f(1)$.

I am stuck on how exactly to show that it is an isomorphism. Could anyone shed some light into this? Is $f(1)$ an element of G?

(For those who wanted to know, this is not homework)


Any homomorphism $f$ from $\mathbb{Z}$ to $G$ is determined by its value at 1: indeed $f(n) = f(1)^n$ for any $n\in \mathbb{Z}$, since $f$ is a group homomorphism (I am using multiplicative notation for the group operation on $G$). So it is natural to consider the map suggested by the book: given $f\in \text{Hom}(\mathbb{Z},G)$, evaluate it at 1: $k:f\mapsto f(1)$. It sends $f$ to an element of $G$, namely $f(1)$.

To check that this is a group homomorphism, you need to understand how $\text{Hom}(\mathbb{Z},G)$ is a group in the first place. That's very simple: the group operation is pointwise multiplication: the product of two homs $f$ and $g$ is given by $fg(n) = f(n)g(n)$ (to explain what $fg$ is you need to evaluate it on an arbitrary input, since you are describing a homomorphism). So now, you should have no difficulties verifying that $k$ respects the group structure.