0
$\begingroup$

My notes have the following definition for congruence which I do not understand.

$a \equiv_n b \Leftrightarrow n \mid (a-b)$

I know that $a \equiv_n b$ is $a (mod\,n) = b (mod\,n)$ but I'm not sure where the above definition comes from.

  • 0
    @user236182 thanks for the reply. What does $a_1$ and $b_1$ represent?2017-01-15
  • 2
    You could also say that $a\equiv b\pmod{n}$ denotes "$a,b$ have the same remainders when divided by $n$".2017-01-15
  • 0
    I don't understand your question. A definition is giving a name to a condition. n dividing a-b is a common enough and important enough condition to deserve a name and notation. So we call it "a is congruent to b modulo n". We usually notate it as $a\equiv b\mod n $ but we can also use the notation $a_n \equiv b $. So... what do you mean you don't know where the definition "comes from"? It comes from the same place all definitions come from; necessity.2017-01-15
  • 0
    @fleablood ah should've said "I don't understand this definition"2017-01-15
  • 0
    There are three equivalent ways to think of $a \equiv b \mod n $. 1) n|a-b. 2) a and b have the same remainder when divided by n, and 3) a =kn + b for some integer k which may be positive or negative or zero. Those 3 interpretations are exactly the same thing.2017-01-15
  • 0
    What's to understand? a-b is an integer. It may or may not be divisible by n. If it is, we say $a \equiv b \mod n $. That's a definition. Is your question that you thought it had a *different* meaning? If so, your meaning is probably exactly the same. "a and b have the same remainder" means a/n = k R r and b/n = j R r-- means a=kn + r and b=jn +r-- means a-b=n (k-j)-- means n divides a-b.2017-01-15
  • 0
    @fleablood yes I understand those definitions are equivalent, I can use them in proofs, I can recite them from memory. However, I'm having trouble seeing *why* $n \mid a - b$ is an equivalent to $a \equiv _n b$2017-01-15
  • 0
    What does $a \equiv b \mod n $ mean to you? $a \equiv b \mod n \iff a-b \equiv 0 \mod n \iff n| a-b $ is usually the *definition*. Saying you don't understand why is like saying you don't understand why even numbers are divisible by 2.2017-01-15

2 Answers 2

1

Let's suppose we have integers such that $a = nk+r; 0\le r < n $ and $b = nj+r ;0 \le r < n $ then $a $ and $b $ have the same remainder, $r $, when divided by $n $.

If so, then $a-b=(nk+r)-(nj+r)=nk-nj=n (k-j) $. This means $a-b $ is a multiple of $n $ and $n$ divides $a-b $.

Likewise if we suppose we have integers such that $n$ divides $a-b$, that would mean $a-b=n*m $ for some $m $. If $b $ has remainder $r $ when divided by $n $, the $b=kn+r $ for some $k $. $a = n*m +b= n*m+kn+r= n (m+k)+r $. So $a $ and $b $ have the same remainder when divided by $n $.

So the two statements: i) $n|a-b $ and ii) $a$ and $b $ have the same remainder; are equivalent to each other.

We define that property as:

$a \equiv b \mod n $

Or we sometimes use the notation:

$a\equiv_n b $.

===

Also note

If $a \equiv b \mod n $ then $a +k \equiv b+k \mod n $

So $a \equiv b \mod n \iff a-b \equiv 0 \mod n $.

Um... do you see that $X \equiv 0 \mod n \iff n|X $?

  • 0
    This is very clear, thank you! is the first statement coming from the precondition $a \equiv _n b$ ?2017-01-15
  • 0
    Hmmm, not really. I'm assuming that $a \equiv_n b $ hasn't been defined. I start by showing the statements "same remainder" and "n|a-b" are equivalent. *then* I define $a \equiv_n b $ by saying it can be defined to mean either of those statements.2017-01-15
  • 0
    How did you get $a=n*m+b$ ?2017-01-15
  • 1
    If $a-b = n*m $ then just add $b $ to both sides. $a-b=n*m \iff a=n*m+b $.2017-01-15
  • 0
    Gotcha, thank you so much!2017-01-15
1

Note that $a \equiv b \pmod n$ means that a multiple $k$ of $n$ is equal to $a$ when adding $b$ units. We write this as: $a= kn + b$

So $a-b = kn$ means that $a-b$ is divisible by $n$ thus $n \mid (a-b)$.

  • 0
    Hm okay, then maybe my real source of confusion comes from the definition of $a = kn + b$2017-01-15
  • 0
    $a =kn +b \iff a-b =kn \iff \frac {a-b}n=k $.2017-01-15
  • 0
    When you divide a number $a$ by $n$ there is always a remainder in this case $b$. See Euclidean Division.2017-01-15
  • 0
    By convention the remainder is less than n. b needn't be. Example 37 = 82 mod 15. I think that is the confusion. But 15|82-37=45. And 37/15 =2 r 7. 82/15=5 r 7. And 37 = (-3)x15 +82. So... all statements are good.2017-01-15
  • 0
    @fleablood: Those are congruence relations that I forgot mentioning. Nice point.2017-01-15
  • 0
    Point is the four statements i) $n|a-b $ ii)$ a=nk+b $ for some integer $k $ and iii)$a=nk+l$ and $b=nm+l$ for some integers $k,m,l $ and iv) $a=nk+r;b=nm+r $ for some integers k,m,r with $0\le r 2017-01-15