What are the isomorphisms from $\mathbb{Z}$ to itself? I know there are only two isomorphism from $\mathbb{Z}$ to itself: the identity $Id$ and $-Id$. And I also know we have to use the fact that $\mathbb{Z}$ is cyclic to prove it. However, I have problem connecting those two points.
 A: To show that $f: \mathbb{Z} \to \mathbb{Z}$ is an isomorphism, you need to sho


*

*That $f$ is a bijection

*That $f(a+b) = f(a)+f(b)$ for all $a,b \in \mathbb{Z}$.


So it is easy to show that $f_{1}(x) = x$ is an isomorphism, and that $f_{-1}(x) = -x$ is a second isomorphism.
To show these are the only isomorphism, you want to use the fact that an isomorphism of a cyclic group is completely determined by where it sends a generator, that a generator must get sent to another generator, and that $\mathbb{Z}$ has exactly two generators, $1$ and $-1$.
A: To elaborate further on why we must send a generator to a generator consider the following.
We know that $\mathbb{Z}$ is cyclic, i.e. is generated by both 1 and -1. Suppose I have an isomorphism $f: \mathbb{Z} \to \mathbb{Z}$, such that $f(1) \not\mapsto 1, -1$, suppose instead that $1 \mapsto k, k \neq 1,-1$. WLOG suppose that $k$ is positive, since the negative argument is symmetric. Can I build $k+1$ under $f$? Recall that $k$ and $k+1$ are always relatively prime, and by sending $1 \mapsto k$, we are building the multiples of $k$. 
Once you see that, then we notice that then we have a contradiction on the assumption that $f$ is surjective.
A: Consider the more general question:

What are the endomorphisms of $\mathbb Z$, that is, the homomorphisms $\mathbb Z \to \mathbb Z$?

Since $\mathbb Z$ is cyclic, every endomorphism $f$ is determined by $f(1)$. Indeed, $f(n)=nf(1)$.
Therefore, $(f \circ g)(n)=f(g(n))=g(n)f(1)=ng(1)f(1)$.
Thus $f$ has an inverse iff $f(1)$ has a multiplicative inverse in $\mathbb Z$.
