Modular inverse

In Modular arithmetic, y is the modular inverse of x if:

\[xy \equiv 1 (\text{mod m})\]

and if x is not relatively prime to m