Can someone explain modulo with fractions?

Euclidean algorithm.In summary, the conversation discusses the concept of finding the modular inverse of a number and how it relates to solving equations in rational numbers and integers mod m. The conversation also suggests using the Euclidean algorithm to find the integer b that is congruent to a modulo m.
  • #1
maxfails
11
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
  • #2
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.
 
  • #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:
  • #4

1. What is modulo with fractions?

Modulo with fractions refers to the mathematical operation of finding the remainder after dividing a fraction by another fraction. It is often denoted as a%b, where a and b are fractions, and returns a fraction as the remainder.

2. How is modulo with fractions different from regular modulo?

The main difference between modulo with fractions and regular modulo is that in regular modulo, the divisor (b) must be a whole number, while in modulo with fractions, both the dividend (a) and divisor (b) can be fractions.

3. What is the purpose of using modulo with fractions?

Modulo with fractions can be used to solve problems involving fractions, such as finding equivalent fractions or determining if a fraction is in its simplest form. It can also be used in programming to perform calculations involving fractions.

4. Can you give an example of how to calculate modulo with fractions?

Sure, let's say we want to find the remainder of 5/8 modulo 3/4. We can first convert both fractions to equivalent fractions with a common denominator, such as 15/24 and 18/24. Then, we can divide 15/24 by 18/24 to get 3/4, which is the remainder in this case.

5. Are there any special rules or considerations when using modulo with fractions?

One important rule to keep in mind is that the divisor (b) cannot be equal to 0, as division by 0 is undefined. Additionally, when using modulo with fractions in programming, it is important to ensure that the proper data types are used to avoid rounding errors or unexpected results.

Similar threads

Replies
11
Views
489
Replies
5
Views
2K
Replies
4
Views
218
  • General Math
Replies
3
Views
1K
Replies
6
Views
2K
Replies
5
Views
845
Replies
1
Views
664
Replies
3
Views
1K
Replies
2
Views
1K
Back
Top