Free · Modular arithmetic

Signed Modular Inverses and Coprimality

Find additive or multiplicative residues for signed integer inputs and verify coprimality.

  • Formula & worked example
  • Private in your browser
  • No signup
Go to tool

Calculator inputs

Loading calculator…

How to use this calculator

  1. Enter the known values in the units shown. Results update as you type.
  2. Where results are editable, change one to solve backwards. Lock a value to hold it fixed.
  3. Use the worked example to check the method. Reset restores the starting fields.

Private by default

Inputs and results stay in this browser tab. Bookify does not upload or store the values you enter.

Formula and method

The multiplicative inverse of 3 modulo 11 is 4.

a × x ≡1 (mod m) or a + x ≡0 (mod m)

Worked example

Enter these known values and leave the other values blank.

a
3
m
11
Result
For a = 3.
Explanation
a × x ≡ 1 (mod 11).
Explanation
Least nonnegative solution residue x = 4.
Explanation
Verification: 3 × 4 = 12; 12 ≡ 1 (mod 11).

Assumptions and limitations

  • The integer a is nonzero and its magnitude is at most1e10; m is a positive integer at most1e10.
  • A multiplicative inverse exists only when gcd(a,m)=1. Noncoprime pairs retain the explicit no-solution explanation; a Bezout coefficient is not presented as a valid inverse.
  • Additive mode returns the least nonnegative residue of−a. Modulus1 uses the captured residue0 convention.

Common questions

Can I enter a negative value?

Yes for a, in either inverse mode. The modulus remains positive.

What is the output range?

The selected residue lies from zero through one less than the modulus.

References

Calculate additive and multiplicative inverses for signed nonzero integers, check coprimality and show the complete equation. Correct the signed inverse: −3 modulo 11 has multiplicative inverse 7 because −3 × 7 ≡ 1 modulo 11. Report when no multiplicative inverse exists and enforce the stated integer limits.

Explore modular arithmetic or browse all math calculators.