Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Can someone explain modulo with fractions?

  1. Apr 2, 2009 #1
    so apparently 3^-1 mod 5 = 2 so (1/3) mod 5 = 2
    I don't get how this works, can someone explain?
     
  2. jcsd
  3. Apr 2, 2009 #2

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    Sure.

    In the rational numbers, 1/3 represents the solution to 3 * x = 1. For integers mod 5, we mean the same thing: 3 * x = 1 mod 5. But you can see that 3 * 2 = 1 mod 5, so 3^-1 is just 2.
     
  4. Apr 2, 2009 #3
    If gcd(a,m) = 1 and ab = 1 (mod m) then b = 1/a (mod m). If you want to find what integer b is congruent to modulo m and you only know a, then you can first use the euclidean algorithm to find it.
     
    Last edited: Apr 2, 2009
  5. Apr 3, 2009 #4
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Can someone explain modulo with fractions?
Loading...