Solve congruence equations across custom moduli. Review gcd logic, normalized forms, residues, and solution classes. Download clean reports and explore residue behavior visually today.
| Equation | Observation | Solution Pattern |
|---|---|---|
| 3·x + 1 ≡ 7 (mod 10) | gcd(3, 10) = 1 | x ≡ 2 (mod 10) |
| 4·x + 5 ≡ 9 (mod 14) | gcd(4, 14) = 2 divides 4 | x ≡ 1, 8 (mod 14) |
| 6·x + 3 ≡ 8 (mod 15) | gcd(6, 15) = 3 does not divide 5 | No solution |
| 0·x + 11 ≡ 11 (mod 17) | Both sides share one residue | Every integer works |
| 14·x + 5 ≡ 9 (mod 23) | gcd(14, 23) = 1 | x ≡ 18 (mod 23) |
The calculator solves the linear congruence a·x + c ≡ b (mod m).
First move the constant term: a·x ≡ b − c (mod m).
Let d = gcd(a, m). A solution exists only when d divides b − c.
If d divides b − c, divide the whole congruence by d.
The reduced form becomes (a/d)·x ≡ (b − c)/d (mod m/d).
Now gcd(a/d, m/d) = 1, so an inverse exists.
Multiply both sides by the inverse of a/d modulo m/d.
This gives one base solution modulo m/d.
Lift that base solution into d residue classes modulo m.
A congruence equation states that two expressions leave the same remainder after division by a modulus. It compares residues instead of ordinary equality.
A solution exists when gcd(a, m) divides b − c. If that divisibility test fails, no integer x can satisfy the congruence.
If gcd(a, m) is greater than one and divides b − c, the congruence produces several distinct residue classes modulo m.
Negative coefficients and targets are valid in modular arithmetic. Normalization converts them into standard residues between 0 and m − 1.
The base solution is the first residue found after reducing the congruence. Other valid classes are generated from it using the reduced modulus.
The graph plots residues of a·x + c and compares them with the target residue b. Matching points indicate valid solutions inside the graph range.
Large ranges can contain many valid integers. The table shows an initial portion for readability while the total count still appears above it.
Yes. In that case the left side is constant. Either every integer works or no solution exists, depending on the resulting residue.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.