Let $\varphi: \mathbb Z/n \mathbb Z \to \mathbb Z / n \mathbb Z$ be a homomorphism Let $\varphi:\mathbb Z/n \mathbb Z \to \mathbb Z/n \mathbb Z$ be a homomorphism. Let $k$ belongs to $\mathbb Z$. We can see the function $[a]$ to $[ka]$ is a homomorphism $\mathbb Z/ n \mathbb Z$ to $\mathbb Z/n \mathbb Z$. Show that the above map is an isomorphism if $\gcd(k,n)=1$.
I can see $[a]$ to $[ka]$ is a homomorphism $\mathbb Z/n \mathbb Z$ to $\mathbb Z/ n \mathbb Z$. But I don't know how to prove the map is an isomorphism if $\gcd(k,n)=1$.
 A: Suppose that $\gcd(k,n)=1$. Then there are integers $a$ and $b$ such hat $ak+bn=1$. Therefore $\varphi(a)=1$. Since $\mathbb{Z}/n\mathbb{Z}$ is spanned by $1$, this shows that $\varphi$ is surjective. And every surjective map from a finite set into itself is also injective.
A: You can consider the map
$$
f\colon\mathbb{Z}\to\mathbb{Z}/n\mathbb{Z}
\qquad
f(a)=k[a]=[ka]
$$
which is a homomorphism by the main property of $\mathbb{Z}$: in order to define a homomorphism $\mathbb{Z}\to G$ it is sufficient to specify the image of $1$ which, in this case, is $[k]$.
Clearly $\ker f\supseteq n\mathbb{Z}$, so $f$ induces a unique homomorphism
$$
\varphi\colon\mathbb{Z}/n\mathbb{Z}\to\mathbb{Z}/n\mathbb{Z}
$$
such that, for $a\in\mathbb{Z}$, $\varphi([a])=f(a)=[ka]$. This settles the question whether your map $\varphi$ is a homomorphism.
This homomorphism $\varphi$ is surjective if and only if $f$ is, that is, if and only if there exists $a\in\mathbb{Z}$ such that $[ka]=[1]$, which happens if and only if there are integers $a$ and $b$ such that $1=ka+nb$.
If such integers exist, then $\gcd(k,n)=1$. The converse is Bézout's identity.
Since $\mathbb{Z}/n\mathbb{Z}$ is finite, a map $\mathbb{Z}/n\mathbb{Z}\to\mathbb{Z}/n\mathbb{Z}$ is surjective if and only if it is injective.
A: If $\gcd(k,n)=1$, then  (from the Euclidean Algorithm) there exists $[k^{-1}]\in \mathbb Z/n\mathbb Z$ such that $k^{-1}\cdot k\equiv 1\equiv k\cdot k^{-1} \pmod{n}$.
Let $\rho$ be the homomorphism $[a]\mapsto [k^{-1}a]$. Clearly $\rho\circ \varphi=\text{id}_{\mathbb Z/n\mathbb Z}$ and $\varphi\circ \rho=\text{id}_{\mathbb Z/n\mathbb Z}$, so $\varphi$ is indeed an isomorphism $\mathbb Z/n\mathbb Z\to \mathbb Z/n\mathbb Z$ $\blacksquare$
