Workbench / Mathematics Book 1 Exercises: Arithmetic and Numbers
B1·12
The Real Number Line
Exercises for chapter 12: proving √2 and √3 irrational, which roots are rational, sums and products of irrationals, the gaps in the fractions and what completeness fills them with, listing the fractions and why the reals can't be listed, a rationality test from prime factors, bisection for any equation, ISO paper sizes, the interest rate hidden in an EMI, equal temperament in music, and senior exercises on comparing computed reals, storing shares exactly, and floats as keys.
Start here: how these exercises work
Write your answer in the box first; hints open one at a time as you write, and the solution a couple of minutes after the last hint. Theory is in your own words, practice and programs come with real output (Python 3.13), cumulative projects use chapters 1 to 12 together, what the chapter leaves out explains what it skips, and senior exercises put the ideas into designs and reviews.
Theory
T1. The proof that √2 is irrational, in your own words
Explain the proof to someone who knows what even and odd numbers are, and say exactly where "lowest terms" is used. Why doesn't finding better and better fractions (, ) count against the proof?
T2. Which square roots are rational?
Use unique prime factorisation to explain why is either a whole number or irrational, and apply it to , and .
T3. Dense but full of gaps
Explain how the fractions can be dense (another between any two) and yet leave gaps. Use the halving search for in your answer.
T4. Sums and products of irrationals
Prove that if is rational and not zero and is irrational, then and are irrational. Then give irrational and with rational, and with rational.
T5. Listing the fractions
Explain how all the positive fractions can be put in a single list, even though between any two there are infinitely many others. Why doesn't density stop it?
T6. Why Cantor's argument uses 4s and 5s
In the diagonal argument, why change each diagonal digit to 5 (or 4 if it was 5), rather than, say, adding 1 to it? What could go wrong with digits 0 and 9?
Practice and programs
P1. By hand
(a) Show and say whether it's rational. (b) Find two whole numbers that lies between. (c) Is rational? (d) Halve three times to trap . (e) How many floats are there between 4 and 8?
P2. A rationality test for square roots
Write sqrt_is_rational(n) from the prime factorisation (all exponents even) and check it against math.isqrt(n) ** 2 == n for every up to 100,000. How many rational square roots are there?
P3. Bisection for any equation
Write a general bisect(f, lo, hi) that finds where a continuous function crosses zero, and use it for , the golden ratio () and the solution of . Make it refuse an interval where doesn't change sign.
P4. Paper sizes and √2
ISO A-series paper has sides in the ratio and A0 has an area of 1 m², so folding in half keeps the shape. Compute A0 to A6 in millimetres two ways: exactly and then rounded, and as the standard does it (halve the previous size's long side and round down). Which differs, and why?
Cumulative projects (chapters so far: 01–12)
C1. The interest rate hidden in an EMI
Lenders quote an EMI; the rate behind it can't be isolated algebraically from the EMI formula (chapter 10, stage 10). Find it by bisection (chapter 12) and compare three offers for ₹10 lakh over 60 months, including a "0 %" dealer offer.
C2. Equal temperament
On a piano, each semitone multiplies the frequency by , an irrational number, so that twelve semitones make an exact octave (ratio 2). Compare the piano's fifths, fourths and thirds with the whole-number ratios (, , , ) that sound purest, measuring differences in cents (1200 per octave, a logarithmic scale), and explain why no tuning can make them all exact.
What the chapter leaves out
Dedekind cuts and Cauchy sequences
The chapter defines real numbers as infinite decimals. Mathematicians build them from fractions in ways that don't depend on base 10: a Dedekind cut splits all fractions into a lower and upper set (for : fractions whose square is below 2, or that are negative, against the rest), and the real number is the cut; a Cauchy sequence is a sequence of fractions that bunch together, and a real number is the limit they agree on. Both give the same real numbers, with the same completeness.
Algebraic and transcendental numbers
Numbers that solve whole-number polynomial equations (, , the golden ratio) are algebraic. The algebraic numbers are countable (there are countably many polynomials, each with finitely many roots), so by Cantor almost every real number is transcendental, yet proving that any particular number is transcendental is hard: and took until the 1880s, and is still unknown.
The continuum hypothesis
Is there a size of infinity strictly between the fractions' (countable) and the reals'? Cantor conjectured not (the continuum hypothesis). Gödel (1940) and Cohen (1963) showed that the standard axioms of mathematics can neither prove nor disprove it: it's independent of them, a rare example of a natural question that the usual rules can't settle.
Computable numbers
Turing's 1936 paper that founded computer science was titled "On computable numbers": a real number is computable if a program can output its digits to any requested precision. , and are; but there are only countably many programs, so almost all real numbers aren't computable. Floating point (finitely many values) is a further, practical restriction.
Senior exercises
S1. Comparing computed reals
The same length, , is computed four ways in a geometry library. Show which results are exactly equal, design the comparison the library should use, and explain the special case near zero.
S2. Storing shares that must add up
A co-ownership app stores each owner's share of a property. Three equal owners: show what happens with floats, with four-place decimals and with fractions, and recommend a representation.
S3. Floats as dictionary keys
A data pipeline deduplicates measurements by using float values as dictionary keys, and also counts missing values recorded as NaN. Explain the output, and design the keys.