Britannica
Sources used in this answer
When does a number have a multiplicative inverse modulo a nonprime modulus?
Created from Britannica articles
using AI.
AI can make mistakes, so verify using Britannica articles.
In number theory, an integer has a multiplicative inverse modulo a modulus if and only if and are relatively prime—meaning their greatest common divisor is 1.
When the modulus is not prime, division is not always possible for every residue class. Specifically, the equation has a solution for if and only if and share no common factors other than 1. If and are not relatively prime, no such exists, and the multiplicative inverse is undefined for that class.1