Why does $\overline{a^{p-1}}$ always equal $\overline{1}$ when $p$ is a prime $(\mathbb{Z}/p\mathbb{Z})^*$? Suppose we have a multiplicative group of integers modulo $p$ where $p$ is a prime, i.e. $(\mathbb{Z}/p\mathbb{Z})^*$
It seems to be the case for every element $\overline{a}$ in $(\mathbb{Z}/p\mathbb{Z})^*$ that:
$\overline{a^{p-1}} = \overline{1}$
Why is this? I can't see the logic behind it. I've tried it for a bunch of primes and it hasn't failed yet. I've looked at $a^p$ but that didn't result in any new insights. So my question is: is this some well known feature or a trivial fact? If so, how would one derive this feature mathematically? 
 A: In the context of group theory, this follows directly from Lagrange's theorem, because the group $(\mathbb{Z}/p\mathbb{Z})^*$ has order $p-1$.
For a proof that does not depend on Lagrange's theorem, but uses that $(\mathbb{Z}/p\mathbb{Z})^*$ is a finite abelian group, consider $x \mapsto ax$. This is a permutation of the elements $a_1,\dots,a_n$ of $(\mathbb{Z}/p\mathbb{Z})^*$  and so $a_1\cdots a_n = (aa_1)\cdots (aa_n) = a^n a_1\cdots a_n$, with $n=p-1$. Now cancel $a_1\cdots a_n$.
A: Hint: Look at Fermat's Little Theorem 
$a^{p-1} \equiv 1 \pmod p$ if $a \nmid p$.
A: This is a well-known result, namely the Little Fermat's Theorem.
The proof is relatively simple and you can find it easily. If you prefer a hint to prove it yourself, take any $a\in(\Bbb Z/p\Bbb Z)^\times$ and see which elements are in the set:
$$\{a,2a,\ldots,(p-1)a\}$$
Multiply all of them.
A: From the tag you've chose, is it safe to assume you're familiar with group theory? In that case, note that $(\Bbb Z/p\Bbb Z)^*$ is a group under multiplication, and it has order $p-1$. Thus by Lagrange's theorem, every element of the group has order dividing $p-1$. Hence if you raise any element to the power $p-1$, you will end up at the identity.
A: The order of $\overline{a}$, say $k$, is a divisor of $p-1$. So $p-1=kd$ for some d. Then
$$\overline{a}^{p-1}=\overline{a}^{kd}=\overline{a^k}^d=\overline{1}$$
A: Lagrange's theorem states that if $G$ is a finite group and $H$ is a subgroup of $G$, then $|H|$ divides $|G|$.  
Let $g \in G$. We can take $H$ to be the cyclic group $\langle g \rangle$ consisting of the set $\{1,g,g^2,\ldots,g^{k-1} \}$ of powers of $g$, where $k$ is the smallest positive integer for which $g^k=1$. By Lagrange's theorem, $k$ divides $|G|$. If $|G|=n$, then $g^n=1$ because $g^{n}=g^{{k}{(n/k)}} = 1^{n/k}=1$.  We have shown that if $G$ is a finite group of order $n$, then $g^n=1$ for all $g \in G$.
In your particular example, you have a group $G$ of order $p-1$.  Hence, $g^{p-1}=1$ for each $g \in G$.
