Modular Multiplicative Inverse

Notes

The modular multiplicative inverse of an integer is an integer x such that . The modular multiplicative inverse of an integer may be denoted as , and x exists if and only if the integers a and n are coprime, that is .

If n is prime, then every nonzero integer a that is not a multiple of n has a modular inverse. By Euler's totient theorem, if a and n are coprime, then , where is the totient function. Thus, , where .