Skip to content

HCF and LCMGo deeperabout 55 min

Why it works: proofs, Euclid and the edges

Unique prime recipes, the product rule, Euclid’s algorithm and Bézout

Proofs in plain language: unique prime factorisation, why HCF takes smallest powers and LCM largest, why HCF × LCM = a × b (and why not for three numbers), why Euclid’s method works and how fast it is, Bézout’s identity, edge cases, harder problems and history.

Start at chapter 1

In this part you’ll

  • Explain why the prime-factor rules for HCF and LCM follow from unique prime factorisation.
  • Prove HCF × LCM = a × b for two numbers and explain why it fails for three.
  • Prove that Euclid’s algorithm gives the HCF and always stops, and describe its worst case.
  • Write the HCF as a combination ax + by and use this to decide which amounts can be measured.
  • Solve harder problems: three remainders, pairs with given HCF and LCM, and edge cases with 0 and 1.

You can now find an HCF or LCM four different ways, and you have discovered patterns by testing. This layer asks the questions a mathematician asks next: Why do the methods work? Are the patterns true for every number, or just the ones we tried? What happens at the edges?

The arguments here are short, but they are real proofs, the same ones found in university number theory books, written in plain language. Read them slowly, with a pencil. After each one, try it on your own example: a proof you have checked with numbers is a proof you understand.

Words for reasoning and proof

proof
An argument that shows a statement is true in every case, not just the ones tested.
Example: The min + max argument proves HCF × LCM = a × b.
Fundamental Theorem of Arithmetic
Every whole number greater than 1 has exactly one prime factorisation, apart from order.
Example: 360 = 2³ × 3² × 5 and no other way.
algorithm
A step-by-step method that always finishes and gives the answer.
Example: Euclid’s algorithm for the HCF
Euclid’s algorithm
Replace (a, b) by (b, remainder of a ÷ b) until the remainder is 0; the last divisor is the HCF.
Example: (252, 198) → (198, 54) → (54, 36) → (36, 18) → 18
Bézout’s identity
The HCF of a and b can be written as ax + by for some whole numbers x and y.
Example: 18 = 4 × 252 − 5 × 198
kuttaka
Aryabhata’s "pulveriser" method (499 CE) for solving equations like ax − by = c by repeated division.
Example: Used for astronomical cycle problems
min / max
The smaller / larger of two numbers.
Example: min(3, 5) = 3, max(3, 5) = 5
∎ (end of proof)
A symbol marking that a proof is complete.
Example: Every common multiple is a multiple of the LCM. ∎

Chapter 01

The foundation: every number has one prime recipe

The prime-factor method rests on one big fact:

Fundamental Theorem of Arithmetic. Every whole number greater than 1 can be written as a product of primes in exactly one way, apart from the order of the factors.

The first half (it can be done) is easy: keep splitting until you only have primes. The second half (only one way) is the surprising part. Why could 360 not be 2³ × 3² × 5 one way and something completely different another way?

The key step is a property of primes proved by Euclid: if a prime divides a product, it must divide one of the factors. For example, 7 | 21 × 10 = 210, and indeed 7 | 21. (A composite number does not have this property: 6 | 4 × 9 = 36, but 6 divides neither 4 nor 9.) With that property, if two prime recipes gave the same number, each prime in the first recipe would have to divide, and so equal, some prime in the second, and you could cancel them one pair at a time until nothing is left. The two recipes must be the same.

Uniqueness has a powerful consequence. Write 360 = 2³ × 3² × 5. A number divides 360 exactly when its recipe uses only 2, 3 and 5, with at most three 2s, at most two 3s and at most one 5. Nothing else can divide it, because any other prime, or an extra copy of one of these, would have to appear in 360's one and only recipe.

So each divisor is a choice: 0, 1, 2 or 3 twos (4 choices), 0, 1 or 2 threes (3 choices), 0 or 1 five (2 choices). That gives 4 × 3 × 2 = 24 divisors, which you can check by listing them.

n = p^a × q^b × r^c
Prime recipe of n, with different primes p, q, r (written ^ for "to the power").
d | n ⇔ d = p^x × q^y × r^z, x ≤ a…
A divisor uses the same primes, each at most as many times as n does.
number of divisors = (a+1)(b+1)(c+1)
Each index can be chosen from 0 up to its maximum. 360: (3+1)(2+1)(1+1) = 24.

Chapter 02

Why smallest powers for HCF, highest for LCM

Take a = 360 = 2³ × 3² × 5 and b = 588 = 2² × 3 × 7².

The HCF. A common divisor d must divide 360, so it has at most three 2s; and divide 588, so at most two 2s. It must satisfy both, so at most min(3, 2) = 2 twos. Similarly at most min(2, 1) = 1 three. It cannot contain 5 (588 has none) or 7 (360 has none). The biggest number obeying all these limits takes the maximum allowed of each: 2² × 3 = 12. That is the HCF, and it is the product of the common primes with the smallest powers.

The LCM. A common multiple m must contain 360's recipe, so at least three 2s, two 3s and one 5; and contain 588's recipe, so at least two 2s, one 3 and two 7s. It needs at least max(3, 2) = 3 twos, max(2, 1) = 2 threes, one 5 and two 7s. The smallest such number has exactly those: 2³ × 3² × 5 × 7² = 17,640.

TablePrime by prime for 360 and 588: min goes to the HCF, max goes to the LCM
PrimePower in 360Power in 588min → HCFmax → LCMmin + max
232235
321123
510011
702022

Lab

Factorise larger numbers into index form and use the powers to predict HCFs, LCMs and numbers of divisors.

Round 1 / 8★ 0 ptsBest: 0
360

Key: double green ring = prime leaf · dashed = still to do · thick amber ring = the branch you’re working on.

Choose two numbers that multiply to make 360.

Split 360 into a factor pair:

Wrong tries on this tree: 0

Text version of this activity

This lab builds factor trees for larger numbers and writes them in index form.

  • 360 = 2³ × 3² × 5 (24 divisors)
  • 588 = 2² × 3 × 7² (18 divisors)
  • 1,260 = 2² × 3² × 5 × 7 (36 divisors)
  • 2,520 = 2³ × 3² × 5 × 7 (48 divisors; the smallest number divisible by every number from 1 to 10)
  • 5,040 = 2⁴ × 3² × 5 × 7 (60 divisors)
  • 9,240 = 2³ × 3 × 5 × 7 × 11 (64 divisors)
  • 1,147 = 31 × 37 and 1,591 = 37 × 43: products of two primes, hard to spot by divisibility tests. Their HCF is 37.

From the powers: HCF(360, 588) = 2² × 3 = 12, and LCM(2,520, 9,240) = 2³ × 3² × 5 × 7 × 11 = 27,720.

Need a different angle?

Chapter 03

Proof: HCF × LCM = a × b

Look at the last column of the table above: for every prime, min + max = the sum of the two powers. That is not a coincidence. For any two numbers x and y, one of them is the smaller and the other the larger, so min(x, y) + max(x, y) = x + y. (If x = 3 and y = 2: 2 + 3 = 3 + 2.)

Now multiply powers of the same prime by adding indices: 2² × 2³ = 2⁵.

  • In HCF × LCM, the power of each prime p is min + max.
  • In a × b, the power of each prime p is (power in a) + (power in b).

These are equal for every prime, so by the uniqueness of prime recipes, HCF(a, b) × LCM(a, b) = a × b. For 360 and 588: 12 × 17,640 = 2,11,680 = 360 × 588. ✓

That is a complete proof, for every pair of positive whole numbers, not just the ones we tested.

For strong learners, here is a formula that does work for three numbers. It corrects for the primes shared by exactly two of them:

LCM(a, b, c) = a × b × c × HCF(a, b, c) ÷ [HCF(a, b) × HCF(b, c) × HCF(c, a)]

Try it on 6, 10, 15: the product is 900, HCF(6, 10, 15) = 1, and the pairwise HCFs are 2, 5 and 3. So LCM = 900 × 1 ÷ 30 = 30. ✓ On 12, 18, 30: 6,480 × 6 ÷ (6 × 6 × 6) = 180. ✓ It can be proved prime by prime, like the two-number rule, using this fact about any three powers x, y, z: max(x, y, z) = x + y + z − min(x, y) − min(y, z) − min(z, x) + min(x, y, z). Try it with 1, 2, 3: 6 − 1 − 2 − 1 + 1 = 3. ✓

Lab

Use a three-circle prime Venn diagram to check the three-number LCM formula and see which primes are double-counted.

Round 1 / 8★ 0 ptsBest: 0

Numbers: 6, 10 and 15

Predict first! What is the HCF (highest common factor) and the LCM (lowest common multiple) of 6, 10 and 15?

Tip: the HCF can't be bigger than the smallest number, and the LCM can't be smaller than the biggest.

Text version of this activity

This lab places the prime factors of three numbers in three overlapping circles. The centre is the HCF of all three; each two-circle overlap is the extra part shared by just that pair.

  • 6, 10, 15: product 900; HCF(a, b, c) = 1; pairwise HCFs 2, 5, 3; formula gives 900 × 1 ÷ 30 = 30 = LCM.
  • 12, 18, 30: product 6,480; HCF(a, b, c) = 6; pairwise HCFs 6, 6, 6; formula gives 6,480 × 6 ÷ 216 = 180 = LCM.
  • 4, 6, 10: product 240; HCF(a, b, c) = 2; pairwise HCFs 2, 2, 2; formula gives 240 × 2 ÷ 8 = 60 = LCM.
  • 18, 30, 42: product 22,680; HCF(a, b, c) = 6; pairwise HCFs 6, 6, 6; formula gives 22,680 × 6 ÷ 216 = 630 = LCM.

The pairwise HCFs remove the primes counted twice in the product; multiplying back by the HCF of all three restores the primes that were removed once too often.

Try it

Chapter 04

Every common multiple is a multiple of the LCM

In Discover you noticed that the common multiples of 4 and 6 are 12, 24, 36, … : all multiples of the LCM. Here is a proof that avoids prime factors entirely and uses only division with remainder.

Let L = LCM(a, b) and let M be any common multiple of a and b. Divide M by L:

M = q × L + r, where the remainder r is 0, 1, 2, …, up to L − 1.

  • a divides M and a divides L (so a divides q × L). Therefore a divides M − q × L = r.
  • In the same way, b divides r.
  • So r is a common multiple of a and b (or 0). But r is smaller than L, and L is the lowest positive common multiple. So r cannot be a positive common multiple: r must be 0.

Therefore M = q × L: every common multiple is a multiple of the LCM. ∎

Chapter 05

Why Euclid’s long division method works

Euclid’s method replaces the pair (a, b) by the pair (b, r), where a = q × b + r. Here is why the HCF does not change.

Claim. The pairs (a, b) and (b, r) have exactly the same common divisors.

  • If d divides a and b, then d divides a − q × b = r. So d is a common divisor of b and r.
  • If d divides b and r, then d divides q × b + r = a. So d is a common divisor of a and b.

Same common divisors means same greatest common divisor: HCF(a, b) = HCF(b, r).

Why it stops. Each remainder is smaller than the divisor before it, so the numbers keep getting smaller. Whole numbers cannot decrease for ever, so eventually a remainder is 0. At that point we have a pair (g, 0), and HCF(g, 0) = g, because every number divides 0. So the last non-zero remainder is the HCF. ∎

Worked example

0 / 8 steps shown

HCF(1,591, 1,147) without factorising

Find HCF(1,591, 1,147) by Euclid’s method, and use the result to factorise both numbers.

Need a different angle?

Lab

Run Euclid’s algorithm on pairs chosen to be fast and slow, count the steps, and find which pairs make it work hardest.

Round 1 / 12★ 0 ptsBest: 0

Numbers: 89 and 55

Predict first! What is the HCF (highest common factor) and the LCM (lowest common multiple) of 89 and 55?

Tip: the HCF can't be bigger than the smallest number, and the LCM can't be smaller than the biggest.

Text version of this activity

This lab runs long division for the HCF step by step and counts the divisions.

  • (89, 55): 9 divisions, HCF = 1. Quotients: 1, 1, 1, 1, 1, 1, 1, 1, 2.
  • (377, 233): 12 divisions, HCF = 1. Quotients: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.
  • (987, 610): 14 divisions, HCF = 1. Quotients: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.
  • (1000, 625): 4 divisions, HCF = 125. Quotients: 1, 1, 1, 2.
  • (1000, 999): 2 divisions, HCF = 1.
  • (598, 403): 3 divisions, HCF = 13.

The slowest pairs are neighbouring Fibonacci numbers (55, 89, 233, 377, 610, 987 are all Fibonacci numbers): every quotient is 1, so each step shrinks the numbers as little as possible. (1,000, 999) looks big but finishes in 2 steps.

Need a different angle?

Chapter 06

How fast is Euclid? The Fibonacci worst case

Try Euclid on two neighbouring Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, …, each the sum of the two before). Every quotient is 1 and every remainder is the previous Fibonacci number:

89 = 55 × 1 + 34; 55 = 34 × 1 + 21; 34 = 21 × 1 + 13; … all the way down to 2 = 1 × 2 + 0.

That is 9 divisions for numbers under 100, the most for any pair that small. In 1844 the French mathematician Gabriel Lamé proved that this is the worst case: the number of division steps is never more than 5 times the number of digits in the smaller number. So even for numbers with 100 digits, Euclid needs at most 500 steps, which a computer does in a blink. Factorising two 100-digit numbers, by contrast, can be impossibly slow. That is why computers find HCFs by Euclid, not by prime factors.

TableDivision steps for some pairs (counted by computer)
PairKind of pairStepsHCFLamé limit: 5 × digits of smaller
89, 55Fibonacci neighbours9110
987, 610Fibonacci neighbours14115
10,946, 6,765Fibonacci neighbours19120
1,000, 999consecutive2115
1,591, 1,147products of primes63720
10,000, 625one divides the other162515
1,23,456, 7,890random-looking7620
Numbers up to… and the worst-case number of Euclid steps

Checked by computer over every pair below each limit: the slowest pair is always a pair of neighbouring Fibonacci numbers.

  • Below 104 steps (8, 5)
  • Below 1009 steps (89, 55)
  • Below 1,00014 steps (987, 610)

Chapter 07

The HCF as a combination: Bézout’s identity

Run Euclid’s steps backwards and something remarkable appears. For 252 and 198 the steps were:

252 = 198 × 1 + 54; 198 = 54 × 3 + 36; 54 = 36 × 1 + 18.

Now rewrite, starting from the last useful line and substituting upwards:

  • 18 = 54 − 36
  • 36 = 198 − 3 × 54, so 18 = 54 − (198 − 3 × 54) = 4 × 54 − 198
  • 54 = 252 − 198, so 18 = 4 × (252 − 198) − 198 = 4 × 252 − 5 × 198

Check: 4 × 252 = 1,008 and 5 × 198 = 990, and 1,008 − 990 = 18. ✓

This always works: the HCF of a and b can be written as a × x + b × y for some whole numbers x and y (one of them negative). It is called Bézout’s identity, after Étienne Bézout (1730–1783) — although for whole numbers it was stated much earlier, by Claude Gaspard Bachet de Méziriac in 1624, and Bézout’s own proof was for polynomials. Earlier still, the Indian mathematician Aryabhata used the same back-substitution around 499 CE in his kuttaka ("pulveriser") method for solving equations like a × x − b × y = c.

Try it

Which of these amounts can be written as 6x + 15y for some whole numbers x and y (positive, negative or zero)?

Chapter 08

Reasoning with letters: HCF for every n

The "divides the difference" principle lets you prove facts about infinitely many pairs at once. Use letters for the numbers, and subtract cleverly, exactly as Euclid would.

Example. Show that n and 2n + 1 are co-prime for every whole number n.

Any common divisor d of n and 2n + 1 also divides 2 × n, and so divides (2n + 1) − 2n = 1. The only divisor of 1 is 1. So HCF(n, 2n + 1) = 1, whatever n is. (Try n = 7: HCF(7, 15) = 1. n = 100: HCF(100, 201) = 1.)

Predict first

What is HCF(3n + 1, 2n + 1) for every whole number n?

Worked example

0 / 5 steps shown

HCF(n² + 1, n + 1) can only be 1 or 2

Show that HCF(n² + 1, n + 1) is always 1 or 2, and find when it is 2.

Try it

Chapter 09

Edge cases: 0, 1, equal numbers and negatives

TableWhat happens at the edges
CaseHCFLCMWhy
a and 11a1 divides everything, and nothing bigger than 1 divides 1.
a and aaaA number is its own biggest factor and its own smallest positive multiple.
a and a multiple of a, say kaakaa divides both, and ka is already a multiple of both.
two different primes p, q1p × qThey share no prime factor.
a and 0anot defined (or 0)Every number divides 0, so the common divisors of a and 0 are the divisors of a. The only common multiple of a and 0 is 0, which the positive LCM excludes.
0 and 0not defined (or 0)not defined (or 0)Every number divides 0, so there is no greatest one. Computer languages usually return 0 by convention.
negative numbers, e.g. −12 and 18636Signs do not affect divisibility, so HCF and LCM are taken as positive.

Try it

Chapter 10

Harder calculations

Worked example

0 / 5 steps shown

Three remainders, one divisor

Find the largest number that divides 1,251, 9,377 and 15,628 leaving remainders 1, 2 and 3 respectively.

Worked example

0 / 4 steps shown

The largest 4-digit number with a given remainder

Find the largest 4-digit number that leaves remainder 5 when divided by 12, 18 and 30.

Worked example

0 / 5 steps shown

How many pairs have a given HCF and LCM?

Find all pairs of whole numbers (a, b) with a ≤ b, HCF = 12 and LCM = 360.

Try it

Chapter 11

More proofs and olympiad ideas

Worked example

0 / 5 steps shown

Proof: consecutive even numbers have HCF 2

Prove that HCF(2k, 2k + 2) = 2 for every whole number k ≥ 1.

Worked example

0 / 4 steps shown

Olympiad classic: HCF(2⁶ − 1, 2⁸ − 1)

Find HCF(63, 255), and notice that 63 = 2⁶ − 1 and 255 = 2⁸ − 1.

Try it

Try it

Try it

In the proof that HCF(n, n + 1) = 1, which step is the key one?

Worked example

0 / 5 steps shown

Why "same remainder" problems use differences

Explain why the largest number that leaves the same remainder when dividing 62, 132 and 237 is HCF(132 − 62, 237 − 132), and find it.

Worked example

0 / 4 steps shown

Proof: LCM = a × b ÷ HCF without prime factors

Show that a × b ÷ HCF(a, b) is a common multiple of a and b, and check it with 18 and 24.

Try it

Chapter 12

A short history of the HCF

From Alexandria to your phone

  1. c. 300 BCE
    Euclid’s Elements Book VII, Propositions 1–2 give the "anthyphairesis" (mutual subtraction) method for the greatest common measure of two numbers: the oldest non-trivial algorithm still in daily use.
  2. c. 100 CE
    The Nine Chapters The Chinese classic uses "mutual subtraction" to simplify fractions, finding the HCF of numerator and denominator. Its date is uncertain: historians place the text anywhere from about 200 BCE to the 1st century CE.
  3. 499 CE
    Aryabhata’s kuttaka In the Aryabhatiya, Aryabhata solves equations like a × x − b × y = c using repeated division, the same steps as Euclid run backwards.
  4. 628 CE
    Brahmagupta The Brahmasphutasiddhanta extends the kuttaka to problems in astronomy, where planetary cycles must line up.
  5. 1624
    Bachet Claude Gaspard Bachet de Méziriac states the identity for whole numbers in the second edition of his Problèmes plaisants et délectables; Étienne Bézout (1730–1783), whose name it now carries, later proved the version for polynomials.
  6. 1801
    Gauss Article 16 of Carl Friedrich Gauss’s Disquisitiones Arithmeticae appears to be the first proof that a number’s prime factorisation is unique.
  7. 1844
    Lamé Gabriel Lamé proves the Fibonacci worst case: Euclid needs at most 5 steps per digit, one of the first results in the study of how fast algorithms run.
  8. 1970s–today
    Computers Euclid and its extended version run inside computer algebra, fraction arithmetic and the RSA encryption that protects online payments.

Chapter 13

Check your reasoning

Lab

Match each HCF/LCM fact with the key idea in its proof.

Connect each fact to the reason it is true.

8 pairs are hiding in two mixed-up columns. Pick one from each side to join them.

Text version of this activity

This game pairs eight facts with the reasons behind them:

  • HCF × LCM = a × b ← for each prime, min + max of two powers equals their sum.
  • HCF(a, b) = HCF(b, r) ← a number divides a and b exactly when it divides b and r, since r = a − q × b.
  • Euclid’s method always stops ← the remainders keep getting smaller, and whole numbers cannot shrink for ever.
  • Every common multiple is a multiple of the LCM ← its remainder on dividing by the LCM would be a smaller common multiple, so it must be 0.
  • Every common divisor divides the HCF ← its prime powers are at most the minimum powers.
  • The HCF of consecutive numbers is 1 ← a common divisor divides their difference, 1.
  • The product rule fails for 2, 4, 8 ← for three powers, min + max is not the sum.
  • The prime-factor method is valid ← every number has exactly one prime recipe.

Lab

Judge whether short arguments about HCF and LCM are valid proofs or contain a flaw.

Is each piece of reasoning valid, or is there a flaw?

10 cards, 2 bins. Tap a card, then tap its bin. You can also drag, or press a bin’s number key.

Text version of this activity

This game has ten short arguments to sort into "Valid reasoning" and "Flawed reasoning".

Valid: if d divides a and b it divides a − 3b; one counterexample (2, 4, 8) shows the product rule fails for three numbers; shrinking remainders force Euclid to stop; a common divisor of n and n + 1 divides 1; HCF(15, 0) = 15 because every number divides 0.

Flawed: 20 examples do not prove a rule; "6 divides 4 × 9 so 6 divides 4 or 9" wrongly uses a property that only primes have; (8, 24) has HCF 8, not 4, because the split 2 × 6 is not co-prime; LCM(a, b, c) = LCM(LCM(a, b), c) does not imply the three-number product rule; 441 has only one prime recipe, 3² × 7², among ordinary whole numbers.

Quick check

Reasoning check

10 questions · answer what you can, then check. Getting one wrong is useful.

  1. Q1a = 2⁵ × 3 × 11 and b = 2² × 3⁴. What is the power of 2 in HCF(a, b) × LCM(a, b)?
  2. Q2Euclid’s method replaces (a, b) by (b, r). Which fact makes this safe?
  3. Q3Which pair makes Euclid’s algorithm take the most steps?
  4. Q4How many divisors does 2⁴ × 3² × 7 have?
  5. Q5How many common factors do 360 and 588 have?
  6. Q6Using a 6-litre and a 10-litre jug (fill, empty, pour), which amount can you never measure?
  7. Q7HCF(45, 0) = ?
  8. Q8For 4, 6, 10: product 240, HCF(4, 6, 10) = 2, pairwise HCFs 2, 2, 2. What does the three-number formula give for the LCM?
  9. Q9How many pairs a ≤ b have HCF 5 and LCM 150?
  10. Q10Aryabhata’s kuttaka method (499 CE) is closely related to…

Keep this

Cheat sheet

  • Fundamental Theorem of Arithmetic: every number > 1 has exactly one prime recipe. It rests on: if a prime divides a product, it divides a factor.
  • Divisors: d | n exactly when d’s prime powers are at most n’s. Number of divisors = product of (index + 1).
  • HCF = min powers of each prime; LCM = max powers. Every common divisor divides the HCF; every common multiple is a multiple of the LCM.
  • Proof of HCF × LCM = a × b: for each prime, min + max = sum of the two powers.
  • Three numbers: min + max ≠ sum of three powers, so the rule fails unless pairwise co-prime. Correct: LCM(a, b, c) = abc × HCF(a, b, c) ÷ [HCF(a, b) HCF(b, c) HCF(c, a)].
  • Euclid: HCF(a, b) = HCF(b, r) because the two pairs have the same common divisors. It stops because remainders shrink.
  • Speed: Fibonacci neighbours are the worst case; at most 5 steps per digit of the smaller number (Lamé, 1844).
  • Bézout: HCF(a, b) = ax + by for some whole x, y. Every combination ax + by is a multiple of the HCF.
  • Edges: HCF(a, 0) = a; LCM with 0 is not defined; HCF(a, 1) = 1; signs are ignored.
  • Pairs with HCF h and LCM l: a = hm, b = hn with m × n = l ÷ h and m, n co-prime.

Reflect

This stays on this page only. It isn’t saved or sent anywhere.

Helps you understand

Prime and composite numbers

Unique prime factorisation, the foundation of this layer, is the deepest fact about primes.

Used in

Four operations

Division with remainder, a = q × b + r, drives every proof in Euclid’s method.

Where this comes from

Sources

  • Mathematics Textbook for Class X, Chapter 1: Real Numbers (opens another website) — NCERTawaiting owner check

    Supports the Fundamental Theorem of Arithmetic, Euclid's division algorithm, HCF as the product of smallest powers of common primes, LCM as the product of greatest powers, and HCF × LCM = product for two numbers but not for three.

  • Greatest common divisor (opens another website) — Wikipediaawaiting owner check

    Reference for properties of the GCD: every common divisor divides the GCD, gcd(a, 0) = |a|, co-prime numbers, the gcd × lcm identity for two numbers and Bézout’s identity.

  • Least common multiple (opens another website) — Wikipediaawaiting owner check

    Reference for properties of the LCM: common multiples of two numbers are the multiples of their LCM, the prime-power (Venn) method, the recursive identity for three or more numbers, and the gear and planetary-alignment examples.

  • Euclidean algorithm (opens another website) — Wikipediaawaiting owner check

    Supports the history (Euclid’s Elements, c. 300 BC, Book VII; Aryabhata’s late-5th-century 'pulveriser'; Qin Jiushao 1247), why the division method works, the original subtraction form, and the Fibonacci worst case (Lamé, 1844).

  • Bézout's identity (opens another website) — Wikipediaawaiting owner check

    Supports the statement of Bézout’s identity and its history: stated for integers by Claude Gaspard Bachet de Méziriac in the 1624 second edition of Problèmes plaisants et délectables, with Étienne Bézout (1730-1783) later proving the version for polynomials.

  • Fundamental theorem of arithmetic (opens another website) — Wikipediaawaiting owner check

    Supports the statement of unique prime factorisation and the historical note that Article 16 of Gauss’s Disquisitiones Arithmeticae (1801) appears to be the first proof of the uniqueness part.

  • Nine Chapters on the Mathematical Art (opens another website) — MacTutor History of Mathematics Archive, University of St Andrewsawaiting owner check

    Supports the Nine Chapters containing a Euclidean-algorithm (mutual subtraction) method for the greatest common divisor when reducing fractions, and the uncertainty of its date: estimates range from about 200 BC to the 1st century CE.

End of Go deeper

What you just read

  • Explain why the prime-factor rules for HCF and LCM follow from unique prime factorisation.
  • Prove HCF × LCM = a × b for two numbers and explain why it fails for three.
  • Prove that Euclid’s algorithm gives the HCF and always stops, and describe its worst case.
  • Write the HCF as a combination ax + by and use this to decide which amounts can be measured.
  • Solve harder problems: three remainders, pairs with given HCF and LCM, and edge cases with 0 and 1.

The web

Explore a connection

  • Used in

    Number and shape patterns

    Two repeating cycles line up again after their LCM — the pattern behind blinking lights and bus timetables.

  • Used in

    Shape and space

    The largest square tile that fits a rectangular floor exactly has a side equal to the HCF of its length and width.

Want to save topics or ask for new ones? Invited families can connect a learning device. Everything here stays free to read without signing in.

Revision 1 · release preview-7e1cbbcc4f · accepted 20/09/2026