Mathematics · Foundations · Number Systems

The Story of Numbers

History & Origins Integers, Fractions & Decimals Primes & Factors Visual Proofs Clock Math Why ÷ 0 Breaks Everything

Before algebra, geometry, or calculus — there were numbers. Humans have been counting, trading, and building with numbers for over 30,000 years. This lesson traces that story, introduces the different kinds of numbers, and uses visual proofs to show why the rules work.

ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ One expanding universe Counting numbers sit inside integers; integers sit inside rational numbers; rational and irrational numbers together form the real line.

Where Numbers Come From

Tally bones to binary — the milestones that built today's number system over 30,000 years.

Numbers weren't invented all at once. They evolved over thousands of years, each civilisation adding another piece. Here are the biggest milestones:

  • ~30,000 BC
    Lebombo Bone
    Lebombo Bone
    Counting
    Tally bones. The Lebombo Bone found in Swaziland has 29 notches carved into it — likely a counting tool or lunar calendar. Humans were tracking quantities before writing fully existed.
  • ~3,000 BC
    Babylonian base-60 tablet
    Babylonian base-60 tablet
    Place Value
    Babylonian base-60. The Babylonians counted in groups of 60 — which is why we still have 60 seconds in a minute and 360° in a circle. They were also early pioneers of place-value notation.
  • ~300 BC
    Euclid
    Euclid
    Proof & Primes
    Greek number theory. Euclid proved there are infinitely many prime numbers. The Greeks had no symbol for zero — they considered it philosophically absurd to have a "number of nothing."
  • 628 AD
    Brahmagupta
    Brahmagupta
    The Concept of Zero
    Zero becomes a number. Indian mathematician Brahmagupta was the first to treat zero as a real number with arithmetic rules — including what happens when you add, subtract, and multiply with it. Revolutionary.
    Concept Brahmagupta's framing
    Positive numbers "Property" or fortune
    Negative numbers "Debt"
    Zero Nothing / void
  • ~1200 AD
    Liber Abaci manuscript
    Liber Abaci manuscript
    Base-10 System
    Hindu-Arabic numerals reach Europe. Fibonacci's Liber Abaci introduced Europeans to the 0–9 system we use today. Before this, Europe used Roman numerals — try doing long division with IV, XII, and XLVIII.
  • Today
    Binary Logic
    Binary powers the world. Every computer runs on just two digits: 0 and 1. Every image, video, and message you send is ultimately a very long sequence of zeros and ones.

Each civilisation didn't just invent new symbols — it invented a new kind of number the previous one couldn't express. The Babylonians needed place value to write large quantities; Brahmagupta needed zero to write "nothing" and "debt"; Fibonacci's Hindu-Arabic digits made arithmetic fast enough for trade. That expansion didn't stop — it's the same expansion you're about to explore below.

The Number System

Integers, fractions, decimals, and ratios — the families every number belongs to, with a lab for each.

Every number on that timeline still exists today, sorted into families. Mathematics organises them by what they can express — and knowing which family a number belongs to tells you a lot about how it behaves. Click any card to learn more.

Select a number type above to explore it.
Integers Lab

Integers = whole counting numbers

Integers are whole numbers. We use them to count steps, blocks, apples, and days.

0, 1, 2, 3, 4, 5...
Mode
Count by
Negatives work too!
10 jumps
Build the pattern one step at a time.
10 ten
Level 1 Counting by 1s Showing 11 values
Try counting by 5s. What pattern do you notice?
Fractions Lab

Fractions — The Partition Lab

A fraction shows how a whole is split into equal parts.

Mode
Shape
4 equal parts
3 parts filled
Fill pieces one by one.
Same amount, same whole, just a different cut.
3/4 three fourths
Level 2 3 of 4 parts Value 0.75
How many equal parts is the whole split into? How many are filled?
Decimals Lab

Decimals — The Place Value Lab

Decimals show parts of a whole using tens.

Mode
Precision
0.25
0.25 twenty-five hundredths
25 hundredths 2 tenths 25/100
How many hundredths are filled?
Ratios Lab

Ratios — The Comparison Lab

A ratio compares two quantities.

Mode
Theme
3
5
Show the simplest same relationship.
3 : 5 three to five
Level 2 Simple form 3 : 5 Colors
For every 3 red blocks, there are 5 blue blocks.
How many red for every blue?
💡
These families nest inside each other. Every integer is also a fraction (5 = 5/1), and every terminating fraction is also a decimal (¼ = 0.25). Numbers are more related than they first appear.

Prime Numbers

The atoms of math: numbers with no factors but 1 and themselves — try the sieve.

Integers were the first family you met above — now zoom into just one piece of that family: the whole numbers greater than 1. Some of them can be broken into smaller factors; some can't. A prime number is a whole number greater than 1 that can only be divided evenly by 1 and itself. That makes primes the "atoms" of mathematics — every other whole number is built from primes multiplied together.

⚗️
Fundamental Theorem of Arithmetic: Every integer greater than 1 is either prime, or can be written as a unique product of primes. Example: 60 = 2 × 2 × 3 × 5. There is only one way to do this factorisation. Primes are irreducible — the atoms of numbers.
Click a number or run the sieve.
Prime
Composite
1
Click any number above to see its factors.
▶ Why primes matter

Encryption: When you buy online, your card is protected because factoring a huge number back into primes is computationally impossible — a 2048-bit key uses a ~600-digit number no computer can crack.

Nature: Cicadas emerge on 13- or 17-year prime cycles to minimise overlap with predator population spikes. Nature discovered primes before mathematicians did.

Factors & Multiples

Two sides of the same coin — enter any number and see what divides it.

Primes are the atoms — factors and multiples are how you find them inside any other number. The two ideas are two sides of the same coin, and understanding them makes fractions, algebra, and even music theory much easier.

Factors
Factors of 12: 1, 2, 3, 4, 6, 12
Numbers that divide evenly into a given number. The "ingredients" of a number.
Multiples
Multiples of 4: 4, 8, 12, 16, 20…
What you get by multiplying a number by 1, 2, 3… They go on forever.

Factor Finder

Enter any number (2–10,000) to see all its factors and its prime factorisation.

🎵
Factors in music: A guitar string vibrates not just at its base frequency, but at all whole-number multiples of it (harmonics). That's why a piano and a guitar playing the same note sound different — it's which multiples dominate the sound.
Open-textbook proof studio

Don’t just trust the rule. See why it must be true.

Four classic results, proved from scratch: primes never end, √2 isn't a fraction, and more.

You've now met primes, factors, fractions, and decimals as facts to use. This section asks a harder question: how do we know those facts are true? A proof is a chain in which every link can be checked. Open each argument, follow the picture, and look for the moment where the opposite claim becomes impossible.

P1 Primes never run outEuclid’s contradiction, rebuilt visually
A new number built from a supposedly complete list of primes The primes 2, 3, 5, and 7 are multiplied and one is added to make 211. Division by every listed prime leaves remainder one. 2 3 5 7 2 × 3 × 5 × 7 + 1 = 211 remainder 1 every time The “complete” list cannot be complete.
  1. Suppose there are only finitely many primes. Put every one of them in a list.
  2. Multiply the whole list and add 1: N = p₁ × p₂ × … × pₙ + 1.
  3. Dividing N by any listed prime leaves remainder 1, so none of those primes divides it.
  4. But every integer greater than 1 has a prime factor. That factor is missing from the supposedly complete list.
Therefore: no finite list can contain every prime. There are infinitely many primes. N itself does not have to be prime; it only needs a new prime factor.
Open textbook source: LibreTexts, The Infinitude of Primes ↗
P2 √2 cannot be a fractionA parity contradiction
A unit square whose diagonal has length square root of two A square with side lengths one has a diagonal labeled square root of two. An algebra trail shows that assuming the diagonal is a reduced fraction forces both numerator and denominator to be even. √2 1 1 √2 = a/b (lowest terms) a² = 2b² → a is even then b is even too — contradiction
  1. Assume √2 = a/b, where a/b is already reduced to lowest terms.
  2. Square both sides: a² = 2b². So a² is even, which means a is even.
  3. Write a = 2k. Substitution gives 4k² = 2b², so b² = 2k². Therefore b is even too.
  4. If both are even, the fraction was not in lowest terms. That contradicts the starting assumption.
Therefore: √2 cannot equal a ratio of integers. It is irrational.
Open textbook connection: OpenStax, Rational and Irrational Numbers ↗
P3 Repeating decimals are rationalShift, subtract, reveal the fraction
Converting repeating decimal 0.2727 to a fraction The equation x equals 0.2727 repeating is multiplied by one hundred and subtracted from the original to leave 99x equals 27. x=0.272727… 100x=27.272727… 99x=27 x = 3/11
  1. Let x = 0.272727…. The repeating block has two digits.
  2. Multiply by 100 to shift one complete block: 100x = 27.272727….
  3. Subtract the original equation. The infinite tails match exactly and disappear: 99x = 27.
  4. Divide: x = 27/99 = 3/11.
Therefore: a repeating decimal can be written as a fraction, so it is rational. The same shift-and-subtract idea works for any repeating block.
Open textbook source: OpenStax, Rational and Irrational Numbers ↗
P4 Why the denominator cannot be zeroDivision must undo multiplication
Division by zero fails its multiplication check Ten divided by two gives five because two times five returns ten. Ten divided by zero has no answer because zero times any proposed answer remains zero. Zero divided by zero has too many possible answers. 10 ÷ 2 = 5 2 × 5 = 10 one answer ✓ 10 ÷ 0 = ? 0 × ? = 10 no answer ✕ 0 ÷ 0 = ? 0 × ? = 0 every answer ✕
  1. a ÷ b = q must mean b × q = a. Multiplication checks the quotient.
  2. For 10 ÷ 0, we would need a number q with 0 × q = 10. No such number exists.
  3. For 0 ÷ 0, every number passes because 0 × q = 0 for all q. Division requires one determined answer, not every answer.
Therefore: division by zero is undefined: nonzero ÷ 0 has no solution, while 0 ÷ 0 is indeterminate because it cannot select a unique solution.
Open textbook connection: OpenStax, Visualize Fractions ↗

Modular Arithmetic — Pattern Math

Clock math: numbers that wrap around instead of counting forever — drag the multiplier to make string art.

The proofs above showed numbers behaving in fixed, provable ways. Modular arithmetic bends that a little: instead of counting forever in one direction, numbers wrap around and repeat — like a clock face. Clock math is just the beginning. When a number wraps around a circle and gets multiplied again and again, modular arithmetic turns into geometry. The result is string art made from pure remainders.

🔢
15 mod 12 = 3 — divide 15 by 12, the remainder is 3.
Written as: a mod n = the remainder when a is divided by n.

Modular String Art

Pick how many points live on the circle and how fast the multiplier changes. At multiplier 2, the pattern forms a cardioid. At 3, a nephroid appears. Arithmetic becomes visible. Set speed to 0 to freeze on any shape — then drag the multiplier slider to explore by hand.

Rule: x → (x × m) mod n
Family: Cardioid threshold
x → (x × 2.00) mod 180

At multiplier 2, every point connects to double itself around the circle. The repeated wraparound makes a heart-like cardioid.

This is why modular arithmetic matters in computer graphics, music sequencing, cryptography, and digital pattern design: the same remainder rule can create rhythm, symmetry, and structure.

Mod in the Real World

🔐 Cryptography
RSA encryption — the system behind HTTPS — is built almost entirely on modular arithmetic with huge primes. Try it yourself in the Cryptography & The Enigma lesson.
📅 Calendars
Day of the week is mod 7. "300 days from Tuesday?" — 300 mod 7 = 6, so 6 days after Tuesday = Monday.
🎮 Game Loops
Animation frame index = current_frame mod total_frames. The animation wraps seamlessly without any if-statements.
📦 Hash Tables
Computers store data using mod: slot = hash(item) mod table_size. Every dictionary in code uses this.

The Infinite Zoom Number Line

Between any two fractions there's always another — zoom in forever and see why.

Modular arithmetic wraps numbers into a loop; this number line does the opposite — it keeps unfolding. Between 0 and 1 there is no “next” fraction. Zoom in and the line keeps revealing new rational waypoints: halves, quarters, eighths, sixteenths. Density is the point.

Window: 0.0000 → 1.0000 Resolution: halves

Each zoom step halves the window around the centre. New fractions appear because number lines are not made of isolated pebbles; they are dense with structure.

Why Division by Zero Is Undefined

The one operation math refuses to define — drag the divisor toward zero and watch why.

You just watched the number line zoom in forever without ever running out of room. This section asks what happens at the one place division genuinely breaks. Every rule in mathematics exists for a reason — and nowhere is this clearer than the rule you've probably heard since primary school: you cannot divide by zero.

Division asks for the number that reverses a multiplication. So 10 ÷ 2 = 5 because 2 × 5 = 10. But 10 ÷ 0 would require some answer q for which 0 × q = 10. Every product with zero is zero, so that answer does not exist.

Watch What Happens

Drag the divisor toward zero. Watch the result grow without bound.

2.00
10 ÷ 2.00
= 5.00
⚠️
Why cancellation stops at zero: Since 0 × a = 0 × b for any a and b, cancelling the zero would falsely imply that a = b for all numbers. The cancellation rule requires a nonzero factor; allowing zero would erase the information that distinguishes one number from another.
💻
Programming connection: Software checks a denominator before dividing. A safe program handles b === 0 as a separate case instead of inventing a quotient. That guard prevents invalid values from spreading through later calculations.
Read, inspect, reuse

Open Textbook Shelf

Where the definitions, visual models, and proofs above actually came from.

Before you test what you've learned, here's where the definitions, visual models, and proofs above actually came from. These free chapters support this lesson — follow a cover to see the original diagrams, worked examples, exercises, author credits, and full license information.

Attribution note: Proof wording and SVG diagrams on this page are original classroom reconstructions informed by the linked sources; they are not copied textbook figures. OpenStax attribution: Marecek, Anthony-Smith, and Mathis, Prealgebra 2e, OpenStax (2020). License details are published in the book’s preface.

Practice Problems

Five questions pulling together everything from this lesson.

You've traced numbers from tally bones to zero to the density of the number line. Now put it to work — five questions pulling from every idea in this lesson.

Score 0 / 5

1. What is the smallest prime number?

Hint: remember — 1 is not prime. The smallest prime is the first number divisible only by 1 and itself.

2. How many factors does 24 have? (count them all)

Hint: factors of 24 are 1, 2, 3, 4, 6, 8, 12, 24 — count them.

3. What is 17 mod 5?

Hint: 5 goes into 17 three times (= 15). What's left over?

4. Convert the fraction ¾ to a decimal.

Hint: divide 3 by 4.

5. It is 9 o'clock. What time will it be in 50 hours? (give a number 1–12)

Hint: (9 + 50) mod 12 = 59 mod 12. 12 × 4 = 48, so 59 − 48 = ?