Euclidean Algorithm/Examples/31x = 1 mod 56

Example of Use of Euclidean Algorithm
Let $x \in \Z$ be an integer such that:
 * $31 x \equiv 1 \pmod {56}$

Then by using the Euclidean Algorithm:
 * $x = -9$

is one such $x$.

Proof
Then:

So:
 * $-9 \times 31 + 5 \times 56 = 1$

and so:
 * $-9 \times 31 \equiv 1 \pmod {56}$

as required.