Home > Math for DS > Topics > Topic 3
Topic 3 of 10

∞ Topic 3: Real Numbers and Irrational Numbers

Topic 3/10 ⭐⭐⭐ Advanced ⏱️ ~25 min

🎯 Learning Objectives

  • Understand the definition and properties of real numbers (ℝ)
  • Explore the motivation for irrational numbers
  • Master the proof that √2 is irrational (both geometric and algebraic)
  • Learn about famous irrational numbers like π and e
  • Understand decimal expansions and their properties
  • Discover the historical context of irrational number discovery

3.1 Beyond Rationals - Why We Need More Numbers

🤔 The Problem with Rationals

Are rational numbers enough to represent every point on the number line?

Consider square roots:

📊 Perfect Squares and Their Roots

√1 = 1
√4 = 2
√9 = 3
√16 = 4
√25 = 5

❓ The Critical Question

What about √2, √3, √5, √6, √7, √8, ...?

These numbers exist (they have a position on the number line), but are they rational?

📐 Geometric Motivation: The Unit Square

1
1
√2

By Pythagorean Theorem:

$$\text{diagonal}^2 = 1^2 + 1^2 = 2$$

Therefore: diagonal = √2

This length clearly exists, but is √2 a rational number?

3.2 Real Numbers (ℝ)

📚 Definition

Real Numbers (ℝ): The union of all rational and irrational numbers

$$\mathbb{R} = \mathbb{Q} \cup \{\text{all irrational numbers}\}$$

🔑 Key Property

Every point on the number line corresponds to a unique real number

Real numbers completely fill the number line with no gaps

🏗️ Number System Hierarchy

Real Numbers (ℝ)

All points on number line

Rational Numbers (ℚ)

p/q form

Irrational Numbers

Not expressible as p/q

Integers (ℤ)

..., -2, -1, 0, 1, 2, ...

Natural Numbers (ℕ)

0, 1, 2, 3, ...

$$\mathbb{N} \subseteq \mathbb{Z} \subseteq \mathbb{Q} \subseteq \mathbb{R}$$

💡 Important Distinction

Rational: Can be expressed as a fraction p/q (where p, q ∈ ℤ, q ≠ 0)

Irrational: Cannot be expressed as a fraction - decimal expansion goes on forever without repeating

3.3 Historical Discovery of Irrational Numbers

🏛️ Ancient Greece - The Pythagorean Crisis

~500 BCE

Pythagorean Belief

Pythagoras and his followers believed that "All is number"

By "number," they meant rational numbers

They thought every length could be expressed as a ratio of integers

~500 BCE

The Diagonal Problem

Pythagoreans knew the diagonal of a unit square had length √2

They spent years trying to prove √2 was rational

Problem: They couldn't find integers p and q such that p/q = √2

~500 BCE

Hippasus's Discovery

Hippasus proved that √2 is irrational

This shattered the Pythagorean worldview!

Legend: The Pythagoreans were so disturbed by this discovery that they allegedly drowned Hippasus at sea to suppress the truth

🌊 The Impact

The discovery of irrational numbers was a crisis in ancient mathematics

It showed that reality was more complex than previously thought

It forced mathematicians to develop more sophisticated number systems

3.4 Proof that √2 is Irrational

🏛️ Theorem

√2 is irrational

i.e., there do not exist integers p and q such that √2 = p/q

🔍 Proof Method: Proof by Contradiction

We'll assume √2 IS rational, and show this leads to a logical impossibility

📝 Detailed Proof

1

Assumption (to be contradicted)

Assume √2 is rational

Then we can write: √2 = p/q where p, q ∈ ℤ, q ≠ 0

Important: We assume p/q is in lowest terms (i.e., gcd(p, q) = 1)

2

Square both sides

$$\sqrt{2} = \frac{p}{q}$$ $$2 = \frac{p^2}{q^2}$$ $$p^2 = 2q^2$$
3

Deduce that p is even

From p² = 2q², we see that p² is even

Fact: If p² is even, then p must be even

(Because the square of an odd number is always odd)

Therefore, we can write: p = 2k for some integer k

4

Substitute p = 2k

$$p^2 = 2q^2$$ $$(2k)^2 = 2q^2$$ $$4k^2 = 2q^2$$ $$2k^2 = q^2$$
5

Deduce that q is even

From 2k² = q², we see that q² is even

Therefore, q must be even too

6

Contradiction!

We've shown that both p and q are even

This means they share a common factor of 2

But we assumed p/q was in lowest terms (gcd(p, q) = 1)!

This is a CONTRADICTION

Conclusion

Our assumption must be wrong

Therefore, √2 cannot be written as p/q

√2 is irrational

💡 Why This Works

The proof cleverly uses the uniqueness of prime factorization

When we square both sides, we create an equation where the left side has an odd power of 2, but the right side has an even power of 2

This is impossible if prime factorization is unique!

3.5 Famous Irrational Numbers

🎓 General Theorem

Theorem: If n is a positive integer that is not a perfect square, then √n is irrational

Proof: Similar to the proof for √2, using contradiction and prime factorization

3.6 Properties of Irrational Numbers

🔬 Key Properties

1. Decimal Expansion

Irrational numbers have infinite, non-repeating decimal expansions

√2 = 1.41421356237309504880168872420969807856967...

π = 3.14159265358979323846264338327950288419716...

These go on forever without ever repeating a pattern!

2. Rational vs Irrational Decimals

Rational Numbers
Irrational Numbers

Terminating or repeating decimals

1/4 = 0.25 (terminates)

1/3 = 0.333... (repeats)

22/7 = 3.142857142857... (repeats)

Non-terminating, non-repeating decimals

√2 = 1.414213... (never repeats)

π = 3.141592... (never repeats)

e = 2.718281... (never repeats)

3. Closure Properties

✓ Rational + Rational
= Rational
✗ Rational + Irrational
= Irrational

Example: 1 + √2 is irrational

? Irrational + Irrational
= Could be either!

√2 + √2 = 2√2 (irrational)

√2 + (-√2) = 0 (rational)

4. Density Property

Like rationals, irrational numbers are also dense

Between any two real numbers, there exist:

  • Infinitely many rational numbers
  • Infinitely many irrational numbers

Surprising fact: Despite being dense, rational numbers are "countable" while irrational numbers are "uncountable" (covered in later topics)

3.7 Understanding Decimal Expansions

🔢 How to Identify Number Types

Given a decimal expansion

Does it terminate?

Yes →

RATIONAL

Examples: 0.5, 0.75, 3.125

No →

Does it repeat?

Yes →

RATIONAL

Examples: 0.333..., 0.142857142857...

No →

IRRATIONAL

Examples: √2, π, e

📊 Detailed Examples

Terminating Decimals (Rational)

0.5 = 1/2
0.125 = 1/8
3.75 = 15/4

Repeating Decimals (Rational)

0.333... = 1/3
0.142857142857... = 1/7
0.181818... = 2/11

Non-repeating Decimals (Irrational)

√2 = 1.414213562373095048801688724209698078569671875376948073176...

No pattern ever repeats

π = 3.141592653589793238462643383279502884197169399375105820974...

Goes on forever without repeating

🏃 Practice Problems

Problem 1: Identifying Number Types

Classify each of the following as rational or irrational:

(a) √16 (b) √7 (c) 0.125 (d) 0.121212... (e) π/2

Problem 2: Proof Practice

Using a proof similar to √2, prove that √3 is irrational.

Problem 3: Decimal Expansions

Which of the following decimal expansions represent rational numbers?

(a) 0.123123123... (b) 0.123456789101112... (c) 2.5000... (d) 0.1011011101111...

Problem 4: Operations with Irrationals

Determine whether each result is rational or irrational:

(a) √2 + 3 (b) √2 × √8 (c) √5 + (-√5) (d) 2√3

Problem 5: Geometric Application

A square has diagonal length 10. What is the side length? Is it rational or irrational?

🔑 Key Takeaways

  • Real numbers (ℝ) include all rational and irrational numbers
  • Irrational numbers cannot be expressed as fractions p/q
  • √2 is irrational - proven by contradiction using the uniqueness of prime factorization
  • Decimal test: Irrational numbers have infinite, non-repeating decimal expansions
  • Famous irrationals: √n (n not perfect square), π, e, φ
  • Historical importance: Discovery of irrationals shattered Pythagorean beliefs
  • Hierarchy: ℕ ⊆ ℤ ⊆ ℚ ⊆ ℝ
  • Density: Both rationals and irrationals are dense in the real numbers