By definition: if and only if divides , and this happens if and only if divides -since we need another factor of 3- i.e. indeed.

(note then that it is true that if both sides have a common factor that divides the module we can divide everything - both sides and the module - by that number )

Yes, but in this case since it follows that 6 has a multiplicative inverse module 7 .

In fact so you have ...

More generally, if you wanted to find the modular inverse here are a couple of ways:

1.Use the extended euclidean algorithm -this works always.

2.If the module were a prime , note that by Fermat's Little Theorem, since then and are modular inverses, and so you compute by repeatedly squaring and taking modules at each step.