HCF and LCM Basics
Imagine you have to lay tiles on a floor that is 60 cm by 96 cm without cutting any tile. What is the largest square tile that will fit perfectly? Or imagine three bells in a temple that ring every 12, 18 and 30 minutes — when will they ring together again? Both puzzles boil down to the same two ideas: HCF and LCM. RPF Constable, RPF SI, SSC GD and RRB Group D ask 1–2 questions on these every paper, and the trap is almost always picking the wrong one between the two.
Definition: The Highest Common Factor (HCF), also called the Greatest Common Divisor (GCD), of two or more numbers is the largest number that divides all of them exactly (leaving zero remainder).
Definition: The Least Common Multiple (LCM) of two or more numbers is the smallest positive number that is exactly divisible by every one of them.
HCF: The Largest Common Divisor
If you list every divisor of two numbers, the HCF is the biggest one that appears in both lists.
Take 18 and 24.
- Divisors of 18: 1, 2, 3, 6, 9, 18.
- Divisors of 24: 1, 2, 3, 4, 6, 8, 12, 24.
- Common divisors: 1, 2, 3, 6. The largest is 6.
- So HCF(18, 24) = 6.
The HCF is always smaller than or equal to the smallest of the given numbers — because a divisor of n cannot exceed n.
LCM: The Smallest Common Multiple
If you list multiples of each number, the LCM is the smallest number that appears in every list.
Same example, 18 and 24.
- Multiples of 18: 18, 36, 54, 72, 90, …
- Multiples of 24: 24, 48, 72, 96, …
- The smallest common multiple is 72.
The LCM is always greater than or equal to the largest of the given numbers — because any common multiple must contain each number.
Method 1: Prime Factorisation
Step-by-step: write each number as a product of prime powers. Then:
- HCF = product of every prime factor common to all numbers, raised to its lowest power.
- LCM = product of every prime factor that appears in any number, raised to its highest power.
Question: Find HCF and LCM of 72 and 120 by prime factorisation.
Solution:
Step 1: 72 = 2³ × 3².
Step 2: 120 = 2³ × 3 × 5.
Step 3: Common primes: 2 and 3. Lowest powers: 2³ and 3¹.
Step 4: HCF = 2³ × 3 = 8 × 3 = 24.
Step 5: All primes appearing: 2, 3, 5. Highest powers: 2³, 3², 5¹.
Step 6: LCM = 2³ × 3² × 5 = 8 × 9 × 5 = 360.
Conclusion: HCF = 24, LCM = 360.
Verification by the golden formula: HCF × LCM = 24 × 360 = 8640 = 72 × 120. ✓
Method 2: Division Method (Euclid's Algorithm)
For two large numbers where prime factorisation is slow, the division method is faster. It is essentially Euclid's algorithm: divide, take remainder, repeat with divisor and remainder, until remainder is 0. The last divisor is the HCF.
Question: Find HCF of 408 and 1032.
Solution:
Step 1: 1032 ÷ 408 = 2 remainder 216.
Step 2: 408 ÷ 216 = 1 remainder 192.
Step 3: 216 ÷ 192 = 1 remainder 24.
Step 4: 192 ÷ 24 = 8 remainder 0.
Conclusion: Last non-zero divisor = 24. HCF(408, 1032) = 24.
Then use HCF × LCM = product of the numbers to get LCM: 24 × LCM = 408 × 1032, so LCM = 17544.
The Golden Formula
For exactly two numbers a and b:
HCF(a, b) × LCM(a, b) = a × b
This single identity converts any HCF problem into an LCM problem (and vice versa) for two numbers. Memorise it — it shows up in 60% of HCF/LCM questions in RPF Constable.
Important caveat: the formula works only for two numbers. For three or more numbers, HCF × LCM is not equal to the product of the numbers. Example: 4, 6, 8 → HCF = 2, LCM = 24, product = 192, but 2 × 24 = 48 ≠ 192.
Co-prime Numbers — a Free Mark
Definition: Two numbers are co-prime (relatively prime) if their HCF = 1, i.e., they share no prime factor.
Two facts about co-primes that the exam exploits constantly:
- HCF of co-primes = 1 (by definition).
- LCM of co-primes = their product.
Examples: 8 and 15 are co-prime (8 = 2³, 15 = 3 × 5; no common prime), so HCF(8, 15) = 1 and LCM(8, 15) = 120. Note that co-prime numbers need not themselves be prime — 8 and 15 are both composite, yet co-prime.
HCF is Small, LCM is Large — Don't Get Them Mixed Up
This is the most common bleeding mistake in RPF aspirants' practice papers. A memory anchor that works:
- HCF = Highest Common Factor → it is the highest among the factors, but a factor cannot be bigger than the number itself, so HCF is at most the smallest number.
- LCM = Least Common Multiple → it is the least among the multiples, but a multiple cannot be smaller than the number, so LCM is at least the largest number.
In one line: HCF is small, LCM is large. If you ever get HCF > smallest number, or LCM < largest number, you have made an arithmetic mistake — recompute.
Choosing Between HCF and LCM in Word Problems
The exam pattern is predictable. The keywords in the question almost always tell you which to compute.
| Use HCF when the question says... | Use LCM when the question says... |
|---|---|
| Largest size of tile / largest cloth piece / longest tape / greatest length | Smallest length / smallest quantity that fits all |
| Maximum number of students with equal share | Minimum number of items, sweets, etc. that can be equally divided |
| Greatest number that divides A, B, C leaving the same remainder | Smallest number divisible by each |
| Make equal-sized groups from different totals | Bells/lights/buzzers/traffic-signals all ringing/blinking together |
| Cut things into equal pieces — no waste | Round trips / racing tracks / cyclical events meeting again |
The simple test: "largest / greatest / max" → HCF; "smallest / least / min / together again" → LCM.
Worked Example: The Bell Problem
Question: Three bells ring at intervals of 12, 18, and 30 minutes. If they ring together at 8:00 AM, when will they next ring together?
Solution:
Step 1: "Together again" is a together event — we want the smallest common multiple of the intervals → LCM.
Step 2: Prime factorise: 12 = 2² × 3; 18 = 2 × 3²; 30 = 2 × 3 × 5.
Step 3: LCM = 2² × 3² × 5 = 4 × 9 × 5 = 180.
Step 4: 180 minutes = 3 hours.
Conclusion: The bells ring together again at 11:00 AM.
Worked Example: The Tile Problem
Question: What is the largest square tile that can cover a floor of 60 cm × 96 cm with no tile being cut?
Solution:
Step 1: "Largest" → HCF.
Step 2: HCF(60, 96). Prime factorise: 60 = 2² × 3 × 5; 96 = 2⁵ × 3.
Step 3: HCF = 2² × 3 = 12.
Conclusion: The largest square tile is 12 cm × 12 cm. (Floor needs (60/12) × (96/12) = 5 × 8 = 40 such tiles.)
Why It Matters
Number-system questions account for around 8–10 marks of every RPF Constable paper. HCF and LCM contribute at least 2 marks directly and another 2 indirectly (through ratio, time-and-work, and pipes-and-cisterns problems that use LCM-of-times to set total work). Mastery here lifts your overall maths score noticeably.
Real-World Example
The Indian Railways uses LCM logic to schedule simultaneous arrivals on different platforms. If train A arrives every 45 minutes and train B every 60 minutes, both will meet on a shared crossover at LCM(45, 60) = 180-minute intervals. Engineers use this to plan signal cycles so that the crossover does not block both trains at the same instant.
Common Misconception
"HCF × LCM = product, always."
False — only for two numbers. As shown above, three numbers can violate this. Always verify how many numbers the question gives you before reaching for the golden formula.
A second common slip: assuming co-prime numbers must be prime. 9 and 16 are co-prime (no shared prime), yet neither 9 nor 16 is prime. "Co-prime" only requires HCF = 1.
- ✓- HCF = largest divisor common to all numbers; LCM = smallest multiple common to all.
- ✓- HCF ≤ smallest number; LCM ≥ largest number.
- ✓- Two methods: prime factorisation (works for any count); Euclidean division (fast for two big numbers).
- ✓- HCF × LCM = product of the two numbers — only for two numbers.
- ✓- Co-primes have HCF = 1 and LCM = product.
- ✓- Word problem rule: "largest / greatest" → HCF; "smallest / together again" → LCM.
- ✓- HCF of co-primes is always 1, even if the numbers themselves are composite.
"HCF eats Factors (small), LCM eats Multiples (big)."
- Factors live inside the number, so HCF can never exceed the smallest input.
- Multiples live outside the number, so LCM can never be smaller than the largest input.
- ✓- HCF is the biggest sharer; LCM is the smallest meeting point.
- ✓- Prime-factorisation method handles any number of inputs cleanly.
- ✓- Golden formula HCF × LCM = a × b is your fastest tool — for two numbers only.
- ✓- Read the word problem twice for the trigger word: largest / smallest decides which to compute.
HCF/LCM of Fractions
For fractions, use these special formulas. HCF of fractions = HCF of numerators / LCM of denominators. LCM of fractions = LCM of numerators / HCF of denominators. Example: HCF of 2/3 and 4/9 = HCF(2,4)/LCM(3,9) = 2/9. LCM of 2/3 and 4/9 = LCM(2,4)/HCF(3,9) = 4/3. Memory hook: for HCF take the small route (HCF on top, LCM on bottom); for LCM take the big route (LCM on top, HCF on bottom). Always reduce fractions to lowest terms first. These appear regularly in RPF and other RRB Level-1 exams as one-mark direct questions.
Worked Example: HCF x LCM
One identity ends most HCF–LCM questions in the RPF Constable Mathematics paper before they begin: for any two positive integers, their product equals the product of their HCF and LCM. Use it and you save the time other candidates spend on prime factorisation.
Definition: The HCF (Highest Common Factor), also called GCD (Greatest Common Divisor), of two numbers is the largest positive integer that divides both of them without a remainder.
Definition: The LCM (Lowest Common Multiple) of two numbers is the smallest positive integer that is a multiple of both.
Definition: The Product Rule for two numbers states: a × b = HCF(a, b) × LCM(a, b). This identity holds for any two positive integers and is the single fastest tool in this chapter.
Why the product rule works (the intuition)
Write a = HCF × m and b = HCF × n, where m and n share no common factor (this is what it means to factor out the HCF). Then ab = HCF² × m × n, and LCM = HCF × m × n. Multiply HCF and LCM together: HCF × (HCF × m × n) = HCF² × m × n = ab. Done.
This is also why the rule only works for two numbers. For three or more, the simple product no longer equals HCF × LCM — extra correction factors creep in. If an RPF question gives three numbers and asks for one from HCF and LCM data, treat it differently (usually prime-factorise).
The set-up: find the missing number
Question: The HCF of two numbers is 12 and their LCM is 144. If one number is 36, find the other number.
Solution:
Step 1: Apply the product rule. Product of the two numbers = HCF × LCM = 12 × 144 = 1728.
Step 2: One number is given as 36, so the other number = 1728 / 36.
Step 3: 1728 / 36 = 48 (because 36 × 4 = 144, and 36 × 48 = 1728).
Step 4: Verify. Factorise 36 = 2² × 3² and 48 = 2⁴ × 3. Take the minimum power of each prime for HCF: HCF = 2² × 3 = 12. Take the maximum power for LCM: LCM = 2⁴ × 3² = 16 × 9 = 144. Both match.
Conclusion: The other number is 48.
Why the rule matters in the exam
Real-world example: Imagine the Indian Railways procurement team buying lengths of rail in two standard sizes that can be cut to fit a junction. If two slab sizes are 36 m and 48 m, the longest single piece that divides both evenly is HCF = 12 m, and the shortest length where both sizes line up perfectly is LCM = 144 m. The product rule reassures the planner that 36 × 48 = 12 × 144 = 1728 — a sanity check on the entire compatibility chart.
Why it matters: RPF and Railway exam setters re-use this template — "HCF = …, LCM = …, one number = …, find the other" — almost every year. Knowing the rule turns a 90-second problem into a 15-second one.
Common misconception: "The product rule works for any number of values." It does not. For three or more numbers the identity a × b × c = HCF × LCM is generally false. Use it only on pairs.
Common misconception: "Any HCF and LCM are compatible." Wrong — LCM must be a multiple of HCF. If a question says HCF = 12 and LCM = 100, those are inconsistent (12 does not divide 100). Spotting this lets you eliminate options instantly.
The bell-ringing / traffic-light family of LCM problems
These are RPF favourites. A signal blinks every 24 seconds, another every 36 seconds, a third every 54 seconds. They all start together — when do they next blink together?
Solution:
Step 1: They blink together at any common multiple of their periods.
Step 2: The first time after the start is the least common multiple: LCM(24, 36, 54).
Step 3: Prime-factorise. 24 = 2³ × 3, 36 = 2² × 3², 54 = 2 × 3³.
Step 4: LCM uses the highest power of each prime: 2³ × 3³ = 8 × 27 = 216 seconds.
Step 5: Convert: 216 seconds = 3 minutes 36 seconds.
Conclusion: The three signals blink together again 3 min 36 s after the start.
This template covers bells in a temple, traffic lights at a junction, runners on a circular track, and gear-meshing problems — all are LCM under different paint.
| Quantity | Built from | Use when… | Example for 24, 36 |
|---|---|---|---|
| HCF | Lowest powers of common primes | Asking the biggest divisor that fits both | HCF = 12 |
| LCM | Highest powers of all primes seen | Asking the smallest number both divide into | LCM = 72 |
| Product rule | HCF × LCM = a × b | Only for two numbers, when missing one value | 12 × 72 = 864 = 24 × 36 |
- ✓- For two numbers: a × b = HCF × LCM.
- ✓- Find HCF by taking minimum powers of common primes.
- ✓- Find LCM by taking maximum powers of all primes.
- ✓- LCM is always a multiple of HCF — useful as a sanity check.
- ✓- Product rule fails for three or more numbers; prime-factorise instead.
- ✓- "Together-again" timing problems are LCM problems in disguise.
- ✓- Always verify HCF and LCM consistency before solving.
- ✓- If HCF = 1, the two numbers are co-prime and LCM = their product.
"Pair Product" — for any pair of numbers, the product equals HCF × LCM. Whisper "Pair Product" before HCF–LCM questions to lock in the rule.
- ✓- HCF × LCM = product of the two numbers; one identity, many marks.
- ✓- Use prime factorisation to verify or to handle three or more numbers.
- ✓- LCM is the natural answer to "when do they coincide again?".
- ✓- Watch the trap: the product rule is for two numbers only.
Factors, Multiples, HCF & LCM — Flashcards
Cover the answer, recall, then check. 12 cards on HCF, LCM and their word problems.
Q1. Relationship between HCF and LCM of two numbers?
A1. HCF × LCM = product of the two numbers. e.g. 12 & 18: HCF=6, LCM=36, 6×36 = 216 = 12×18. ✓ (Holds only for TWO numbers.)
Q2. HCF of 24 and 36?
A2. 24 = 2³×3, 36 = 2²×3². Take common primes, lowest powers → 2²×3 = 12.
Q3. LCM of 24 and 36?
A3. All primes, highest powers → 2³×3² = 8×9 = 72.
Q4. HCF of two fractions — formula?
A4. HCF(numerators) / LCM(denominators). e.g. HCF of 2/3 and 4/9 = HCF(2,4)/LCM(3,9) = 2/9.
Q5. LCM of two fractions — formula?
A5. LCM(numerators) / HCF(denominators). e.g. LCM of 2/3 and 4/9 = LCM(2,4)/HCF(3,9) = 4/3.
Q6. Greatest number that divides 43, 91 and 183 leaving the same remainder?
A6. HCF of the differences: 91−43=48, 183−91=92, 183−43=140. HCF(48,92,140) = 4 (check: 43,91,183 each leave remainder 3).
Q7. Least number that leaves remainder 3 when divided by 5, 6 and 8?
A7. LCM(5,6,8) + 3 = 120 + 3 = 123.
Q8. Least number exactly divisible by 5, 6 and 8?
A8. LCM(5,6,8) = 120.
Q9. Two co-prime numbers have product 117. Their HCF and LCM?
A9. Co-prime → HCF = 1, so LCM = product = 117.
Q10. HCF of 1.08, 0.36 and 0.90?
A10. Scale to 108, 36, 90. HCF(108,36,90) = 18 → answer 0.18.
Q11. Fastest exam method for LCM?
A11. Prime-factorise, take the highest power of every prime, multiply; or use the division ladder for 2–3 numbers.
Q12. Three bells ring at 6, 9 and 12 second intervals. When do they next ring together, and how many times in an hour?
A12. LCM(6,9,12) = 36 s. Together every 36 s → 3600/36 = 100 times in an hour (plus once at the start).
Factors, Multiples, HCF & LCM — Summary
HCF and LCM are among the most reliable scoring topics in the RPF Constable paper — the question types are limited and formula-driven, so with practice they become 20-second solves. Expect 2–3 direct questions, plus HCF/LCM hides inside time-and-work, races and bells-ringing problems.
Core definitions
- Factor: divides a number exactly (no remainder).
- Multiple: the product of a number with any integer.
- HCF (GCD): the largest number that divides all the given numbers.
- LCM: the smallest number that all the given numbers divide.
Must-know formulas
- HCF × LCM = product of the two numbers (works only for TWO numbers).
- HCF of fractions = HCF(numerators) / LCM(denominators).
- LCM of fractions = LCM(numerators) / HCF(denominators).
- Number of factors of N = product of (exponent + 1) after prime factorisation.
| Task | Method |
|---|---|
| HCF | Common primes, lowest powers |
| LCM | All primes, highest powers |
| Same-remainder divisor | HCF of the differences |
| Leaves remainder r | LCM(…) + r |
| Exactly divisible | LCM(…) |
Exam Tricks & Tips
- 🎯 Greatest number dividing a, b, c with the SAME remainder = HCF of their pairwise differences.
- 🎯 Least number leaving remainder r with each of a, b, c = LCM(a,b,c) + r.
- 🎯 For two co-prime numbers, HCF = 1, so LCM = their product — instant.
- 🎯 Bells/lights coincide again after the LCM of the intervals; repeats in time T = T ÷ LCM.
- 🎯 Use the division ladder (divide all by a common prime repeatedly) — faster than full factorisation for 2–3 numbers.
- ❌ Never apply HCF×LCM = product to three or more numbers — it holds only for two.
Expected exam pattern
Typical stems: "greatest number dividing 43, 91, 183 leaving the same remainder", "least number divisible by 5, 6, 8", "two bells ring at …, when together again?". Each collapses to a clean HCF or LCM computation.
Quick recap
HCF = common-lowest, LCM = all-highest. Remember HCF×LCM = product (two numbers only), the fraction formulas, same-remainder → HCF-of-differences, and remainder → LCM + r. Fast, formula-driven marks.
Factors, Multiples, HCF & LCM
Factors, multiples, HCF, and LCM underpin a whole cluster of RPF Constable arithmetic — from "largest tile that fits" to "bells ringing together". Get the two words HCF and LCM straight and these questions almost solve themselves.
The core idea
A factor of a number divides it exactly (factors of 12: 1, 2, 3, 4, 6, 12). A multiple is what you get by multiplying it (multiples of 12: 12, 24, 36 …). The HCF (Highest Common Factor) is the largest number dividing two or more numbers; the LCM (Lowest Common Multiple) is the smallest number they all divide into.
Beginner — prime factorisation
Break each number into primes: 12 = 2² × 3, 18 = 2 × 3².
- HCF = product of the common primes to the lowest power = 2 × 3 = 6.
- LCM = product of all primes to the highest power = 2² × 3² = 36.
Intermediate — the product relationship
For any two numbers a and b: HCF × LCM = a × b. Knowing three of the four gives the fourth instantly.
Advanced — when to use which
- "Largest that divides / greatest measure / maximum equal groups" → HCF.
- "Smallest that is divisible / least length / when do events coincide again" → LCM.
Worked example
Three bells ring at intervals of 6, 9, and 12 minutes. If they ring together now, after how long will they ring together again?
This asks for the LCM. 6 = 2×3, 9 = 3², 12 = 2²×3.
LCM = 2² × 3² = 36. They ring together again after 36 minutes.
Exam relevance
RPF Constable regularly poses bells/traffic-lights coinciding (LCM), tiling a floor or cutting equal lengths (HCF), and direct HCF-LCM computation. Correctly choosing HCF vs LCM is the decisive step.
Tricks and mnemonic
HCF is High-common-Factor → the biggest that fits inside (smaller answer). LCM is the least common Multiple → the first time things line up (bigger answer). If the answer should be small and "fitting", use HCF; if it should be a shared future point, use LCM.
Do not swap HCF and LCM. HCF is never larger than the numbers; LCM is never smaller. A quick size check catches the mix-up.
- ✓- Factor divides exactly; multiple is a product.
- ✓- HCF = common primes, lowest powers; LCM = all primes, highest powers.
- ✓- HCF × LCM = product of the two numbers.
- ✓- "Greatest/largest that divides" → HCF.
- ✓- "Least/when again together" → LCM.
- ✓- Prime factorisation gives both HCF and LCM cleanly.
- ✓- HCF is the largest common divisor; LCM the smallest common multiple.
- ✓- HCF × LCM = a × b for two numbers.
- ✓- Keyword spotting decides which one the question wants.