How to find positive coefficients in Bezout's Identity?

644 Views Asked by At

I'm trying to find the multiplicative inverse of $10$ modulo $27$ using the extended euclidean algorithm and Bezout's Identity. Using euclids algorithm I find that gcd$(27,10)=1$, and the extended version gives me $$1=\text{gcd}(27,10)=27\cdot 3+10\cdot(-8)$$ Since the multiplicative inverse has to be positive (in the set $\{0,\ldots ,26\}$), i can't use $-8$. How do I find a positive integer $x$ such that the above equation holds when replacing $-8$ with $x$? I've read a couple of posts here regarding this problem, but they seem a bit confusing.

Answers are greatly appreciated!

1

There are 1 best solutions below

5
On

$-8$ is congruent to $19$ modulo $27$. So $19$ is the multiplicative inverse of $10$ modulo $27$.


Edit: (Addressing questions in comments).

You used the Euclidean algorithm to show that $$ 1 = 27\times 3 + 10 \times (-8)$$

But then, $$ 1 = 27 \times (3 - 10n) + 10 \times(-8 + 27n)$$ for any $n \in \mathbb N$.

Picking $n = 1$, we have $$ 1 = 27 \times (-7) + 10 \times 19$$

Hence $$ 1 \equiv 10 \times 19 \ {\rm mod } \ 27.$$