1

Let $a$ and $n$ be positive integers, and let $d = \gcd(a, n)$. Show that the equation $ax\equiv 1 \pmod{n}$ has a solution for some integer $x$ if and only if $d = 1$".

I know that if $ax\equiv 1 \pmod{n}$, then $ax=nu+1$ giving $1=ax-nu$, meaning $d=1$. However, I'm not sure what to do for proving the other direction. Any help is appreciated.

thesmallprint
  • 3,636
  • 1
  • 16
  • 25

4 Answers4

3

From Bezout's identity, we have $ax+bn=1$ if and only if $gcd(a,n)=1$. $ax+bn=1$ same as, $ax\equiv 1\pmod{n}$.

Taxicab
  • 409
1

You have solved the 'only if' part. This can be a way to proceed for the 'if' part. Now, we have $d=1$ which means that $\gcd(a,n)=1$. Consider the set $[ai] \bmod n $ for $i$ ranging from $1$ to $n$. If we have: $$ai=aj \pmod n$$ Then $n$ divides $a(i-j)$. As $\gcd(a,n)=1$, $n$ divides $i-j$ and since $i,j$ range from $1$ to $n$, $i=j$. This means that two distinct elements of our set are always different. Since there are $n$ values in the set, and there are $n$ possible remainders, one of them must be $1$ which proves the existence of $i$ for which $ai=1 \pmod n$.

Haran
  • 9,717
  • 1
  • 13
  • 47
  • For the proof of converse part, can't I just prove using contradiction as follows: "On the contrary suppose $\nexists x$ s.t. $ax(mod n) =1$. Since gcd(a, n) =1, $\exists$ p and q such that $pa+nq=1\implies pa-1=-nq\implies pa(mod n) =1$ and hence by contradiction there exists x satisfying the ax(mod n) =1"? Will this suffice to prove the converse part of the result? – Koro May 19 '20 at 22:05
  • 1
    Sure @Koro IG that's what has been done in another answer. I wanted to show a different approach. – Haran May 20 '20 at 06:14
  • OK. I'm new to Abstract Algebra so I was just wondering if I was right. Thanks. – Koro May 20 '20 at 06:19
1

(i) If $ax\equiv 1 \pmod{n}$ has a solution, then you can write $ax - bn = 1, b\in\mathbb{Z}$. No prime number divides $1$, so $\gcd(a,n) = 1$.

(RRA argument shows you that by assuming there is a prime $p|d=\gcd(a,n)$, you can factor $p(a'x - bn') = 1\Rightarrow p|1$, absurd.)

(ii) If $\gcd(a,n) = 1$, then we have $ax\equiv y\pmod{n}$ for arbitrary units $x\not\equiv y$ and $y$ must assume the value $1$ for some value of $x$ since $\{au_1,\ldots , au_{\phi(n)}\}$ is a reduced residue system modulo $n$ (the set of units mod $n$).

(By RRA, suppose you test all $\phi(n)$ units for $x$ but none yields $ax\equiv 1\pmod{n}$. Thus $y$ assumes less than $\phi(n)$ values. So we have a repetition such that $av\equiv u\equiv av'\pmod{n}\Rightarrow v\equiv v'\pmod{n}$ for two different units $v, v'$, contradicting $x\not\equiv y$.)

0

By Euler's Theorem , $a^{\phi(n)} = 1 (\mathrm{mod}~n)$ if $n$ and $a$ are co-prime. Thus, you can directly take $x = a^{\phi(n) - 1}$ to satisfy the equation.

  • 1
    Can you prove Euler's theorem without using the fact that if $\gcd(a,n)=1$ then $a$ is invertible modulo $n$? – Angina Seng Sep 17 '18 at 07:07
  • 1
    One way to prove it is by using Extended Euclidean algorithm. The algorithm itself no only gives a way to calculate x, but also proves such x always exists. There are also other proofs not using this fact on Wikipedia. – Colin Smith Sep 17 '18 at 07:12
  • I have given a proof using the fact that $a$ is invertible modulo $n$ – Haran Sep 17 '18 at 07:16