Enter congruences, reduce coefficients, and merge valid residues. See modular steps with compatibility diagnostics instantly. Use exports, examples, and FAQs for confident problem solving.
Enter each row as a linear congruence of the form ax ≡ b (mod m).
| Row | a | b | m | Original Congruence | Reduced Form |
|---|---|---|---|---|---|
| 1 | 2 | 4 | 6 | 2x ≡ 4 (mod 6) | x ≡ 2 (mod 3) |
| 2 | 3 | 9 | 15 | 3x ≡ 9 (mod 15) | x ≡ 3 (mod 5) |
| 3 | 1 | 5 | 7 | x ≡ 5 (mod 7) | x ≡ 5 (mod 7) |
| Combined solution: x ≡ 68 (mod 105) | |||||
Each row starts as ax ≡ b (mod m).
First compute g = gcd(a, m).
The row is solvable only when g divides b.
Then reduce the row to:
(a / g)x ≡ (b / g) (mod m / g)
Because gcd(a / g, m / g) = 1, the inverse exists.
The reduced residue becomes:
x ≡ (a / g)-1(b / g) (mod m / g)
To merge two reduced rows, use:
x ≡ r1 (mod m1) and x ≡ r2 (mod m2)
A common solution exists only when r1 ≡ r2 (mod gcd(m1, m2)).
The combined modulus is lcm(m1, m2) = m1m2 / gcd(m1, m2).
A congruence equation system solver helps you work with modular arithmetic in a direct way. Many problems in number theory, coding, cryptography, and puzzle design use congruences. Solving them by hand can be slow. Small sign mistakes also cause wrong residues. This calculator reduces each equation first. Then it checks whether the full system is compatible. That saves time and improves accuracy.
Each row begins in the form ax ≡ b (mod m). The solver computes gcd(a, m) and checks divisibility. If the gcd does not divide b, that row has no solution. The whole system then fails. If the row is valid, the calculator divides through by the gcd. Next it finds a modular inverse. That converts the row into a simpler result x ≡ r (mod n). This reduced form is easier to combine with other rows.
After reduction, the calculator merges the congruences one by one. It uses the generalized Chinese Remainder Theorem. This version works even when moduli are not pairwise coprime. The solver checks residue agreement modulo the gcd of the moduli. If agreement fails, there is no common solution. If agreement holds, the tool builds one final residue and one final period. That result describes every integer solution in one compact formula.
Students can use this page to verify homework steps. Teachers can generate examples and export solution tables. Competitive exam learners can test fast modular reductions. Developers can also use it while building residue based algorithms. The example table, formula section, and FAQs make revision easier. Because the page shows reduced rows and combination steps, it works as both a calculator and a learning aid.
It solves systems of linear congruences. Each row can be written as ax ≡ b (mod m). The tool reduces each row, checks compatibility, and returns the final repeating solution when one exists.
Yes. The solver uses the generalized Chinese Remainder Theorem. It checks whether residues agree modulo the gcd of the moduli before combining them.
If gcd(a, m) does not divide b, that row is impossible. The calculator stops the system and reports that no complete solution exists.
A modulus of 1 means the row places no real restriction on x. Every integer satisfies that reduced condition, so it does not change the combined solution.
Yes. Negative coefficients and right sides are accepted. The solver normalizes residues into standard modular form before showing the final answer.
If the result is x ≡ r (mod n), every solution has the form x = r + nk, where k is any integer. That single expression represents all answers.
The CSV file includes the original rows, reduced congruences, combination steps, and the final result. It is useful for records, notes, and worksheet preparation.
Yes. The page shows gcd checks, row reduction, residue formation, and system merging. That makes it practical for both fast answers and step review.
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.