Calculator Form
Example Data Table
| Congruence | Equation | Normalized Form |
|---|---|---|
| 1 | x ≡ 2 (mod 3) | x ≡ 2 (mod 3) |
| 2 | x ≡ 3 (mod 5) | x ≡ 3 (mod 5) |
| 3 | x ≡ 2 (mod 7) | x ≡ 2 (mod 7) |
| Final result: x ≡ 23 (mod 105) | ||
Formula Used
General congruence form: x ≡ ai (mod mi).
Normalization step: replace ai with ai mod mi so each remainder stays within 0 to mi − 1.
Pairwise coprime case: when every gcd(mi, mj) = 1, the system has one unique solution modulo M = m1m2...mn.
General merge rule: combine x ≡ a1 (mod m1) and x ≡ a2 (mod m2).
First compute g = gcd(m1, m2). A solution exists only when g divides (a2 − a1).
Then solve m1t ≡ (a2 − a1) (mod m2). After reducing by g, use the modular inverse of m1/g modulo m2/g.
The merged solution becomes x = a1 + m1t, and the new modulus becomes lcm(m1, m2) = m1m2/g.
The calculator applies this merge repeatedly until all congruences become one final congruence.
How to Use This Calculator
- Enter one remainder and one modulus for each congruence.
- Use positive nonzero moduli. Negative remainders are allowed.
- Add more rows when your system has additional congruences.
- Choose how many future solutions you want listed.
- Submit the form to validate and merge the congruences.
- Read the verification table to confirm every residue matches.
- Use the CSV option for spreadsheet work.
- Use the PDF option for printable reports or saved notes.
Frequently Asked Questions
1) What does this calculator solve?
It solves systems of modular equations such as x ≡ 2 (mod 3) and x ≡ 3 (mod 5), then returns one merged congruence.
2) Does it work when moduli are not pairwise coprime?
Yes. It uses the generalized theorem and checks whether each merge remains consistent through the gcd divisibility condition.
3) Why are negative remainders changed?
They are normalized into standard modular form. For example, −1 mod 5 becomes 4 mod 5.
4) What happens if the system is inconsistent?
The calculator stops the merge, explains why no solution exists, and shows the failed gcd divisibility test.
5) What is the meaning of the final modulus?
It is the modulus of the merged congruence. Every valid solution differs from the smallest solution by an integer multiple of that modulus.
6) Why does the graph use residues by modulus?
It visually confirms that the final solution reproduces each requested remainder across all entered moduli.
7) Can I export the results?
Yes. The page includes CSV export for data handling and PDF export for printable summaries.
8) Are very large numbers supported?
Moderate integers work well. Extremely large values may exceed normal integer limits on some servers.