Example (multiplicative group of Zn)
Recall that the division algorithm states that $x\in\Z_n$ has a multiplicative inverse mod $n$ $\iff$ there are $y,m\in\Z$ such that $xy + mn = 1$ $\iff$ $\mrm{gcd}(x,n) = 1$.
Recall that the division algorithm states that $x\in\Z_n$ has a multiplicative inverse mod $n$ $\iff$ there are $y,m\in\Z$ such that $xy + mn = 1$ $\iff$ $\mrm{gcd}(x,n) = 1$.
Define $$ \Z_n^\times = \sb{ x \in \Z_n }{\mrm{gcd}(x,n) = 1}. $$ This is a group with operation $\times_n$.
The Euler totient function is defined as $$ \phi(n) = \#\sb{x\in\Z_n}{\mrm{gcd}(x,n) = 1}. $$
Let $x,n\in\Z_n$. If $\mrm{gcd}(x,n) = 1$, then $$x^{\phi(n)} \equiv 1 \mod n.$$