This question arose on my head while solving another problem. Say we have have two positive integers $x,y$ such that they are coprime. Can we always find some integer $a$ such that $ax \equiv 1 \pmod{y}$? Furthermore, would it be unique or would we be able to find infinite such $a$?
Asked
Active
Viewed 75 times
-1
-
1Yes, this is immediate from the Euclidean algorithm. And $a$ is of course not unique, but is unique mod $y$. – Randall Feb 07 '23 at 14:24
-
@Peter I cited this other post a minute ago, but I retracted it because I don't think it's really a good duplicate. It really only seems to address the (simpler) question of why an inverse doesn't exist when $\gcd(x,y)>1$. There must be a better duplicate somewhere... – lulu Feb 07 '23 at 14:26
-
@Randall what do you mean by "is unique mod y"? Do you mean given an unique y, we can find a unique a? – 轻型八神 Feb 07 '23 at 14:27
-
No, any two suitable $a$s will be congruent mod $y$. – Randall Feb 07 '23 at 14:31
-
@Randall then what do you mean by "but is unique mod y" – 轻型八神 Feb 07 '23 at 14:33
-
I just said it. – Randall Feb 07 '23 at 14:33
-
Note the $a$ can also be expressed in function of $x,y$ by Euler theorem $a=x^{\varphi(y)-1}$, though much more complicated than Bezout as a justification. – zwim Feb 07 '23 at 16:02
-
@zwim that result is interesting. Can I get to know how you derived it – 轻型八神 Feb 07 '23 at 16:15
1 Answers
-1
Yes! If $x$ and $y$ are coprime, Bezout's theorem ensures that there exists $a,b$ such that $xa + yb = 1$.
It follows that $xa = 1 (\text{mod } y)$.
-
Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Feb 07 '23 at 16:26