📘 CodingMarble Learn

Divisibility: Multiples, Divisors, GCD and LCM

a is divisible by b when a = b × k for a whole number k: b is a divisor (factor) of a and a is a multiple of b. Every whole number a can be written as a = b × q + r with 0 ≤ r < b (division with remainder); b divides a exactly when r = 0. Quick tests tell divisibility by 2, 3, 4, 5, 6, 8, 9, 10 and 11 from the digits. The GCD is the greatest common divisor, found by prime factors or by Euclid's algorithm; LCM is the least common multiple, and GCD × LCM = a × b. Two numbers are coprime when their GCD is 1.

🎬 Step-by-step story

  1. 12 cubes in groups of 3: four full groups, nothing left. So 3 divides 12.
  2. 14 cubes in groups of 4: three full groups and 2 left over. 14 = 4 × 3 + 2. The 2 is the remainder.
  3. Groups of 2 sort even and odd. 7 leaves 1 over, so 7 is odd.
  4. Why the 9-test works: each 100 is 99 + 1 and each 10 is 9 + 1. Take out the nines and only the digits are left: 2 + 3 + 4 = 9.
  5. GCD of 18 and 12 by Euclid: cut the biggest square from the rectangle again and again. The last square, 6 × 6, is the GCD.
  6. Your turn: pick N and a group size. Guess the remainder, then check.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Is 'divisible' the same as 'can be divided'?

No. Any number can be divided; divisible means it divides with nothing left over (remainder 0), like 12 into groups of 3.

Why must the remainder be smaller than the divisor?

If 4 or more cubes were left over in groups of 4, you could make one more full group. So the leftover is always less than the group size.

Why does adding the digits tell me about 9?

Each 10, 100, 1000 is one more than a multiple of 9. Taking out all the nines leaves one cube per unit of each digit, so the leftover is the digit sum.

Why does Euclid's algorithm give the GCD?

Any number that divides both a and b also divides a − b × q = r. So the common divisors of (a, b) and (b, r) are the same. Cutting squares shows this until a square fits exactly.

Is 0 even?

Yes. 0 = 2 × 0, so it leaves no remainder in groups of 2.

What happens when the group size is 1?

Every number splits into groups of 1 with nothing left: 1 divides every number. Try it with d = 1.

Multiples, divisors and division with remainder

We work with natural numbers ℕ = {0, 1, 2, 3, …} and integers ℤ = {…, −2, −1, 0, 1, 2, …}.

b divides a (written b | a) if a = b × k for some integer k. Then b is a divisor (factor) of a, and a is a multiple of b. Example: 3 | 12 because 12 = 3 × 4.

Division with remainder: for any whole number a and b > 0 there is exactly one pair q, r with a = b × q + r and 0 ≤ r < b. q is the quotient and r the remainder. 14 = 4 × 3 + 2. b divides a exactly when r = 0.

Facts: 1 divides every number; every number divides 0; if b | a and b | c then b | (a + c) and b | (a − c).

Even and odd numbers, with simple proofs

An even number is a multiple of 2: n = 2k. An odd number leaves remainder 1: n = 2k + 1.

Proof that even + even is even: 2a + 2b = 2(a + b), a multiple of 2.

Proof that odd × odd is odd: (2a + 1)(2b + 1) = 4ab + 2a + 2b + 1 = 2(2ab + a + b) + 1, which is odd.

Proof that n(n + 1) is always even: of two numbers in a row, one is even, so the product has a factor 2.

To prove a statement, write the numbers with letters (2k, 2k + 1, 3k …) and rearrange; one example never proves a rule, but one counter-example disproves it.

Divisibility tests for 2, 3, 4, 5, 6, 8, 9, 10 and 11

ByTestExample
2last digit 0, 2, 4, 6, 8358 ✓
3sum of digits divisible by 3471: 4+7+1 = 12 ✓
4last two digits divisible by 41316: 16 ✓
5last digit 0 or 5945 ✓
6divisible by 2 and by 3714 ✓
8last three digits divisible by 85120: 120 ✓
9sum of digits divisible by 93825: 18 ✓
10last digit 0860 ✓
11alternating sum of digits (from the right: + − + …) divisible by 112728: 8 − 2 + 7 − 2 = 11 ✓

Why 3 and 9 work: 10 = 9 + 1, 100 = 99 + 1, 1000 = 999 + 1, and 9, 99, 999 are multiples of 9. So a number and its digit sum leave the same remainder when divided by 9 (or 3).

Why 11 works: 10 = 11 − 1, so powers of 10 leave remainders +1, −1, +1, … on division by 11.

Why 4 and 8 work: 100 is a multiple of 4 and 1000 is a multiple of 8, so only the last two (or three) digits matter.

Primes, GCD, LCM and coprime numbers

A prime has exactly two divisors, 1 and itself (2, 3, 5, 7, 11, 13 …). Every number above 1 is a product of primes in only one way: 360 = 2³ × 3² × 5.

GCD (greatest common divisor, also HCF) of a and b: the biggest number that divides both. Take the common primes with the smaller powers. 72 = 2³ × 3², 60 = 2² × 3 × 5 → GCD = 2² × 3 = 12.

LCM (least common multiple): the smallest number both divide. Take every prime with the bigger power: LCM = 2³ × 3² × 5 = 360.

Always GCD(a, b) × LCM(a, b) = a × b: 12 × 360 = 72 × 60 = 4320.

Coprime numbers have GCD 1, like 8 and 15 (they share no prime). A fraction is in lowest terms when its top and bottom are coprime: divide both by their GCD. 60/72 → ÷12 → 5/6.

Euclid's algorithm and integer equations

Key fact: GCD(a, b) = GCD(b, r), where r is the remainder of a ÷ b. So keep dividing until the remainder is 0; the last non-zero remainder is the GCD.

GCD(252, 198): 252 = 198 × 1 + 54; 198 = 54 × 3 + 36; 54 = 36 × 1 + 18; 36 = 18 × 2 + 0 → GCD = 18.

In the 3D, this is cutting the biggest squares from a rectangle again and again.

Integer (Diophantine) equations ax + by = c have whole-number solutions only if GCD(a, b) divides c. 6x + 9y = 20 has none (3 does not divide 20). 3x + 5y = 1 has x = 2, y = −1; all solutions are x = 2 + 5t, y = −1 − 3t.

Try it

Take 30 small things (beans, coins). Try to share them into equal groups of 2, 3, 4, 5, 6, 7. Which sizes leave nothing over? Those are divisors of 30. Write your phone's last four digits and test them for 3, 4, 9 and 11 using the rules, then check with a calculator.

Key formulas and definitions

Worked examples

1. Divide 59 by 7 with remainder.

7 × 8 = 56, 59 − 56 = 3. So 59 = 7 × 8 + 3; quotient 8, remainder 3.

2. Is 7 128 divisible by 8? By 9?

Last three digits 128 = 8 × 16, so yes for 8. Digit sum 7 + 1 + 2 + 8 = 18, divisible by 9, so yes for 9.

3. Is 91 916 divisible by 11?

From the right: 6 − 1 + 9 − 1 + 9 = 22, a multiple of 11. Yes.

4. Find the GCD and LCM of 84 and 120 using primes.

84 = 2² × 3 × 7, 120 = 2³ × 3 × 5. GCD = 2² × 3 = 12. LCM = 2³ × 3 × 5 × 7 = 840. Check: 12 × 840 = 10 080 = 84 × 120.

5. Find GCD(391, 299) with Euclid's algorithm.

391 = 299 × 1 + 92; 299 = 92 × 3 + 23; 92 = 23 × 4 + 0. GCD = 23.

6. Prove that the sum of three consecutive integers is divisible by 3.

Call them n, n + 1, n + 2. Sum = 3n + 3 = 3(n + 1), a multiple of 3.

7. Find the digit x so that 4x56 is divisible by 9.

4 + x + 5 + 6 = 15 + x must be a multiple of 9. 15 + x = 18 → x = 3. Number: 4356.

Common mistakes

Practice quiz

1. Which number is divisible by 9?
2. The remainder when 100 is divided by 7 is:
3. GCD(24, 36) is:
4. Which pair is coprime?
5. If GCD(a, b) = 4 and a × b = 480, LCM(a, b) is:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What are the divisibility rules from 2 to 11?

2: last digit even; 3: digit sum ÷ 3; 4: last two digits ÷ 4; 5: ends in 0/5; 6: rules of 2 and 3; 7: double the last digit and subtract from the rest, repeat; 8: last three digits ÷ 8; 9: digit sum ÷ 9; 10: ends in 0; 11: alternating digit sum ÷ 11.

What is the difference between GCD and LCM?

GCD is the biggest number that divides both; LCM is the smallest number that both divide. GCD × LCM = product of the two numbers.

Is GCD the same as HCF?

Yes. Greatest common divisor (GCD), greatest common factor (GCF) and highest common factor (HCF) are three names for the same number.

Where this is taught

ItalyScuola secondaria di primo grado – classe 3ªNumbers
CBSE (India)Class 8Number Play
FranceSecondeNumbers, calculations and algebra
FranceTerminaleArithmetic
Russia7 классNumbers and calculations
Russia7 классNumbers and calculations
Russia11 классNumbers and calculations
Russia11 классNumbers and calculations

Learn next

Related lessons

All Maths lessons