Can someone explain modulo with fractions?

  • Context: Undergrad 
  • Thread starter Thread starter maxfails
  • Start date Start date
  • Tags Tags
    Explain Fractions
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 32K views
maxfails
Messages
10
Reaction score
0
so apparently 3^-1 mod 5 = 2 so (1/3) mod 5 = 2
I don't get how this works, can someone explain?
 
Mathematics news on Phys.org
maxfails said:
so apparently 3^-1 mod 5 = 2 so (1/3) mod 5 = 2
I don't get how this works, can someone explain?

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.
 
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: