Let's make the previous discussion a bit more rigorous.
Definition4.4.1
Assume throughout that we have fixed a modulus \(n\).
We call any number congruent to \(a\) a residue of \(a\).
We call the collection of all residues of \(a\) the equivalence class of \(a\).
We denote this class by the notation \begin{equation*}[a]=\{\text{all numbers congruent to }a\text{ modulo }n\}\; .\end{equation*}(Sometimes this is notated \([a]_n\), but the modulus is nearly always evident from the context.)
Example4.4.2
For instance, the equivalence class we started with is \begin{equation*}[1]=\{1, 7, 13, 19, 25, -5, -11, 6001,\ldots\}\end{equation*} or perhaps better written as \begin{equation*}\{1+6n\mid n\in\mathbb{Z}\}=[1]\; .\end{equation*}
The point is you can choose your favorite number in an equivalence class to serve as a representative for all of them. To connect to before, for the congruence relation, there are only finitely many classes, otherwise the division algorithm would be meaningless. After, all, there are only \(n\) possible remainders.
Let's solve the ‘magic trick’ above using this concept in a slightly different way. \begin{equation*}2^{1000000000}=(2^2)^{500000000}= 4^{500000000}\equiv 1^{500000000}=1\, .\end{equation*}
Example4.4.3
Here is something which is not a legal manipulation. \begin{equation*}2^{1000000000}\equiv 2^1\equiv 2\, .\end{equation*} Even though \(1000000000\equiv 1\) modulo \(3\), clearly the end result is wrong, because \(2^1\not\equiv 1\) (mod \(3\)), which was the right answer. In general, we have only see you can reduce in the base of a power; nothing is said about the exponent! (Later we'll see how to do reduction in the exponent under controlled circumstances – with a different modulus.