🌐
American Institute of Mathematics
aimath.org › news › congruentnumbers › modulo.html
Basics about congruences and "modulo"
We say integers a and b are "congruent modulo n" if their difference is a multiple of n. For example, 17 and 5 are congruent modulo 3 because 17 - 5 = 12 = 4⋅3, and 184 and 51 are congruent modulo 19 since 184 - 51 = 133 = 7⋅19. We often write this as 17 ≡ 5 mod 3 or 184 ≡ 51 mod 19.
Discussions

Modular Arithmatic - Solving congruences - Mathematics Stack Exchange
Remark: We used congruence notation throughout, since it is very important to get accustomed to it. But $2x\equiv 3\pmod{5}$ means that $5$ divides $2x-3$. So we want to solve $2x-3=5k$, that is, $2x=3+5k$. So we want to find a $k$ such that $3+5k$ is divisible by $2$. It is clear that $k=1$ works, giving $2x=8$ so $x=4$. Any number congruent to $4$ modulo ... More on math.stackexchange.com
🌐 math.stackexchange.com
elementary number theory - Congruent Modulo $n$: definition - Mathematics Stack Exchange
In an Introduction to Abstract Algebra by Thomas Whitelaw, he gives examples of the congruence mod operation, such as $13 \equiv5 \pmod4$, and $9 \equiv -1 \pmod 5$. But when I first learned about the modulo operation my junior year, I would have told you that $13 \equiv 1 \pmod 4$, and that ... More on math.stackexchange.com
🌐 math.stackexchange.com
March 12, 2013
ELI5: How does a congruence modulo work?
I'm pretty sure it means that a and b have a congruent relationship when a modulo function of n is applied to them Yes, that's correct. All that means is that if you take a and b and remove as many factors of n as possible from each one, you get the same thing. For example, 1 ≡ 3 (mod 2) and 9 ≡ 5 (mod 4). More on reddit.com
🌐 r/explainlikeimfive
5
1
July 20, 2020
[Modular Arithmetic] Struggling with proof regarding congruence relation
From first principles and the algebraic definition of "prime": Suppose (n-x)2 ≡ x2 (mod p) for some n between 1 and p-1. Then there exists some integer k such that (n-x)2 - x2 = kp. So n2 - 2nx = kp. n(n - 2x) = kp. i.e. p divides n(n-2x). p is prime in the integers so if p divides n(n-2x) then p divides either n or n-2x. n is between 1 and p-1 so p cannot divide n. So p must divide (n-2x). Hence n is congruent to 2x modulo p. x is a number between 1 and p-1 so either n = 2x or n = 2x-p. if n = 2x then our original congruence reads ((2x)-x)2 ≡ x2 which is trivial. if n = 2x-p then our original congruence reads ((2x-p)-x)2 ≡ x2 which can be rearranged to read (p-x)2 ≡ x2, which is the one solution we were told beforehand. QED. More on reddit.com
🌐 r/learnmath
4
2
August 27, 2023
system of algebraic operations defined for remainders under division by a fixed positive integer; system of arithmetic for integers, where numbers "wrap around" upon reaching a certain value—the modulus
In mathematics, modular arithmetic is a system of arithmetic operations for integers, differing from the usual ones in that numbers "wrap around" when reaching or exceeding a certain value, called the modulus. … Wikipedia
🌐
Wikipedia
en.wikipedia.org › wiki › Modular_arithmetic
Modular arithmetic - Wikipedia
2 weeks ago - If a ≡ b (mod m) and a−1 exists, then a−1 ≡ b−1 (mod m) (compatibility with multiplicative inverse, and, if a = b, uniqueness modulo m). If ax ≡ b (mod m) and a is coprime to m, then the solution to this linear congruence is given by x ≡ a−1b (mod m).
🌐
Okstate
math.okstate.edu › people › binegar › 3613 › 3613-l11.pdf pdf
LECTURE 11 Congruence and Congruence Classes
Corollary 11.8. There are exactly n distinct congruence classes modulo n; namely, [0]n, [1]n, [2]n, .
🌐
UBC Math
personal.math.ubc.ca › ~PLP › book › sec-congruence.html
Congruence modulo n
Thus being congruent modulo 2 implies that they have the same parity. ... Now assume that \(a,b\) have the same parity. Then either they are both even or they are both odd. When \(a,b\) are both even, we can write \(a=2k, b=2\ell\) and so \(a-b = 2(k-\ell)\text{.}\) ... In both cases the difference \(a-b\) is divisible by 2 and so \(a \equiv b \mod 2\) as required. ... Perhaps the main reason that congruence modulo \(m\) is so important is that congruence interacts very nicely with basic arithmetic operations.
🌐
UCI Mathematics
math.uci.edu › ~ndonalds › math180a › 3congruence.pdf pdf
3 Congruences and Congruence Equations
Examples 3.16. 1. We solve the congruence equation 15x = 4 (mod 133). ... Since d = 1 and d|4, there is exactly one solution. Moreover, modulo 133, we see that
🌐
University of Houston
math.uh.edu › ~pwalker › 3336Sp21Sec4.4Slides.pdf pdf
© 2019 McGraw-Hill Education Solving Congruences Section 4.4
Example: Find an inverse of 101 modulo 4620. Solution: First use the Euclidian algorithm to show that gcd(101,4620) = 1. ... Example: What are the solutions of the congruence 3x≡4( mod 7).
Find elsewhere
🌐
Whitman College
whitman.edu › mathematics › higher_math_online › section03.01.html
3.1 Congruence
This notation, and much of the ... and perhaps the greatest mathematician of all time. Example 3.1.1 $\{…,-6,1,8,15,…\}$ are all congruent modulo 7 because their remainders on division by 7 equal 1....
🌐
YouTube
youtube.com › blackpenredpen
Solving congruences, 3 introductory examples - YouTube
Solving congruences, 3 introductory examples, Number Theory, Modular Arithmetic, blackpenredpen, math for fun, https://blackpenredpen.com/bprplive, https://t...
Published   April 23, 2018
Views   106K
🌐
YouTube
m.youtube.com › watch
Modular Arithmetic Basics: Congruence mod n
Share your videos with friends, family, and the world
Published   August 13, 2020
Top answer
1 of 4
4

There are many ways to solve the problem. The conceptually simplest, but most tedious, is to test one by one the possibilities $x\equiv 0\pmod{5}$, $x\equiv 1\pmod{5}$, and so on up to $x\equiv 4\pmod{5}$. Quickly we find that $x\equiv 4\pmod{5}$. (This approach would become quite unpleasant if $5$ were replaced by $97$.)

It is simpler to use some algebra. So rewrite as $2x\equiv 3\pmod{5}$. Since $3\equiv 8\pmod{5}$, it is convenient to rewrite the congruence as $2x\equiv 8\pmod{5}$. Then since $2$ and $5$ are relatively prime, we can divide by $2$, getting $x\equiv 4\pmod{5}$.

A fancier version is to start from $2x\equiv 3\pmod{5}$. Now multiply both sides by $3$ (the modular inverse of $2$). We get $6x\equiv 9\pmod{5}$. But $6\equiv 1\pmod{5}$ and $9\equiv 4\pmod{5}$, so we conclude that $x\equiv 4\pmod{5}$.

Remark: We used congruence notation throughout, since it is very important to get accustomed to it. But $2x\equiv 3\pmod{5}$ means that $5$ divides $2x-3$. So we want to solve $2x-3=5k$, that is, $2x=3+5k$. So we want to find a $k$ such that $3+5k$ is divisible by $2$. It is clear that $k=1$ works, giving $2x=8$ so $x=4$. Any number congruent to $4$ modulo $5$ will also work, giving answer $x\equiv 4\pmod{5}$.

2 of 4
1

Hint $\ {\rm mod}\,\ 2k\!-\!1\!:\,\ 2k\!-\!1\equiv 0\,\Rightarrow\, \color{#c00}{2k\equiv 1},\ $ so $\, k\equiv 2^{-1}.\,$ Therefore, as usual, we can solve

the linear equation $\ 2x\equiv b\ $ by scaling it by $\, 2^{-1}\equiv k\,$ to get $\, x\equiv (\color{#c00}{2k})x \equiv kb.$

🌐
YouTube
youtube.com › watch
Number Theory | Congruence Modulo n -- Definition and Examples - YouTube
We define the notion of congruence modulo n among the integers.http://www.michael-penn.net
Published   September 6, 2019
🌐
Wolfram MathWorld
mathworld.wolfram.com › Congruence.html
Congruence -- from Wolfram MathWorld
June 6, 2024 - Using congruences, simple divisibility tests to check whether a given number is divisible by another number can sometimes be derived. For example, if the sum of a number's digits is divisible by 3 (9), then the original number is divisible by 3 (9).
🌐
Texas A&M University
people.tamu.edu › ~yvorobets › MATH433-2010B › Lect1-04web.pdf pdf
MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued).
The integers a and b are called ... gcd(c, n) = 1, then a ≡b mod n. (ii) If c > 0 and ac ≡bc mod nc, then a ≡b mod n. ... For example, [2]4 = [2]8 ∪[6]8....
🌐
Cornell Computer Science
cs.cornell.edu › courses › cs2800 › 2016sp › lectures › lec12-modular.html
Modular arithmetic (CS 2800, Spring 2016)
Example: If we are working mod 5, then [2]=[7]=[12]=[−3]=[−8]. All of these have a remainder of 2 when divided by 5.
🌐
Tjyusun
tjyusun.com › mat202 › sec-congruence
Congruences and their Properties
Show that two integers \(a\) and \(b\) are congruent modulo \(n\) if and only if they have the same remainder when divided by \(n\text{.}\) ... Use Theorem 1.3.2. One real-life example is that of computing what day of the week it is, which uses congruence modulo \(7\text{.}\)
🌐
Calcworkshop
calcworkshop.com › home › number theory › modular arithmetic
Modular Arithmetic (w/ 17 Step-by-Step Examples!)
February 1, 2021 - Another way to think of congruence modulo, is to say that integers a and b congruent modulo n if their difference is a multiple of n. For example, 7 and 4 are congruent modulo 3 because not only are they in the same equivalence class, but their ...
Top answer
1 of 4
17

Mathematically, congruence modulo $n$ is an equivalence relation. We define:

$$a\equiv b \pmod n \iff n\mid (a - b)$$

Equivalently: When working in $\pmod n$, any number $a$ is congruent $\mod n$ to an integer $b$ if there exists an integer $k$ for which $\;nk = (a - b)$.

Now, let's compare the "discrepancies" in the equivalences you note (which are, in fact, all true):


$$13 \equiv \color{blue}{\bf 1} \pmod 4 \iff 4\mid (13-1) \iff 4\mid 12\; \checkmark$$ $$13\equiv \color{blue}{\bf 5} \pmod 4 \iff 4\mid (13-5) \iff 4\mid 8 \;\checkmark$$

  • Note, indeed, that $\color{blue}{\bf 5 \equiv 1} \pmod 4$ since $4\mid(5 - 1) = 4$ $$ $$

$$9 \equiv \color{blue}{\bf 4} \pmod 5 \iff 5 \mid (9-4) \iff 5\mid 5 \;\checkmark$$ $$9 \equiv \color{blue}{\bf -1} \pmod 5 \iff 5 \mid (9 - (-1)) \iff 5\mid 10 \;\checkmark$$

  • And again, note that $\color{blue}{\bf4 \equiv -1} \pmod 5$ since $5\mid(4-(-1)) = 5$ $$ $$

It is often customary to express equivalence modulo $n$, by choosing $b$ in $\;a \equiv b \pmod n\;$ to be such that $0 \leq b \lt n$. But this choice is simply a representative of all the numbers which belong to the same equivalence class, denoted $[b]$, $\pmod n$:

E.g. If $n = 4$, then one of the following holds: $$a \equiv b \pmod 4 \iff \begin{cases} a, b \in [0] = \{4k + 0\mid k\in \mathbb Z\} = \{\cdots, -8, -4, 0, 4, 8, 12,\cdots\} \\ \\ a, b \in [1] = \{4k + 1\mid k \in \mathbb Z\} = \{\cdots, -7, -3, 1, 5, 9, 13,\cdots\} \\ \\ a ,b \in [2] = \{4k + 2\mid k \in \mathbb Z\} = \{\cdots, -6, -2, 2, 6, 10, 14,\cdots\} \\ \\ a, b \in [3] = \{4k + 3\mid k \in \mathbb Z\} = \{\cdots, -5, -1, 3, 7, 11, 15, \cdots\} \end{cases} $$

2 of 4
15

All the equations you wrote up there are correct. $13 \equiv 5 \equiv 1 \equiv 1 + 4k \pmod 4$ for any integer $k$. Computer scientists tend to say that the 'modulus operation' returns the smallest integer between $0$ and what you're modding out by. Mathematicians take a slightly higher viewpoint, saying two numbers are considered the same if their difference is divisible by what you're modding out by.

But I would expect a different notation. Mathematically, $13 \equiv 5 \equiv 1 \equiv 1 + 4k \pmod 4$. In computer science, I would expect to see $13 \bmod 4 = 1$, or even $13\%4=1$. (In particular, none of that equivalence relation / only up to equivalence stuff).

🌐
Mathematics LibreTexts
math.libretexts.org › campus bookshelves › mount royal university › higher arithmetic › 3: modular arithmetic
3.1: Modulo Operation - Mathematics LibreTexts
November 22, 2024 - Two integers \(a \) and \(b\) are said to be congruent modulo \( n\), \(a \equiv b (mod \, n)\), if all of the following are true: ... The relation " \(\equiv\) " over \(\mathbb{Z}\) is reflexive. Proof: Let \(a \in \mathbb{Z} \). Then \(a-a=0(n)\), and \( 0 \in \mathbb{Z}\). Hence \(a \equiv a (mod \, n)\). Thus congruence modulo n is Reflexive.