Solution of Linear Congruence/Examples/5 x = 4 mod 3

Example of Solution of Linear Congruence
Let $5 x = 4 \pmod 3$.

Then:
 * $x = 2 + 3 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 + 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 {5, -3} = 1$

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

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

Next we find a single solution to $5 x - 3 k = 4$.

Again with the Euclidean Algorithm:

and so:

is a solution.

Thus:

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