LearnViz Math
Expert ⛓ Discrete Math & Number Theory Topic 78 of 103

Modular Inverses

a⁻¹ mod n exists iff gcd(a,n)=1.

Key idea

a⁻¹ mod n exists iff gcd(a,n)=1.

In depth

a has an inverse mod n iff gcd(a, n) = 1. Then a·a⁻¹ ≡ 1 (mod n), found by the extended Euclidean algorithm. It permits division in modular arithmetic.

Worked example

3⁻¹ mod 7 = 5, since 3 × 5 = 15 ≡ 1.

Formula

a·a⁻¹ ≡ 1 (mod n)

Real-world uses

Common mistake

Looking for an inverse when gcd(a, n) > 1.

How to learn this

  1. Read the key idea and say it in your own words.
  2. Work through the worked example, then try a similar problem.
  3. Use the interactive lesson’s visual and mini-quiz to check the pattern.

Frequently asked questions

What is Modular Inverses?

a⁻¹ mod n exists iff gcd(a,n)=1. It is a topic at the expert level in Discrete Math & Number Theory.

What is the formula for Modular Inverses?

The key formula is a·a⁻¹ ≡ 1 (mod n).

Where is Modular Inverses used in real life?

Real-world examples: Decrypting RSA messages and dividing in modular systems used in computing.

What should I learn before Modular Inverses?

Make sure you are comfortable with Modular Arithmetic, the previous topic in Discrete Math & Number Theory.

What is a common mistake with Modular Inverses?

Looking for an inverse when gcd(a, n) > 1.

How can I practise Modular Inverses?

Open the interactive lesson, play with the visual, then answer the three-question mini-quiz. Getting two right marks the topic complete.

What comes after Modular Inverses?

Move on to Linear Congruences next.

Related expert topics in Discrete Math & Number Theory