Skip to content

๐Ÿ“ 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
17532$17 = 5 \cdot 3 + 2$
-175-43$-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:

  • a as a point
  • bq as the nearest multiple of b โ‰ค a
  • r as the gap between bq and a