๐ Euclidean Division
๐ง Definition
Euclidean division is the process of dividing one integer by another to obtain a quotient and a remainder, satisfying:
$$ a = bq + r \quad \text{where} \quad 0 \le r < |b| $$a: dividend (integer)b: divisor (non-zero integer)q: quotient (integer)r: remainder (integer)
This is not fractional divisionโit’s about decomposing integers.
๐ข Example
Letโs divide $a = 17$ by $b = 5$:
$$ 17 = 5 \cdot 3 + 2 $$- Quotient $q = 3$
- Remainder $r = 2$
โ Check: $0 \le 2 < 5$
๐ Table of Examples
| Dividend $a$ | Divisor $b$ | Quotient $q$ | Remainder $r$ | Equation |
|---|---|---|---|---|
| 17 | 5 | 3 | 2 | $17 = 5 \cdot 3 + 2$ |
| -17 | 5 | -4 | 3 | $-17 = 5 \cdot (-4) + 3$ |
| 23 | -4 | -6 | -1 | $23 = (-4) \cdot (-6) + (-1)$ |
โน๏ธ The remainder always satisfies $0 \le r < |b|$, regardless of the signs of $a$ or $b$.
๐งฉ Properties
- Uniqueness: For any integers $a$ and $b \ne 0$, there exists a unique pair $(q, r)$ such that: $$ a = bq + r \quad \text{with} \quad 0 \le r < |b| $$
- Used in:
- Modular arithmetic: $a \mod b = r$
- Euclidean algorithm for GCD
- Integer division logic in programming
๐งฎ Algorithm (Pseudocode)
function euclidean_division(a, b):
q = floor(a / b)
r = a - b * q
return (q, r)๐ง floor(a / b) ensures the remainder is non-negative and less than |b|.
๐ง Visual Aid Suggestion
Consider adding a number line diagram showing:
aas a pointbqas the nearest multiple ofbโคaras the gap betweenbqanda