Skip to content
← All questions

When does an integer have an inverse modulo m?

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 (a,m)=1(a,m)=1. 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.

Reasoning, step by step

  1. Compute the greatest common divisor (gcd) of a and m.
  2. Check if the gcd is equal to 1.
  3. If (a,m)=1(a,m)=1, then a has an inverse modulo m.
  4. If (a,m)>1(a,m)>1, then a has no inverse modulo m.

Example

The video states: 'The integer a has an inverse modulo m if and only if (a,m)=1.'

Common misconceptions

  • Assuming that any integer has an inverse modulo any modulus.
  • Forgetting that the condition is an 'if and only if' statement, meaning gcd=1 is both necessary and sufficient.

Watch the explanation

Connected concepts

Explore next

Related questions

Understand why

↗
Find a method

↗
Find a method

↗

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.