Question about mod function and congruences

  • Thread starter John112
  • Start date
  • Tags
    Function
In summary, when two integers (a and b) are divided by a common divisor (m) and have the same remainder, it implies that the difference of (a and b) will also be divisible by m. This is because if a and b have the same remainder, then there exist integers p and q such that a = m*p + r and b = m*q + r, where r is the common remainder. Thus, a - b = m*(p - q), which means that the difference is divisible by m.
  • #1
John112
19
0
Im having a bit of hard time understanding how is that two intergers (a and b) divided by a common divisor (m) have the same remainder imply that the difference of (a and b) will aslo be divisible by m?

Essentially what I am asking is:

a [itex]\equiv[/itex] b (mod m) [itex]\Rightarrow[/itex] m|(a-b)

the "|" means divides just incase you aren't fimiliar with that symbol.

a [itex]\equiv[/itex] b (mod m) says a/m and b/m will have the same remainder. Since, they have the same remainder (a - b) will also be be divisible by m.

example 1) 29 [itex]\equiv[/itex] 15 (mod 7) [itex]\Rightarrow[/itex] 7|(29 -15)

Why is the difference of 29 -15 also divisible by 7?

Is it because when since 29 and 15 have the same reminder means that we are simply taking out factors of 7 and the common reminder from the 29 and 15?

29 - 15
[7(4) + 1] - [ 7(2) + 1]

= 7(2) = 14 which is divisible by 7example 2) 11 [itex]\equiv[/itex] 4 (mod 7) [itex]\Rightarrow[/itex] 7|(11 - 4)
11 - 4
[7(1) + 4] - [7(0) + 4]

= 7 which is divisible by 7Even if my reasoning is correct, please try to explain in your own way. I can do it mathmetically but that problem I am having is understanding it.
 
Last edited:
Mathematics news on Phys.org
  • #2
Hi John112! :smile:

Yes, your reasoning is correct.

If a and b are both = 4 (mod 7),

then there exist integers p and q such a = 7p + 4, b = 7q + 4,

so a - b = 7(p - q). :wink:
 
  • #3
tiny-tim said:
Hi John112! :smile:

Yes, your reasoning is correct.

If a and b are both = 4 (mod 7),

then there exist integers p and q such a = 7p + 4, b = 7q + 4,

so a - b = 7(p - q). :wink:

Thanks for that clear explanation tiny-tim!
 

1. What is the mod function and how does it work?

The mod function, also known as the modulus function, calculates the remainder after dividing two numbers. For example, 10 mod 3 would equal 1, since 10 divided by 3 has a remainder of 1. This function is often used in programming to determine if a number is divisible by another number.

2. Can the mod function be used with non-integer numbers?

Yes, the mod function can be used with non-integer numbers. In this case, the decimal part of the number is ignored and only the integer part is considered. For example, 10.5 mod 3 would also equal 1.

3. What is the significance of congruences in relation to the mod function?

Congruences are used to determine if two numbers are equivalent when divided by a given modulus. For example, 10 mod 3 is congruent to 1 mod 3, since both have a remainder of 1 when divided by 3. This is important in number theory and cryptography.

4. How is the mod function used in cryptography?

The mod function is used in cryptography to encrypt and decrypt messages. It is used in algorithms such as the RSA algorithm, which uses large prime numbers and the mod function to ensure secure communication.

5. Are there any other applications of the mod function?

Yes, the mod function has various applications in mathematics, computer science, and engineering. It is used in algorithms for computing large numbers, finding patterns in data, and generating random numbers. It is also used in digital signal processing and error correcting codes.

Similar threads

Replies
4
Views
921
  • Precalculus Mathematics Homework Help
Replies
3
Views
2K
  • General Math
Replies
5
Views
2K
Replies
5
Views
2K
  • General Math
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
4
Views
937
  • Precalculus Mathematics Homework Help
Replies
14
Views
1K
Replies
8
Views
6K
Replies
2
Views
4K
Replies
4
Views
1K
Back
Top