Congruence vs equality in mod arithmetic

  • I
  • Thread starter jack476
  • Start date
  • Tags
    Arithmetic
In summary, there are two different notations for modular arithmetic, with a difference in the use of "=" and "≡". Some authors use "=" to indicate a relation between integers, while others use "≡" to indicate equality of sets. It is also important to note that the notation is often ambiguous and can be interpreted in different ways. Ultimately, it is up to personal preference and it is more important to understand the concept rather than the notation used.
  • #1
jack476
328
125
I've encountered what seems to be two different notations for modular arithmetic and I'm confused as to whether they mean the same thing.

My abstract algebra textbook (Pinter) and professor would write, for example, 5 = 15mod(10), as though mod(10) is an operation that returns the amount by which 15 differs from a multiple of 10.

But the other notation that I've run into, and the one that seems to be more common, is to write 15 ≡ 5mod(10), identifying 15 as an element of the set of integers that are 5 more than a multiple of 10.

Which notation is generally preferred? Are there cases where it is more appropriate to use one notation instead of the other?
 
Mathematics news on Phys.org
  • #2
I have never seen the first version used in mathematics, and I have never seen the second version used in computer science or anything related to programming.
 
  • #3
It is by far more important that you know what is meant.
##\mod 10## is simply the image under the natural projection ##\pi : \mathbb{Z} \twoheadrightarrow \mathbb{Z}_{10}##, that is the remainder of division by ##10##. So

##5 = 15 \mod 10##
##⇔ 15 = 5 \mod 10##
##⇔ \pi(5) = \pi(15) ##
##⇔ \pi(15-5) = 0##
##⇔ 15 - 5 \in \ker \pi = 10\mathbb{Z}##
##⇔ 15 \equiv 5 \mod 10##
##⇔ 5 \equiv 15 \mod 10##
##⇔ 15 \equiv 5 \; (10)##
##⇔ 5 \equiv 15 \; (10)##
##⇔ 10 \; | \; (15-5) ##
##⇔ 10 \; | \; (5-15) ##
##⇔ (5 = z_1 \cdot 10 + r_1 ∧ 15 = z_2 \cdot 10 + r_2 ⇒ r_1 = r_2)##

Make your choice. Probably many here would object one or another notation. Don't bother. Everybody has likely his own preferences. I prefer ##15 \equiv 5 \mod 10## or ##15 \equiv 5 \; (10)## if lazy. The ##\equiv## sign only indicates, that the equality isn't the one in ##\mathbb{Z}## but the one in ##\mathbb{Z}_{10}##. However, if people deal with abstract rings instead, say ##\pi : R \twoheadrightarrow S##, nobody (or at least almost nobody) will write ##r_1 \equiv r_2 \mod \ker \pi## but probably ##\pi(r_1) = \pi(r_2)## without using ##\equiv##. However, most people (I guess) will write ##15 \equiv 5 \mod 10## when they deal with integers and want to emphasize whether they are in ##\mathbb{Z}## or ##\mathbb{Z}_{10}## and with the true (smallest positive) remainder on the right hand side as it is the standard representation of ##\mathbb{Z}_{10}##
 
  • #4
jack476 said:
My abstract algebra textbook (Pinter) and professor would write, for example, 5 = 15mod(10), as though mod(10) is an operation that returns the amount by which 15 differs from a multiple of 10.

Doesn't Pinter's define the notation A = B (mod C) to indicate a relation between A and B rather than an operation on B ?

I think Pinter would also write 15 = 5 (mod 10).
But the other notation that I've run into, and the one that seems to be more common, is to write 15 ≡ 5mod(10)

Some authors prefer "=" and other's prefer "≡".

Ambiguity in both the notion of "congruence" and its notation is usually glossed over because calculations look the same with different interpretations. In many texts, it is ambiguous is whether A = B mod (C) indicates a relation between integers A and B or whether A = B mod(C) indicates an equality of sets. One can regard "5" as the integer 5 or abuse notation by regarding "5" as denoting the set of all integers that satisfy the relation of being congruent to 5 mod C.

A equivalence relation has associated "equivalence classes". It's often convenient to denote a set that is an equivalence class by labelling it with one of the elements in the set. If you wanted to do things in a refined way, you could write "A ≡B (mod C)" to denote a relation between integers A and B and write "[A] = [ B ] (mod C)" to indicate the equality of the sets "[A]" and "[ B ]", where the brackets are used to emphasize that "[A]" is the set of all integers that are equivalent to A under the relation "≡... mod(C)".

(Amusing - the message window has decided to use bold text, presumably because I wrote a "[ B ] ".)
 

1. What is the difference between congruence and equality in mod arithmetic?

Congruence and equality are two different concepts in mod arithmetic. Equality means that two numbers are exactly the same, while congruence means that two numbers have the same remainder when divided by a given modulus.

2. How is congruence different from regular division?

Congruence is different from regular division because it takes into account the remainder when dividing by a given modulus. In regular division, the remainder is typically ignored, but in congruence, it is the main focus.

3. Can you provide an example of congruence in mod arithmetic?

Yes, for example, 12 ≡ 2 (mod 5). This means that 12 and 2 have the same remainder of 2 when divided by 5. Another example is 24 ≡ 9 (mod 5), as both 24 and 9 have a remainder of 4 when divided by 5.

4. What are some real-life applications of congruence in mod arithmetic?

Congruence in mod arithmetic is commonly used in computer science and cryptography to ensure the security of data and information. It is also used in various fields of engineering, such as in designing patterns for textiles or creating symmetric shapes in architecture.

5. How do you determine if two numbers are congruent in mod arithmetic?

To determine if two numbers are congruent in mod arithmetic, you need to divide both numbers by the given modulus and compare the remainders. If the remainders are the same, then the numbers are congruent. If the remainders are different, then the numbers are not congruent.

Similar threads

Replies
5
Views
2K
  • General Math
Replies
4
Views
2K
Replies
7
Views
2K
  • General Math
Replies
1
Views
715
  • General Math
Replies
1
Views
1K
Replies
7
Views
834
  • Mechanical Engineering
Replies
13
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
15
Views
1K
Back
Top