When we divide one number by another, the answer usually consists of two parts: the quotient and the remainder. The remainder is what is left over after dividing as many times as possible without going negative. This leftover part is called the residue in mathematics.
Understanding residues is crucial because they help simplify calculations, especially when dealing with large numbers. They form the foundation of modular arithmetic, a powerful tool used in number theory and many competitive exam problems. Residues allow us to work with numbers in cycles or patterns, making complex problems easier to solve.
The Division Algorithm is a fundamental concept that formalizes how division works with integers. It states that for any integer a and any positive integer b, there exist unique integers q (quotient) and r (remainder) such that:
\[ a = bq + r, \quad 0 \leq r < b \]
where:
This means when you divide a by b, you get a quotient q and a remainder r that is always less than b. The remainder is what we call the residue of a modulo b.
graph TD A[Start with integers a and b (b > 0)] --> B[Divide a by b] B --> C[Find quotient q = floor(a/b)] C --> D[Calculate remainder r = a - bq] D --> E{Is 0 ≤ r < b?} E -- Yes --> F[Residue r found] E -- No --> BModular arithmetic is a system of arithmetic for integers, where numbers "wrap around" upon reaching a certain value called the modulus. It is like the arithmetic of a clock, where after 12 hours, the count resets to 1.
We write:
\[ a \equiv b \pmod{m} \]
which means: a is congruent to b modulo m.
This is true if and only if m divides the difference \(a - b\), i.e.,
\[ m \mid (a - b) \]
In simpler terms, two numbers are congruent modulo m if they leave the same residue when divided by m.
| Integer | Residue modulo 5 | Congruence Class |
|---|---|---|
| 7 | 2 | \(7 \equiv 2 \pmod{5}\) |
| 12 | 2 | \(12 \equiv 2 \pmod{5}\) |
| -3 | 2 | \(-3 \equiv 2 \pmod{5}\) |
| 0 | 0 | \(0 \equiv 0 \pmod{5}\) |
| 15 | 0 | \(15 \equiv 0 \pmod{5}\) |
Notice how numbers like 7, 12, and -3 all belong to the same residue class modulo 5 because they leave the same remainder 2 when divided by 5.
Residues under modular arithmetic follow several important properties that mirror normal arithmetic but with the modulus applied:
These properties allow us to simplify complex expressions by reducing intermediate results modulo m, making calculations manageable and efficient.
Step 1: Use the division algorithm: \(12345 = 7q + r\), where \(0 \leq r < 7\).
Step 2: Divide 12345 by 7:
\(7 \times 1763 = 12341\)
Step 3: Calculate remainder:
\(r = 12345 - 12341 = 4\)
Answer: The residue (remainder) is 4. So, \(12345 \equiv 4 \pmod{7}\).
Step 1: We want to find \(x\) such that \(4x \equiv 3 \pmod{7}\).
Step 2: Find the modular inverse of 4 modulo 7. The modular inverse \(4^{-1}\) satisfies:
\(4 \times 4^{-1} \equiv 1 \pmod{7}\).
Step 3: Test integers 1 to 6:
So, \(4^{-1} \equiv 2 \pmod{7}\).
Step 4: Multiply both sides of original congruence by 2:
\(2 \times 4x \equiv 2 \times 3 \pmod{7}\)
\( (2 \times 4) x \equiv 6 \pmod{7}\)
\(8x \equiv 6 \pmod{7}\)
Since \(8 \equiv 1 \pmod{7}\), this simplifies to:
\(x \equiv 6 \pmod{7}\)
Answer: \(x \equiv 6 \pmod{7}\). The solution is all integers congruent to 6 modulo 7.
Step 1: Calculate powers of 3 modulo 5 to find a pattern:
Step 2: Notice the pattern repeats every 4 powers (since \(3^4 \equiv 1\)).
Step 3: Find remainder when 100 is divided by 4:
\(100 \div 4 = 25\) with remainder 0.
Step 4: Use the pattern:
\(3^{100} \equiv (3^4)^{25} \equiv 1^{25} \equiv 1 \pmod{5}\)
Answer: The residue of \(3^{100}\) modulo 5 is 1.
Step 1: Find \(2^{50} \pmod{7}\) and \(3^{50} \pmod{7}\).
Step 2: Calculate the pattern length (order) for 2 modulo 7:
So, \(2^3 \equiv 1 \pmod{7}\), cycle length is 3.
Step 3: Find \(50 \bmod 3\):
\(50 \div 3 = 16\) remainder 2.
Therefore, \(2^{50} \equiv 2^{2} = 4 \pmod{7}\).
Step 4: Calculate the pattern length for 3 modulo 7:
Cycle length is 6.
Step 5: Find \(50 \bmod 6\):
\(50 \div 6 = 8\) remainder 2.
Therefore, \(3^{50} \equiv 3^{2} = 2 \pmod{7}\).
Step 6: Sum residues modulo 7:
\(2^{50} + 3^{50} \equiv 4 + 2 = 6 \pmod{7}\).
Step 7: Since the sum modulo 7 is 6 (not 0), the number is not divisible by 7.
Answer: \(2^{50} + 3^{50}\) is not divisible by 7.
Step 1: Use the division algorithm: \(123456 = 99q + r\), find \(r\).
Step 2: Divide 123456 by 99:
Calculate approximate quotient:
\(99 \times 1247 = 99 \times 1200 + 99 \times 47 = 118800 + 4653 = 123453\)
Step 3: Calculate remainder:
\(r = 123456 - 123453 = 3\)
Answer: The remainder when INR 1,23,456 is divided by 99 is 3.
When to use: When dealing with large numbers or powers in modular arithmetic.
When to use: When solving equations of the form \(ax \equiv b \pmod{m}\).
When to use: When calculating large exponents modulo \(m\).
When to use: When asked to find the remainder of large numbers divided by smaller ones.
When to use: When simplifying sums, products, or powers under modulo.
Progress tracking is paywalled — subscribe to mark subtopics as understood and save your streak.
Go to practice →