Solution of Linear Congruence/Examples/7 x = 6 mod 5

Example of Solution of Linear Congruence
Let $7 x = 6 \pmod 5$.

Then:
 * $x = 3 + 5 u$

where $u \in \Z$.

Proof
From Solution of Linear Diophantine Equation, the general solution to $(1)$ is:
 * $(2): \quad \forall t \in \Z: x = x_0 + 5 t, k = k_0 + 7 t$

where $x_0, k_0$ can be found as follows.

Using the Euclidean Algorithm:

Thus we have that:
 * $\gcd \set {7, -5} = 1$

which is (trivially) a divisor of $6$.

So, from Solution of Linear Diophantine Equation, a solution exists.

Next we find a single solution to $7 x - 5 k = 6$.

Again with the Euclidean Algorithm:

and so:

is a solution.

Thus:

Setting $u = t + 3$ gives the result.