Solving a system of congruence equations

21 Views Asked by At

Let's consider the system:

$\alpha x_1+\beta \equiv 0 \space (mod26)$

$\alpha x_2+\beta \equiv 1 \space (mod26)$

I want to find $\alpha$ and $\beta$ given $x_1, \space x_2$.

Subtracting the two equations i get: $\alpha (x_2-x_1) \equiv 1 \space (mod26)$ So i have to find the multiplicative inverse of $(x_2-x_1)$, and it's only possible if $gcd((x_2-x_1),26)=1$

At this point, $\alpha = (x_2-x_1)^{-1}$ and $\beta = \frac{-x_1}{x_2-x_1}$

It it correct ?