Solution of Linear Congruence/Examples/10 x = 8 mod 6

Example of Solution of Linear Congruence
Let $10 x = 8 \pmod 6$.

Then:
 * $x = 4 + 7 t$

where $t \in \Z$.

Proof
We have that:
 * $8 \equiv 2 \pmod 6$

and so:

That should simplify the arithmetic.

Then:

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

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

Using the Euclidean Algorithm:

Thus we have that:
 * $\gcd \set {10, -6} = 2$

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

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

Next we find a single solution to $10 x - 6 k = 2$.

Again with the Euclidean Algorithm:

and so:

is a solution.

Thus from $(2)$:
 * $x = 2 + 3 t$