If gcd$(a,n)=1$, then multiplication by $a$ defines a bijection from $\mathbb{Z}_n-\{0\}$ to itself.
My working:
If $n=p$ a prime, then we can use the Fermat's Little Theorem. If $n$ is not prime in general, I tried the following:
$x\equiv0,1,2,\ldots,n-1$ (mod $n$), then $ax\equiv0,a,2a,\ldots,(n-1)a$ (mod $n$).
Since gcd$(a,n)=1$, we can cancel $a$ on both sides to get back $x\equiv0,1,2,\ldots,n-1$ (mod $n$).
My doubts:
I think my working is wrong. I know what we need to do is to show that all the elements after multiplied by $a$ have different remainders modulo $n$. But I am not sure what theorems to use, I only know some basic elementary number theory theorems. Can we solve this problem by using any simple methods?
Thanks for the help!