The Rational Numbers

A track of P82 · From Counting to the Rationals.

From counting to fractions: the natural numbers, the integers and the rationals, each answering an equation the set before it cannot, the density of the fractions, and decimals that stop or repeat exactly when they are fractions.

Ask a calculator for 1 ÷ 3 and it shows 0.3333333, which is not one third: it is a little less, cut off where the screen ends. Python's Fraction keeps one third exactly, as the pair (1, 3). This track is about that exact object, the rational number, and about the two earlier sets of numbers it grows out of.

It starts from counting. The natural numbers 0, 1, 2, … answer "how many?", but not "what added to 3 gives 1?", so the integers add the negative numbers. The integers answer that, but not "what times 3 gives 1?", so the rationals add the fractions. Each step is driven by an equation, and that is the habit the whole discipline keeps: a new kind of number is introduced only when an old question has no answer.

The track then looks closely at fractions themselves. Two fractions are the same number when a cross-multiplication says so; every fraction has one form in lowest terms; and between any two fractions there is always another, which you will compute rather than take on trust. The first lesson ends on a warning that carries through all of algebra: a false proof that 1 = 2 hides a division by zero, and you will find the broken line by evaluating every step with numbers.

The second lesson comes after a detour: you reach it once the irrational numbers track has proved that √2 is not a fraction and the transcendental numbers have been met. It turns to decimals. Long division is a machine with only finitely many remainders, so the decimal of every fraction either stops or falls into a block that repeats for ever: 1/7 = 0.142857142857…. Run the machine backwards and every repeating decimal turns into a fraction, which is also why 0.999… is exactly 1. So the decimal of √2 never repeats, and the irrational numbers track picks up there: its real line says what such a decimal is.

Countthe natural numbersOwethe integersSharethe fractionsalways another fractionBetweenalways anotherfractionDecimalsstop or repeat
From counting to the dense line of fractions, one equation at a time, and the decimals that tell the fractions apart.
The Rational Numbers — TransformerLab