Automorphisms in $\mathbb{Z}_n$

I know an Automorphism is a group $G$ that is an isomorphism where $h:G \rightarrow G$, (G is being mapped to itself) and that $\text{Aut}(G)$ is the set of all Automorphisms in G.

I was wondering how I would approach finding all functions in $\text{Aut}(\mathbb{Z}_n)$, let's say $\text{Aut}(\mathbb{Z}_4)$ for example.

Is it as trivial as showing a bijective map from each element in $\mathbb{Z}_4$ to itself?


if you decide where to map $1$ you have uniquely determined the automorphism, note $1$ needs to be mapped to another generator though.

Also note the composition of two automorphisms $\sigma,\tau$ on $\mathbb Z_n$ sends $1$ to $\tau(1)\times\sigma(1)$, which is why $Aut(\mathbb Z_n)\cong\mathbb Z_n^*$


For the case $\mathbb Z_4$ note $1$ can only be mapped to $1$ or $3$.

this gives us the identity function and the function where $a$ goes to $-a$.