Inverses Modulo m

If ab$\limfunc$modm = 1, then b is called an inverse of amodulo m, and we write a-1$\limfunc$modm for the least positive residue of b.


$\blacktriangleright$ Evaluate

5-1$\limfunc$mod7 = 3


This calculation satisfies the definition of inverse, because 5⋅3$\limfunc$mod7 = 1. Other notation for the inverse modulo m includes 1/a$\limfunc$modm and ${\frac{1}{a}}$$\limfunc$modm.


$\blacktriangleright$ Evaluate

23-1$\limfunc$mod257 = 190 6pt

${\frac{{1}}{{5}}}$$\limfunc$mod6 = 5


The notation a/b$\limfunc$modm is interpreted as a(b-1$\limfunc$modm)$\limfunc$modm; that is, find the inverse of b modulo m, multiply the result by a, and then reduce the product modulo m.


$\blacktriangleright$ Evaluate

3/23$\limfunc$mod257 = 56 6pt

${\frac{{2}}{{5}}}$$\limfunc$mod6 = 4


Note that a-1$\limfunc$modm exists if and only if a is relatively prime to m; that is, it exists if and only if gcd(a, m) = 1. Thus, modulo 6, only 1 and 5 have inverses. Modulo any prime, every nonzero residue has an inverse. In terms of the multiplication table modulo m, the integer a has an inverse modulo m if and only if 1 appears in row a$\limfunc$modm (and 1 appears in column a$\limfunc$modm).