How can I find a modular inverse by hand using the add-the-modulus method?
Conditions
- Used to find an inverse of a modulo m.
- One looks among integers congruent to 1 modulo m for a multiple of a.
Reasoning, step by step
- Start with the number 1.
- Add the modulus m to get . Check if it is a multiple of a.
- If not, add m again to get . Continue this process.
- Stop when you find a number that is divisible by a.
- Factor as .
- The integer b is the inverse of a modulo m.
Example
For the inverse of 5 mod 7: Start with 1. Add 7 to get 8 (not a multiple of 5). Add 7 again to get 15. 15 is a multiple of 5 (). So the inverse is 3.
Common misconceptions
- Thinking you must start with a instead of 1.
- Forgetting to check if the generated number is actually a multiple of a before factoring.
Watch the explanation
Connected concepts
Explore next
Related questions
An integer a has an inverse modulo m if and only if the greatest common divisor of a and m is equal to 1, written as . If the greatest common divisor between a and m is greater than 1, then there is no inverse modulo m.
Conditions: a is an integer.; m is the modulus.; (a,m) denotes the greatest common divisor of a and m.
18 is its own inverse modulo 19 because 18 is congruent to -1 modulo 19, and -1 is always its own multiplicative inverse since . Therefore, .
Conditions: Working modulo 19.; Using the fact that 18 ≡ -1 (mod 19).
Negative residues make finding modular inverses easier by replacing a large positive representative with a smaller-magnitude equivalent residue modulo m. This often turns the problem into finding the inverse of a simpler number, like -1 or -2, which can be recognized immediately or factored more easily.
Conditions: The replacement must be congruent modulo the same m.; The resulting residue should still be invertible modulo m.
Two integers a and b are multiplicative inverses modulo m if their product is congruent to 1 modulo m. This is defined by the condition .
Conditions: a and b are integers.; The congruence is taken modulo m.
5 has no inverse modulo 10 because the greatest common divisor of 5 and 10 is 5, which is not 1. According to the existence theorem, an integer has an inverse modulo m if and only if their gcd is 1.
Conditions: Modulus is 10.; Number whose inverse is requested: 5.
Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.