Inverses multiply to 1.
Mod 7:
It cannot be 8, the only choices available are 0 to 6.
0 does not have an inverse.
1 is always its own inverse.
2 and 4 are inverses since 2 x 4 = 8 = 1 mod 7.
3 and 5 are inverses since 3 x 5 = 15 = 1 mod 7.
6 is its own, since 6 x 6 = 36 = 1 mod mod 7.
Example problem:
What is the inverse of 9 (mod 11) ?
We want 9 * x = 1 (mod 11)
or 9x = 11 y + 1
multiples of 11 are 11, 22, 33, 44 ... and 44 is one less than a multiple of 9.
So the inverse of 9 (mod 11) = 5
5 * 9 = 45 = 1 mod 11.
Equations of the form 9x = 11 y + 1
to be solved in integers are called Diophantine Equations,
and there are systematic ways of solving them,
which, not too suprisingly, involve the use of modular arithmetic.