PYQ Vault

SPI Mathematics · Number System

HCF and LCM

The HCF is the largest number that divides all the given numbers, and the LCM is the smallest number that all of them divide.

Why this matters

Eleven questions in the bank, eight EASY and three MODERATE. Six are read straight off the prime factors, three ask for the largest number that divides two numbers (with or without a remainder), and two use the link between HCF, LCM and the product.

Concept 1 of 3: HCF and LCM from prime factors

Write each number as a product of primes. The HCF can only use what every number has, so it takes the smallest power of each shared prime. The LCM must hold every number, so it takes the largest power of every prime that appears.

Definition

  • HCF: multiply the primes common to all the numbers, each to its lowest power.
  • LCM: multiply every prime that appears in any number, each to its highest power.
  • Numbers with no common prime (co-prime numbers) have HCF 1 and LCM equal to their product.
  • If one power in the LCM is unknown, the number that carries that prime must supply the highest power.

HCF and LCM by powers

HCF=∏plowest powerLCM=∏phighest power\text{HCF} = \prod p^{\text{lowest power}} \qquad \text{LCM} = \prod p^{\text{highest power}}

Worked example

Find the HCF and the LCM of 72 and 120.
Practice this conceptself-check · 4 quick reps

The same idea in a practice question:

Practice questionModerate

Example 1 · Number System · HCF and LCM

If a = 22×3x2^2 \times 3^x, b = 22×3×52^2 \times 3 \times 5, c = 22×3×72^2 \times 3 \times 7 and LCM (a, b, c) = 3780, then x is equal to

Putting a prime in the HCF that one number lacks

The HCF uses only primes that divide every number. If 5 divides one number but not the other, 5 is not in the HCF.

Picking a common multiple that is not the least

72 is a common multiple of 12 and 18, but the LCM is 36. Options often include larger common multiples; the LCM is the smallest.

Concept 2 of 3: Euclid's division and the largest number that divides

Any common factor of two numbers also divides their remainder. So you can keep replacing the larger number by the remainder until the remainder is 0: the last divisor is the HCF. A 'largest number that divides' question is an HCF question.

Definition

  • Euclid's division: for whole numbers aa and bb, a=bq+ra = bq + r with 0≤r<b0 \le r < b.
  • HCF(a,b)=HCF(b,r)\text{HCF}(a, b) = \text{HCF}(b, r). Repeat until r=0r = 0; the divisor at that step is the HCF.
  • The largest number that divides xx and yy leaving remainders r1r_1 and r2r_2 is HCF(x−r1,y−r2)\text{HCF}(x - r_1, y - r_2).
  • 'Largest number that divides' means HCF. 'Smallest number divisible by' means LCM.

Euclid's division

a=bq+r,0≤r<bHCF(a,b)=HCF(b,r)a = bq + r, \quad 0 \le r < b \qquad \text{HCF}(a, b) = \text{HCF}(b, r)

Worked example

Use Euclid's division to find the HCF of 420 and 130.
Practice this conceptself-check · 4 quick reps

The same idea in a practice question:

Practice questionModerate

Example 2 · Number System · HCF and LCM

What is the largest number that divides 245 and 1029, leaving remainder 5 in each?

Taking the HCF before removing the remainder

When a remainder is left, subtract it from each number first. The answer divides the reduced numbers exactly, not the original ones.

An answer smaller than the remainder

A divisor must be larger than the remainder it leaves. If your answer is 4 and the remainder is 5, something went wrong.

Concept 3 of 3: HCF times LCM equals the product

For two numbers, the HCF holds the primes they share and the LCM holds everything else as well. Together they use each prime exactly as often as the two numbers do, so their product equals the product of the numbers.

Definition

  • For two numbers: HCF×LCM=a×b\text{HCF} \times \text{LCM} = a \times b. This does not hold for three numbers.
  • The HCF always divides the LCM.
  • If bb is a multiple of aa, then HCF(a,b)=a\text{HCF}(a, b) = a and LCM(a,b)=b\text{LCM}(a, b) = b.

Product of two numbers

HCF(a,b)×LCM(a,b)=a×b\text{HCF}(a, b) \times \text{LCM}(a, b) = a \times b

Worked example

The HCF of two numbers is 12 and their LCM is 180. One number is 36. Find the other.
Practice this conceptself-check · 3 quick reps

The same idea in a practice question:

Practice questionEasy

Example 3 · Number System · HCF and LCM

If LCM of ( p, q ) = 6 and HCF of ( p, q ) = 2 then p2q2p^2 q^2 =

Using the product rule for three numbers

For 2, 4 and 8 the HCF is 2 and the LCM is 8, so HCF times LCM is 16, but the product is 64. The rule is for two numbers only.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (3)

  • HCF and LCM from prime factors

    HCF and LCM by powers

    HCF=∏plowest powerLCM=∏phighest power\text{HCF} = \prod p^{\text{lowest power}} \qquad \text{LCM} = \prod p^{\text{highest power}}
  • Euclid's division and the largest number that divides

    Euclid's division

    a=bq+r,0≤r<bHCF(a,b)=HCF(b,r)a = bq + r, \quad 0 \le r < b \qquad \text{HCF}(a, b) = \text{HCF}(b, r)
  • HCF times LCM equals the product

    Product of two numbers

    HCF(a,b)×LCM(a,b)=a×b\text{HCF}(a, b) \times \text{LCM}(a, b) = a \times b

Watch out for (5)

Test yourself on a real paper

Sit a past SPI paper, timed and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.