next up previous
Next: Fermat's Little Theorem Up: Lecture 5: Congruences Previous: Rules for Divisibility

Linear Congruences

Definition 3.1 (Complete Set of Residues)   A complete set of residues modulo $ n$ is a subset $ R\subset\mathbb{Z}$ of size $ n$ whose reductions modulo $ n$ are distinct. In other words, a complete set of residues is a choice of representive for each equivalence class in $ \mathbb{Z}/n\mathbb{Z}$.

Some examples:

$\displaystyle R=\{0,1,2,\ldots,n-1\}
$

is a complete set of residues modulo $ n$. When $ n=5$, a complete set of residues is

$\displaystyle R = \{0,1,-1,2,-2\}.
$

Lemma 3.2   If $ R$ is a complete set of residues modulo $ n$ and $ a\in\mathbb{Z}$ with $ \gcd(a,n)=1$, then $ aR = \{ax : x \in R\}$ is also a complete set of residues.

Proof. If $ ax\equiv ax'\pmod{n}$ with $ x, x'\in R$, then Proposition 2.1 implies that $ x\equiv {}x'\pmod{n}$. Because $ R$ is a complete set of residues, this implies that $ x=x'$. Thus the elements of $ aR$ have distinct reductions modulo $ n$. It follows, since $ \char93 aR=n$, that $ aR$ is a complete set of residues modulo $ n$. $ \qedsymbol$

Definition 3.3 (Linear Congruence)   A linear congruence is an equation of the form

$\displaystyle ax\equiv b\pmod{n}.
$

Proposition 3.4   If $ \gcd(a,n)=1$, then the equation

$\displaystyle ax\equiv b\pmod{n}
$

must have a solution.

Proof. Let $ R$ be a complete set of residues modulo $ n$ (for example, $ R=\{0,1,\ldots,n-1\}$). Then by Lemma 3.2, $ aR$ is also a complete set of residues. Thus there is an element $ ax\in aR$ such that $ ax\equiv b\pmod{n}$, which proves the proposition. $ \qedsymbol$

The point in the proof is that left multiplication by $ a$ defines a map $ \mathbb{Z}/n\mathbb{Z}\hookrightarrow \mathbb{Z}/n\mathbb{Z}$, which must be surjective because $ \mathbb{Z}/n\mathbb{Z}$ is finite.



Illustration:

$\displaystyle 2x\equiv 3\pmod{7}
$

Set $ R = \{0,1,2,3,4,5,6\}$. Then

$\displaystyle 2R = \{0,2,4,6,8\equiv 1, 10\equiv 3, 12\equiv 5\},
$

so $ 2\cdot 5\equiv 3\pmod{7}$.



Warning:
Note that the equation $ ax\equiv b\pmod{n}$ might have a solution even if $ \gcd(a,n)\neq 1$. To construct such examples, let $ a$ be any divisor of $ n$$ x$ any number, and set $ b=ax$. For example, $ 2x\equiv 6\pmod{8}$ has a solution!


next up previous
Next: Fermat's Little Theorem Up: Lecture 5: Congruences Previous: Rules for Divisibility
William A Stein 2001-09-20