[Math] Stuck : Using inverses to solve linear congruences

discrete mathematicselementary-number-theory

Question : What are the solutions of the linear congruence 3x ≡ 4 (mod 7)?

Step 1 – We know that −2 is an inverse of 3 modulo 7.

Step 2 – Multiplying both sides of the congruence by −2 shows that

−2·3x ≡−2·4(mod7).

Step 3 – Because

−6 ≡ 1 (mod 7) – Equation 1

and −8 ≡ 6 (mod 7) – Equation 2

it follows that if x is a solution,

then x ≡ −8 ≡ 6 (mod 7).


In Step 3,
I am unable to understand how Equation 1 and Equation 2 lead to the statement

x ≡ −8 ≡ 6 (mod 7).

Here are the conclusions I was able to derive from these facts,

-6 mod 7 = 1 mod 7

-8 mod 7 = 6 mod 7

(-1) is the inverse of 6 modulo 7

It'd be great if you can help me figure out what other conclusion I'm missing.

Best Answer

$$\begin{eqnarray} \overbrace{(-2)\,3}^{\large{\equiv -6\equiv\color{#c00}{\bf 1}}}x &\equiv& \overbrace{(-2)\,4}^{\large\equiv -8\equiv\color{#0a0}{\bf -1}}\pmod 7\\ \Rightarrow\quad\ \ \color{#c00}{\bf 1}\cdot x&\equiv& \color{#0a0}{\bf -1}\equiv 6\ \, \pmod 7 \end{eqnarray}$$

Above we applied the following fundamental

Congruence Product Rule $\rm\quad\ \, A\!\equiv a\ \Rightarrow\ Ab\equiv ab\ \pmod{\!n}\ \ \ $

when we made the inference $\ (-2)3 \equiv 1\,\Rightarrow\, (-2)3x \equiv 1\cdot x$

and also we used that congruence is an equivalence relation.

Related Question