Law of Inverses (Modulo Arithmetic)

Theorem
Let $m, n \in \Z$.

Then:
 * $\exists n' \in \Z: n n' \equiv d \left({\bmod\, m}\right)$

where $d = \gcd \left\{{m, n}\right\}$.

Corollary
Let $m, n \in \Z$ such that $m \perp n$, i.e. such that $m$ and $n$ are coprime.

Then:
 * $\exists n' \in \Z: n n' \equiv 1 \left({\bmod\, m}\right)$

Proof
We have that $d = \gcd \left\{{m, n}\right\}$.

So:

So $b$ (in the above) fits the requirement for $n'$ in the assertion to be proved.

Proof of Corollary
We have that $m \perp n$.

That is, $\gcd \left\{{m, n}\right\} = 1$.

The result follows directly.

Note
In the equivalence $n n' \equiv 1 \left({\bmod\, m}\right)$ note that from Euler's Theorem:
 * $n' \equiv n^{\phi \left({n}\right) - 1} \left({\bmod\, m}\right)$

where $\phi \left({n}\right)$ is the Euler $\phi$ function.