PYQ Vault

CDS Mathematics · Number System

HCF & LCM — Laws and Fractions

The algebra of highest common factors and lowest common multiples: the product law, the H-times-coprime form that solves almost every two-number puzzle, the subtraction property, the recipes for fractions and decimals, and the consistency checks that expose impossible data.

Why this matters

Twenty-nine PYQs, the largest unit in the chapter and six of them HARD. CDS asks these as data puzzles — you are given a product, a ratio or a sum and asked to recover the numbers — and nearly all of them fall to one move: write the pair as Ha and Hb with a and b coprime. Two of the twenty-nine carry data that cannot exist, which is itself an examinable skill.

Concept 1 of 7

HCF and LCM from the prime factorisations

Intuition

Line up the prime factorisations. The HCF takes the lowest power of each shared prime; the LCM takes the highest power of every prime that appears. Everything else in this unit follows from that picture.

Definition

For aa and bb written as prime powers:

  • HCF\mathrm{HCF} takes min\min of each exponent (only primes in both);
  • LCM\mathrm{LCM} takes max\max of each exponent (primes in either).

Consequences used constantly:

  • HCFa\mathrm{HCF} \mid a, HCFb\mathrm{HCF}\mid b, and HCFLCM\mathrm{HCF} \mid \mathrm{LCM};
  • aLCMa \mid \mathrm{LCM} and bLCMb \mid \mathrm{LCM};
  • the Euclidean algorithm computes the HCF by repeatedly replacing (a,b)(a,b) with (b, amodb)(b,\ a \bmod b) until the remainder is 0.

HCF and LCM by exponents

HCF=pimin(ai,bi),LCM=pimax(ai,bi)\mathrm{HCF}=\prod p_i^{\min(a_i,b_i)}, \qquad \mathrm{LCM}=\prod p_i^{\max(a_i,b_i)}

Worked example

Find the HCF and LCM of 12 and 18 from their factorisations.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 1Number SystemEASY
HCF of two numbers is 12. Which one of the following can never be their LCM ?

[Q13 · CDS (I) 2019 — Elementary Mathematics · 2019]

An LCM that is not a multiple of the HCF is impossible

Given HCF 12, an LCM of 80 can never occur, because 128012 \nmid 80. This is the fastest elimination in the whole unit and CDS uses it directly. Check divisibility before doing any arithmetic.

Concept 2 of 7

The product law for two numbers

Intuition

Because HCF takes the minimum exponent and LCM the maximum, together they use each prime exactly as many times as aa and bb do between them. So multiplying HCF by LCM reproduces the product of the numbers — for two numbers only.

Definition

For any two positive integers,

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

  • This gives the fourth quantity whenever three are known.
  • It fails for three or more numbers: HCF×LCMabc\mathrm{HCF}\times\mathrm{LCM} \ne abc in general.
  • Paired with LCM=kHCF\mathrm{LCM} = k\cdot\mathrm{HCF} and a sum or difference of the two, it reduces most CDS puzzles to one linear equation.

Product law (two numbers)

HCF(a,b)LCM(a,b)=ab\mathrm{HCF}(a,b)\cdot\mathrm{LCM}(a,b)=ab

Worked example

Two numbers have HCF 6 and LCM 84. One of them is 12. Find the other.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 2Number SystemMODERATE
The HCF and LCM of two numbers p and q are 44 and 4620 respectively. When p is divided by 55, the quotient is 4 and remainder is 0. What is the value of q ?

[Q23 · CDS (I) 2026 — Elementary Mathematics · 2026]

The product law is a TWO-number law

For three numbers, HCF times LCM is not the product. The 2026 data-sufficiency question on three numbers with HCF 5 and LCM 30 has to be solved by listing the candidate triples, not by dividing — each number must be a multiple of 5 and a divisor of 30, which leaves only four triples to test.

Concept 3 of 7

Writing the pair as H times coprime parts

Intuition

If the HCF is HH, then both numbers are multiples of HH, and what is left over shares nothing. So write them as HaHa and HbHb with aa and bb coprime. This single substitution is the workhorse of the unit — it converts every constraint into a small equation in aa and bb.

Definition

Put x=Hax = Ha and y=Hby = Hb with gcd(a,b)=1\gcd(a,b)=1. Then:

  • xy=H2abxy = H^{2}ab;
  • LCM(x,y)=Hab\mathrm{LCM}(x,y) = Hab, so LCMHCF=ab\dfrac{\mathrm{LCM}}{\mathrm{HCF}} = ab;
  • x+y=H(a+b)x+y = H(a+b) and xy=H(ab)x-y = H(a-b).

Having reduced to ab=mab = m, list the coprime factor pairs of mm only, then apply any size condition the question adds.

The Ha, Hb substitution

x=Ha,  y=Hb,  gcd(a,b)=1    LCMHCF=abx=Ha,\; y=Hb,\; \gcd(a,b)=1 \;\Longrightarrow\; \frac{\mathrm{LCM}}{\mathrm{HCF}}=ab

Worked example

The product of two numbers is 432 and their HCF is 12. Find them.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 3Number SystemMODERATE
The product of two integers p and q, where p > 60 and q > 60, is 7168 and their HCF is 16. The sum of these two integers is

[Q13 · CDS (II) 2018 — Elementary Mathematics · 2018]

List only the COPRIME factor pairs, and expect more than one to survive

With ab=28ab=28 the pairs are (1,28)(1,28) and (4,7)(4,7)(2,14)(2,14) is excluded because 2 and 14 share a factor, which would make the HCF larger than stated. And when two coprime pairs both satisfy every stated condition, the question genuinely has two answers; the 2022 question with HCF 9 and LCM 126 is exactly that case.

Concept 4 of 7

The subtraction property and its consequences

Intuition

Any common divisor of two numbers also divides their sum and their difference. That is the engine inside the Euclidean algorithm, and on its own it collapses expressions like gcd(n,n+10)\gcd(n,\,n+10) to something tiny.

Definition

If dxd \mid x and dyd \mid y then d(x±y)d \mid (x\pm y). Hence:

  • HCF(p,p+q)=HCF(p,q)\mathrm{HCF}(p,\,p+q) = \mathrm{HCF}(p,\,q) and HCF(p,pq)=HCF(p,q)\mathrm{HCF}(p,\,p-q) = \mathrm{HCF}(p,\,q);
  • HCF(n,n+k)=HCF(n,k)\mathrm{HCF}(n,\,n+k) = \mathrm{HCF}(n,\,k), so it always divides kk;
  • you may subtract any multiple of one argument from the other, which is how gcd(12n+2,8n+1)\gcd(12n+2,\,8n+1) reduces in two lines.

Related structural law: if a=bca=bc with gcd(b,c)=1\gcd(b,c)=1 then HCF(c,bd)=HCF(c,d)\mathrm{HCF}(c,\,bd)=\mathrm{HCF}(c,\,d) — the coprime part bb contributes nothing.

Subtraction property

HCF(n,  n+k)=HCF(n,  k)\mathrm{HCF}(n,\;n+k)=\mathrm{HCF}(n,\;k)

Worked example

What is HCF(n,n+15)\mathrm{HCF}(n,\,n+15) when n=25n=25, and in general?
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 4Number SystemMODERATE
If the HCF of p and q (p>q)(p > q) is G, then which of the following statements is/are correct ? I. HCF of p and (p+q)(p + q) is G II. HCF of p, (pq)(p - q) is G Select the answer using the code given below :

[Q22 · CDS (I) 2026 — Elementary Mathematics · 2026]

The property transfers the HCF, it does not compute it

HCF(n,n+10)=HCF(n,10)\mathrm{HCF}(n,\,n+10)=\mathrm{HCF}(n,10) tells you the answer divides 10 — not that it is 10. The 2024 question requiring HCF(n,n+10)=10\mathrm{HCF}(n,\,n+10)=10 therefore forces 10n10 \mid n, which is an extra condition you must impose before counting the possible LCMs.

Concept 5 of 7

HCF and LCM of fractions and decimals

Intuition

For fractions the two recipes are crossed over: the HCF takes the HCF of the numerators over the LCM of the denominators, and the LCM does the opposite. For decimals, scale everything to whole numbers first and scale the answer back.

Definition

With all fractions in lowest terms:

HCF=HCF of numeratorsLCM of denominators,LCM=LCM of numeratorsHCF of denominators.\mathrm{HCF}=\frac{\mathrm{HCF\ of\ numerators}}{\mathrm{LCM\ of\ denominators}}, \qquad \mathrm{LCM}=\frac{\mathrm{LCM\ of\ numerators}}{\mathrm{HCF\ of\ denominators}}.
For decimals: multiply every value by the same power of 10 to clear the decimals, take the HCF or LCM of the integers, then divide back by that power.

Fractions: the crossed recipes

LCM ⁣(aibi)=LCM(ai)HCF(bi)\mathrm{LCM}\!\left(\frac{a_i}{b_i}\right)=\frac{\mathrm{LCM}(a_i)}{\mathrm{HCF}(b_i)}

Worked example

Find the LCM of 23\dfrac{2}{3}, 49\dfrac{4}{9} and 827\dfrac{8}{27}.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 5Number SystemMODERATE
What is the LCM of 13\dfrac{1}{3}, 56\dfrac{5}{6}, 29\dfrac{2}{9}, 427\dfrac{4}{27} ?

[Q18 · CDS (I) 2019 — Elementary Mathematics · 2019]

The two fraction recipes are crossed — do not use the same one twice

HCF of fractions uses HCF-over-LCM; LCM of fractions uses LCM-over-HCF. Applying the numerator rule to the denominators as well gives a value that is neither. A quick check catches it: the LCM must be divisible by each fraction, and the HCF must divide each.

Concept 6 of 7

The HCF of two numbers of the form a to the n, minus one

Intuition

There is a clean identity for gcd(am1, an1)\gcd(a^{m}-1,\ a^{n}-1): the exponents' own HCF comes down into the exponent. So a question that looks impossible — the HCF of two astronomically large numbers — is one gcd of small exponents.

Definition

For an integer a>1a>1,

gcd ⁣(am1, an1)=agcd(m,n)1.\gcd\!\left(a^{m}-1,\ a^{n}-1\right) = a^{\gcd(m,n)}-1.

  • Take out any common constant factor first: 3299=9 ⁣(3271)3^{29}-9 = 9\!\left(3^{27}-1\right), so the identity applies to the bracket and the 9 multiplies back at the end.
  • The same shape works for a common factor of the whole expression, not for a constant added inside the power.

HCF of power-minus-one

gcd ⁣(am1,  an1)=agcd(m,n)1\gcd\!\left(a^{m}-1,\;a^{n}-1\right)=a^{\gcd(m,n)}-1

Worked example

Find the HCF of 21212^{12}-1 and 21812^{18}-1.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 6Number SystemHARD
What is the HCF of 23612^{36} - 1 and 24512^{45} - 1 ?

[Q91 · CDS (II) 2024 — Elementary Mathematics · 2024]

Pull out the common constant before applying the identity

32993^{29}-9 is not of the form an1a^{n}-1. Rewrite it as 9(3271)9(3^{27}-1) and likewise 3389=9(3361)3^{38}-9 = 9(3^{36}-1); then the identity gives gcd=9 ⁣(391)=3119\gcd = 9\!\left(3^{9}-1\right) = 3^{11}-9. Applying the identity to the exponents 29 and 38 directly gives a near-miss answer that appears in the option list.

Concept 7 of 7

Spotting HCF and LCM data that cannot exist

Intuition

Three cheap checks catch impossible data before you waste time solving: the HCF must divide both numbers, the HCF must divide the LCM, and LCM divided by HCF must be a whole number. CDS sets questions that fail these, and recognising the failure is the intended skill.

Definition

Necessary conditions for a stated HCF HH and LCM LL of two numbers:

  • HLH \mid L, and L/H=abL/H = ab must be a positive integer;
  • HH must divide each number given;
  • each given number must divide LL;
  • HH \le each number L\le L.

If any fails, no such pair exists. When that happens the honest answer is that the data is inconsistent — though the paper may still expect the value the intended arithmetic produces, so compute it and note the conflict.

The ratio test

LCMHCF=abZ+\frac{\mathrm{LCM}}{\mathrm{HCF}} = ab \in \mathbb{Z}^{+}

Worked example

Can two numbers have HCF 6 and LCM 20? And can their LCM and HCF be in the ratio 4 : 3?
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 7Number SystemEASY
The sum of LCM and HCF of two numbers is 536 and the difference between LCM and HCF is 296. If one of the numbers is 104, then what is the other number ?

[Q5 · CDS (II) 2021 — Elementary Mathematics · 2021]

Some CDS questions carry data that cannot exist, and that is deliberate

The 2021 question gives HCF 120 with one number 104 — but 120104120 \nmid 104, so no such pair exists, and the 2023 question asks for an LCM-to-HCF ratio of 3:23:2, which no pair can have. Run the three checks, state the conflict, and give the value the intended arithmetic yields. Do not assume you have miscalculated: on this corpus the data is sometimes the thing that is wrong.

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 (7)

Watch out for (7)

Drill every past-year question on this subtopic

29 questions from the bank — paginated, with cart and Word-export support.

Related notes