0
$\begingroup$

I have difficulty interpreting the following: Determine all integers $n$ such that 2 has an inverse under multiplication modulo $n$.

So far I interpret this as: $2\times\frac{1}{n}=$ mod $(n)$, but what does this mean?

  • 0
    Nope! If 2 has an inverse $x$ mod (n) then $2x = 1$ mod (n). For example, $2*2 = 1$ mod(3), so 2's inverse is 2 when working mod (3).2017-01-31
  • 0
    wouldn't it be determine all integers $x$ then?2017-01-31
  • 0
    oh I think I see how it works. thank you2017-01-31
  • 0
    The answer ends up being that 2 has an inverse mod(n) if 2 and n are relatively prime. Try finding the inverse of 2 mod(4) and it becomes clear why one doesn't exist.2017-01-31

1 Answers 1

1

Hint $\ \exists x\!:\ 2x \equiv 1\pmod{n}\iff \exists x,k\!:\ 2x-kn = 1\iff \gcd(2,n)=1\ $ by Bezout

Update: Bezout is unknown. Instead: $ $ if $\,n\,$ has a inverse then $\,nk = 2x-1\,$ is odd, so $\,n\,$ is odd. Conversely, if $\,n\,$ is odd then $\,n = 2x-1,\,$ so $\,2x\equiv 1\pmod{n},\,$ so $\,n\,$ has inverse $\,x.$ Combining both directions we conclude that $\,2\,$ is invertible mod $\,n\iff n$ is odd $\iff \gcd(2,n)=1.\,$

Remark $ $ Generally $\,a\,$ is invertible mod $n\iff \gcd(a,n)=1,\,$ with similar proof.

  • 0
    I haven't studied Bezout yet so I'm not quite sure how the last relation works, but I still still don't understand what I need to solve for. In $2x-kn=1$2017-01-31
  • 0
    @noojman [See here](https://en.wikipedia.org/wiki/B%C3%A9zout's_identity) for the Bezout gcd equation. I added a proof without Bezout.2017-01-31
  • 0
    I think I finally got it. Thank you!2017-01-31