0

I am trying to prove the following: $$\text{for any }n,m;\;\gcd(n,m)=1\iff n^{-1} \:\mathrm{mod}\:m\text{ exists}$$ I know how to prove $(\Longleftarrow )$, but I can’t figure out how to do $(\implies)$

Proof $(\Longleftarrow )$:

BWOC, sps $\gcd(n,m)=g>1$, then $n=ag,m=bg$ for some $a,b\in\mathbb{Z}^+$

$$1=nn^{-1}\;\mathrm{mod}\; m=agn^{-1}\;\mathrm{mod}\; bg=(an^{-1}\;\mathrm{mod}\; b)g\ne 1 $$ Which leads to a contradiction.

For the $(\implies)$ one, I think could be proved by finding $k$ such that $n^k\equiv 1\pmod m$, or maybe by some simpler methods, and I have no idea how to do.

If you know how to prove this theorem, please let me know, any hints are appreciated!

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
Mr. W
  • 785

0 Answers0