Solve inverses using Euclid steps and residue checks. See proofs, examples, and downloadable reports instantly. Built for students, coders, teachers, and number theory practice.
The calculator first reduces a into its least positive residue modulo m. It then applies the Extended Euclidean Algorithm to compute coefficients that satisfy Bezout’s identity.
When the gcd equals 1, the coefficient attached to a becomes the inverse after normalization into the interval 0 to m - 1.
a whose inverse you want.m. It must be greater than 1.| a | m | gcd(a, m) | Inverse | Check |
|---|---|---|---|---|
| 3 | 11 | 1 | 4 | 3 × 4 ≡ 1 (mod 11) |
| 17 | 43 | 1 | 38 | 17 × 38 ≡ 1 (mod 43) |
| 12 | 29 | 1 | 17 | 12 × 17 ≡ 1 (mod 29) |
| -7 | 26 | 1 | 11 | -7 × 11 ≡ 1 (mod 26) |
| 14 | 35 | 7 | None | Inverse does not exist |
A modular inverse is a number that multiplies with a to give a remainder of 1 under modulus m. It solves a × x ≡ 1 (mod m).
It exists only when a and m are coprime. That means gcd(a, m) = 1. If the gcd is larger than 1, no modular inverse exists.
It efficiently finds integers x and y such that a × x + m × y = gcd(a, m). When the gcd is 1, x gives the inverse.
Yes. The calculator normalizes negative inputs into the correct residue class modulo m. That keeps the inverse result mathematically consistent and easy to verify.
A modulus of 1 collapses every integer to the same residue class. That makes the usual modular inverse concept unusable for practical number theory calculations.
It shows the exact coefficients produced by the algorithm. This identity proves whether the gcd is 1 and directly explains where the inverse value comes from.
If one inverse is x, then every value of the form x + km is equivalent modulo m. The calculator reports the least positive representative.
Modular inverses appear in cryptography, coding theory, discrete mathematics, linear congruences, residue arithmetic, and algorithms involving divisions inside modular systems.
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.