← Back to FractionRush

Number Theory

Grade 9 · Number · Cambridge IGCSE 0580 · Age 13–14

Welcome to Number Theory!

Number Theory is the study of the properties and relationships of numbers. It underpins almost all of mathematics — from simplifying fractions to scheduling problems in real life. In IGCSE 0580, you need to classify numbers, find prime factorisations, and use HCF and LCM confidently.

Prime factorisation is the key that unlocks HCF, LCM, and much more!

Types of Numbers

Natural, integer, rational, irrational, real

Primes & Composites

Identifying and testing prime numbers

Prime Factorisation

Factor trees and repeated division

HCF

Highest Common Factor — Venn method

LCM

Lowest Common Multiple — Venn method

Special Numbers

Squares, cubes, triangles, reciprocals

1. Types of Numbers

The number system is built in layers — each set contains the one before it.

Natural numbers (ℕ): The counting numbers. 1, 2, 3, 4, 5, … (some definitions include 0).
Integers (ℤ): All whole numbers including negatives and zero. …, −3, −2, −1, 0, 1, 2, 3, …
Rational numbers (ℚ): Any number expressible as a fraction p/q where p and q are integers and q ≠ 0. This includes all terminating and recurring decimals. Examples: 3/4, −2, 0.5, 0.333…
Irrational numbers: Numbers that cannot be expressed as a fraction. Their decimal expansions are non-terminating and non-recurring. Examples: √2, √3, π, e.
Real numbers (ℝ): The complete number line — all rationals and irrationals together.
ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ  |  Irrationals ⊂ ℝ but ∉ ℚ
Quick classification test:
• Is it a whole number (positive)? → Natural number.
• Does it include negatives or zero? → Integer.
• Can it be written as a fraction? → Rational.
• Is it a non-perfect-square root or π? → Irrational.
Every number on the number line is a real number.
Examples to classify:
7 → Natural, Integer, Rational, Real
−4 → Integer, Rational, Real (NOT natural)
3/5 → Rational, Real (NOT integer)
√9 = 3 → Natural, Integer, Rational, Real
√7 → Irrational, Real (not rational — 7 is not a perfect square)
π → Irrational, Real
0.25 = 1/4 → Rational, Real

2. Prime Numbers and Composite Numbers

A prime number has exactly two factors: 1 and itself. A composite number has more than two factors. The number 1 is neither prime nor composite.

Prime: exactly 2 factors  |  Composite: 3 or more factors  |  1: neither
Primes up to 50: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47
Note: 2 is the only even prime. Every even number greater than 2 is composite.
Composites: 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, …
Testing if a number n is prime: Check divisibility by all primes up to √n. If none divide n, it is prime.
Example — Is 97 prime? √97 ≈ 9.8. Check: 2, 3, 5, 7. None divide 97 evenly → 97 is prime.
Example — Is 91 prime? 91 ÷ 7 = 13. Has factors 7 and 13 → 91 is composite (7 × 13).

3. Prime Factorisation

Every composite number can be written as a unique product of prime numbers — this is called its prime factorisation. There are two standard methods.

Every integer > 1 = product of primes (Fundamental Theorem of Arithmetic)

Method 1: Factor Tree

Split the number into any two factors. Keep splitting each branch until every leaf is prime. Circle the primes at the ends of branches.

Factor tree for 60:
60
├── 6 × 10
│    ├── 2 × 3    (both prime — circle them)
│    └── 2 × 5    (both prime — circle them)
Primes collected: 2, 3, 2, 5
60 = 2² × 3 × 5
Factor tree for 360:
360 → 4 × 90 → (2 × 2) × (9 × 10) → (2 × 2) × (3 × 3) × (2 × 5)
Collect primes: 2, 2, 3, 3, 2, 5
360 = 2³ × 3² × 5

Method 2: Repeated Division (Ladder Method)

Divide by the smallest prime that divides evenly, then repeat with the quotient.

Repeated division for 180:
180 ÷ 2 = 90
90 ÷ 2 = 45
45 ÷ 3 = 15
15 ÷ 3 = 5
5 ÷ 5 = 1   ← stop when quotient is 1
180 = 2² × 3² × 5
Always write your answer in index notation (using powers). Always list prime factors in ascending order: 2² × 3² × 5, not 3² × 2² × 5.

4. Highest Common Factor (HCF)

The HCF of two or more numbers is the largest number that divides all of them exactly. Use prime factorisation, then take the shared prime factors using the lowest power of each.

HCF = product of shared prime factors, each to their LOWEST power
Find HCF(60, 90):
60 = 2² × 3 × 5
90 = 2 × 3² × 5
Shared primes: 2 (lowest power: 2¹), 3 (lowest power: 3¹), 5 (lowest power: 5¹)
HCF = 2¹ × 3¹ × 5¹ = 30

Venn Diagram Method

Draw two overlapping circles. Place prime factors that appear in both numbers in the intersection. Factors that appear in only one number go in that number's section only. HCF = product of factors in the intersection.

HCF(24, 36) using Venn diagram:
24 = 2³ × 3 = 2 × 2 × 2 × 3
36 = 2² × 3² = 2 × 2 × 3 × 3
Intersection (shared): 2, 2, 3 (i.e. 2², 3)
Left only (24): one more 2
Right only (36): one more 3
HCF = 2 × 2 × 3 = 12
Real-world use: HCF is used for tiling (largest square tile that fits), sharing equally, and simplifying fractions.
Example: To simplify 60/90 — HCF(60,90) = 30, so 60/90 = 2/3.

5. Lowest Common Multiple (LCM)

The LCM of two or more numbers is the smallest number that is a multiple of all of them. Use prime factorisation, then take all prime factors using the highest power of each.

LCM = product of ALL prime factors, each to their HIGHEST power
Find LCM(60, 90):
60 = 2² × 3 × 5
90 = 2 × 3² × 5
All primes: 2 (highest power: 2²), 3 (highest power: 3²), 5 (highest power: 5¹)
LCM = 4 × 9 × 5 = 180

Venn Diagram Method

Using the same Venn diagram as for HCF: LCM = product of ALL factors in the entire diagram (both circles combined).

LCM(24, 36) using Venn diagram:
Intersection: 2, 2, 3    Left only: 2    Right only: 3
LCM = 2 × 2 × 3 × 2 × 3 = 72
Check: 72 ÷ 24 = 3 ✓   72 ÷ 36 = 2 ✓
Useful link: HCF(a,b) × LCM(a,b) = a × b (for two numbers).
Check: HCF(24,36) × LCM(24,36) = 12 × 72 = 864 = 24 × 36 ✓
Real-world use: LCM solves scheduling problems — when two events repeat at different intervals, the LCM tells you when they next coincide.

6. Using HCF and LCM in Context

Tiling problem: A floor is 360 cm × 240 cm. What is the largest square tile (side length in whole cm) that fits exactly with no cutting?
Answer: HCF(360, 240).
360 = 2³ × 3² × 5    240 = 2⁴ × 3 × 5
HCF = 2³ × 3 × 5 = 120 cm
Scheduling problem: Bus A comes every 12 minutes. Bus B comes every 18 minutes. They both just arrived together. When do they next arrive together?
Answer: LCM(12, 18).
12 = 2² × 3    18 = 2 × 3²
LCM = 2² × 3² = 36 minutes
Simplifying fractions: Write 48/72 in its simplest form.
HCF(48, 72): 48 = 2⁴ × 3, 72 = 2³ × 3². HCF = 2³ × 3 = 24.
48 ÷ 24 = 2, 72 ÷ 24 = 3 → 48/72 = 2/3

7. Square, Cube, and Triangle Numbers

Square numbers: n² for n = 1, 2, 3, …
1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, …
Visual: can be arranged into a perfect square dot pattern.
Cube numbers: n³ for n = 1, 2, 3, …
1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, …
Visual: can be arranged into a 3D cube of dots (n × n × n).
Triangle numbers: T(n) = n(n+1)/2 for n = 1, 2, 3, …
1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, …
Visual: can be arranged into a triangular dot pattern. T(n) = 1 + 2 + 3 + … + n.
Note: 36 is both a square number (6²) and a triangle number (T(8)).
T(n) = n(n+1)/2  |  Square: n²  |  Cube: n³
The difference between consecutive square numbers follows a pattern: 4−1=3, 9−4=5, 16−9=7, 25−16=9… always the next odd number. The nth square number minus the (n−1)th = 2n−1.

8. Reciprocals

The reciprocal of a number x is 1/x. Multiplying a number by its reciprocal always gives 1.

Reciprocal of x = 1/x  |  x × (1/x) = 1 always
Reciprocal of 5 = 1/5
Reciprocal of 3/4 = 4/3 (flip the fraction)
Reciprocal of 0.2 = 1/0.2 = 5
Reciprocal of −7 = −1/7
Reciprocal of 1 = 1    (1 is its own reciprocal)
0 has no reciprocal (1/0 is undefined)
For a fraction a/b, the reciprocal is b/a — just swap numerator and denominator. Reciprocals are used in division: dividing by a number = multiplying by its reciprocal.

Example 1 — Prime Factorisation using a factor tree (60)

Start: 60 = 6 × 10
Branch 6: 6 = 2 × 3. Both prime — circle them.
Branch 10: 10 = 2 × 5. Both prime — circle them.
Collect primes: 2, 3, 2, 5 → sorted: 2, 2, 3, 5
Answer: 60 = 2² × 3 × 5

Example 2 — Prime Factorisation by repeated division (252)

252 ÷ 2 = 126
126 ÷ 2 = 63
63 ÷ 3 = 21
21 ÷ 3 = 7
7 ÷ 7 = 1  ← stop
252 = 2² × 3² × 7

Example 3 — HCF using prime factorisation: HCF(84, 120)

84 = 2 × 42 = 2 × 2 × 21 = 2 × 2 × 3 × 7 → 84 = 2² × 3 × 7
120 = 2 × 60 = 2² × 30 = 2² × 2 × 15 = 2³ × 3 × 5 → 120 = 2³ × 3 × 5
Shared prime factors: 2 (lowest power: 2²), 3 (lowest power: 3¹)
Note: 7 only in 84, 5 only in 120 — NOT included in HCF
HCF(84, 120) = 2² × 3 = 4 × 3 = 12

Example 4 — LCM using prime factorisation: LCM(12, 18, 30)

12 = 2² × 3    18 = 2 × 3²    30 = 2 × 3 × 5
All primes appearing: 2, 3, 5
Highest power of 2: 2² (from 12)    Highest power of 3: 3² (from 18)    Highest power of 5: 5¹ (from 30)
LCM = 2² × 3² × 5 = 4 × 9 × 5 = 180
Check: 180 ÷ 12 = 15 ✓   180 ÷ 18 = 10 ✓   180 ÷ 30 = 6 ✓

Example 5 — Context problem: Tiling

Problem: A rectangular garden is 48 m × 36 m. Square paving slabs are used to cover it exactly, with no cutting. What is the largest possible side length of each slab?
Find HCF(48, 36).
48 = 2⁴ × 3    36 = 2² × 3²
Shared: 2² × 3 = 12
Largest slab = 12 m × 12 m
Number of slabs = (48 × 36) / (12 × 12) = 1728 / 144 = 12 slabs

Example 6 — Reciprocal and number classification

(a) Write down the reciprocal of 2/7. → Flip: 7/2
(b) Is √16 rational or irrational? → √16 = 4. It is a perfect square → rational (and natural)
(c) Is √11 rational or irrational? → 11 is not a perfect square → √11 is irrational
(d) What is the 8th triangle number? → T(8) = 8 × 9 / 2 = 36

Interactive Factor Tree Builder

Enter any integer from 2 to 9999 to see its complete prime factorisation, displayed step-by-step as a factor tree description and in index notation.

Enter a number and click Build Factor Tree.

HCF and LCM Calculator

Enter two numbers to see their prime factorisations, Venn diagram description, HCF, and LCM — all step-by-step.

Result will appear here.

Special Numbers Explorer

Check any positive integer — see if it is square, cube, triangular, prime, and its reciprocal.

Result will appear here.

Exercise 1 — Primes and Composites

For each question, enter the required number.

1. How many prime numbers are there between 1 and 20 (not including 1 or 20)?

2. What is the only even prime number?

3. What is the 5th prime number? (list: 2, 3, 5, 7, …)

4. What is the largest prime number less than 50?

5. How many factors does the number 12 have? (include 1 and 12)

6. How many prime numbers are between 20 and 40?

Exercise 2 — Prime Factorisation

Find the prime factorisation of each number. Enter the sum of all prime factors (with repetition, e.g. 12 = 2×2×3, sum = 2+2+3 = 7).

1. Find the sum of prime factors of 12. (12 = 2 × 2 × 3)

2. Find the sum of prime factors of 18. (18 = 2 × 3 × 3)

3. Find the sum of prime factors of 20. (20 = 2 × 2 × 5)

4. Find the sum of prime factors of 36. (36 = 2 × 2 × 3 × 3)

5. Find the sum of prime factors of 45. (45 = 3 × 3 × 5)

6. Find the sum of prime factors of 100. (100 = 2 × 2 × 5 × 5)

Exercise 3 — Highest Common Factor

Find the HCF of each pair of numbers using prime factorisation.

1. HCF(12, 18)

2. HCF(20, 30)

3. HCF(24, 36)

4. HCF(45, 60)

5. HCF(48, 72)

6. HCF(84, 120)

Exercise 4 — Lowest Common Multiple

Find the LCM of each pair of numbers using prime factorisation.

1. LCM(4, 6)

2. LCM(6, 9)

3. LCM(8, 12)

4. LCM(15, 20)

5. LCM(12, 18)

6. LCM(14, 21)

Exercise 5 — Special Numbers and Reciprocals

Answer each question with a number.

1. What is 7²? (7 squared)

2. What is 4³? (4 cubed)

3. What is the 6th triangle number? T(6) = 6×7/2

4. What is the 10th triangle number? T(10) = 10×11/2

5. What is the reciprocal of 8? Enter as a decimal.

6. What is 0.25 × its reciprocal? (a number × its reciprocal always = ?)

Practice — 20 Questions

Mixed questions covering all Number Theory topics. Read carefully.

1. What is the smallest prime number?

2. How many prime numbers are there between 1 and 10?

3. Sum of prime factors of 12 (with repetition: 2+2+3)?

4. Sum of prime factors of 30 (2+3+5)?

5. HCF(12, 18)

6. HCF(24, 36)

7. HCF(60, 90)

8. LCM(4, 6)

9. LCM(6, 9)

10. LCM(12, 18)

11. What is 5²?

12. What is 3³?

13. What is the 4th triangle number? T(4) = 4×5/2

14. What is the 5th triangle number? T(5) = 5×6/2

15. What is the reciprocal of 4? Enter as a decimal.

16. LCM(8, 12)

17. HCF(48, 72)

18. What is the 7th square number? (7²)

19. What is the 5th cube number? (5³)

20. HCF(84, 120)

Challenge — 8 Questions

Harder contextual and reasoning problems. Enter numerical answers only.

1. A rectangular floor is 360 cm × 240 cm. What is the side length (in cm) of the largest square tile that covers it exactly with no gaps or cutting? (Find HCF(360, 240))

2. Bus A runs every 12 minutes. Bus B runs every 18 minutes. They leave together at 9:00. How many minutes later do they next leave together? (Find LCM(12,18))

3. Two numbers have HCF = 6 and LCM = 60. One of the numbers is 12. What is the other number? (Use: HCF × LCM = a × b)

4. What is the smallest number that is both a perfect square and a perfect cube? (Hint: it must be n⁶ for some n — smallest is 1, next is 2⁶ = 64)

5. Which triangle number between 50 and 100 is also a perfect square? T(n) = n(n+1)/2 — try T(8) = 36, T(9) = 45, T(10) = 55, T(11) = 66, T(12) = 78, T(13) = 91 … also check 64, 81, 100.

6. I have three strings of lengths 24 cm, 36 cm, and 48 cm. I want to cut them all into pieces of the same length, with no waste. What is the longest possible piece length in cm?

7. Three lights flash every 4, 6, and 10 seconds respectively. They all flash together now. After how many seconds do all three flash together again? (Find LCM(4, 6, 10))

8. 2024 = 2³ × 11 × 23. How many factors does 2024 have? (Use: if n = p^a × q^b × r^c then number of factors = (a+1)(b+1)(c+1))