Math Fundamentals18 sections · 814 units
Open in Course

Example - Modular Inverse

(Inverse of 3 mod 7)

Find the inverse of 3 mod 7. By Fermat, 3_inv = 3^(7-2) = 3^5 mod 7. Compute 3^5 = 243. Then 243 mod 7 = 5.

Verify: 3 × 5 = 15, and 15 mod 7 = 1. Correct.

Now if you need (10 / 3) mod 7, compute (10 × 5) mod 7 = 50 mod 7 = 1.