Number Theory • Topic 9
Congruences
Congruences are equations involving modular arithmetic. Solving linear congruences is similar to solving linear equations , but with a twist regarding existence and uniqueness.
Linear Congruence
A linear congruence is of the form:Existence of Solutions
The congruence has solutions if and only if:Number of Solutions
If , there are exactly distinct solutions modulo .- If , there is exactly one unique solution modulo .
Solving Strategy
- Check GCD: Calculate . If , no solution.
- Simplify: If , divide the entire congruence (including modulus) by :
Now the coefficient and new modulus are coprime.
- Multiply by Inverse: Multiply both sides by the modular inverse of the coefficient (see Topic 14).
Example
Solve .
Proof. 1. .
- Does ? Yes. There are 3 solutions modulo 21.
- Divide by 3: .
- Multiply by inverse of 2 mod 7 (which is 4, since ):
- Lift back to mod 21:
Practice Problems
Exercise (Problem 1)
Solve .
Exercise (Problem 2)
Find all integers such that .
Exercise (Problem 3)
Prove that has no integer solutions.