Rational numbers and the line
Fractions in lowest terms, how to list all of them in a single sequence, and how they are placed as points on a line.
Why this matters
Hardy begins with the numbers everybody already trusts: the fractions. Before he can show that they are not enough (next lesson), he fixes exactly what they are, how each one can be written in a standard way, and how they sit on a straight line. Two ideas from these first pages return again and again: a number has many names but one standard name, and an infinite collection can sometimes be arranged in a single list.
The idea
A rational number is a fraction of two integers with . The same number has many names: . Hardy removes the ambiguity with two conventions. Cancel every common factor of and , and make the denominator positive (by changing the sign of both, if necessary). What is left, with and no common factor, is the number’s lowest terms. Zero is the rational number with , written .
There are infinitely many fractions, and between any two of them there are infinitely many more, so it is surprising that they can all be written in one list, first, second, third, and so on, with none left out. The trick (Hardy’s Examples I, 4) is to arrange the positive fractions in a square grid, across and down, and to read the grid along the diagonals on which is constant. Each diagonal is finite, so every fraction is reached after finitely many steps.
Try this. Press “Walk the list” and watch the order: , , , , … Then use the and steppers to jump to and to , and read off their places in the list. Finally switch on “skip repeats”.
- the list so far
- current term
What to notice
The fraction is the -th entry of the diagonal , and the earlier diagonals hold entries. So its place is : for that is . Every number occurs infinitely often (); skipping the fractions that are not in lowest terms leaves each number exactly once, but then no simple formula gives its place.
The second idea is geometric. Draw a straight line, mark a point (the origin) and a point to its right, and take the length as the unit. To place with , divide the unit into equal parts and step of them to the right of . For a negative number step the same distance to the left. Lengths now carry a sign: measured to the right they count as positive, to the left as negative, so that .
Precise statements
A rational number is a number where and are integers and . It is in lowest terms when and , have no common factor greater than . The rational number is .
Every rational number can be written as in lowest terms, and in only one way.
If and are rational, so are , , , and, when , .
Fix a line , an origin and a unit point . For each rational the rational point is the point with signed length ; with this reads . Then for all rational , and lies to the left of exactly when .
Proofs
Existence is a matter of cancelling. For uniqueness, suppose two lowest-terms forms name the same number, cross-multiply, and use the fact that a number dividing a product, and sharing no factor with one of its factors, must divide the other.
Existence
Start from any . If , replace by ; this does not change the number. Let be the greatest common divisor of and and replace them by and . These have no common factor greater than , and the quotient is unchanged.
Suppose , both in lowest terms
Then . So divides .
Then divides , and divides
Since has no factor in common with , every prime power dividing must divide (this is Euclid’s lemma, or unique factorisation into primes). So . The same argument with the roles exchanged, starting from , gives .
Conclude and
Two positive integers that divide each other are equal, so , and then gives .
The closure theorem is a calculation. If and , then
and each right-hand side is a quotient of integers with a non-zero denominator. Notice what this means: no amount of adding, subtracting, multiplying and dividing fractions can ever lead outside the fractions. If a new kind of number is needed, it will have to come from some other operation. In the next lesson that operation is taking a square root.
Worked examples and exercises
Let be positive rationals with . Show that , and are positive rationals, and that they are the sides of a right-angled triangle. Use this to produce as many right-angled triangles with rational sides as you like.
Hint
Solution
All three are built from by , so they are rational; they are positive because and . Expanding,
and multiplying by gives the same identity for the three given numbers. By the converse of Pythagoras’ theorem they are the sides of a right-angled triangle, with hypotenuse . With : gives ; gives ; gives . Every choice gives a triangle, so there are as many as we please.
Show that a terminating decimal is a rational number whose denominator (in lowest terms) has no prime factors other than and , and conversely that every such rational number is a terminating decimal, in only one way.
Hint
Hint
Solution
Decimal to fraction. A decimal with figures after the point equals for an integer . When this is reduced to lowest terms , the denominator divides , so its only prime factors are and .
Fraction to decimal. Let be in lowest terms with , and put . Then
an integer divided by , which is a decimal with at most figures after the point.
Uniqueness. Suppose two terminating decimals are equal. Pad the shorter one with zeros so that both have figures after the point; they are then and , so , and the strings of digits agree (apart from the trailing zeros we added). So the representation is unique once we agree not to write trailing zeros.
List the positive rationals as Show that is term number . Which fraction is term ?
Hint
Hint
Solution
The blocks have terms, and inside block the term with denominator is the -th. The fraction is in block , which is preceded by blocks of total length
Adding its position inside the block gives the formula.
For term : blocks hold terms, so term is the th term of block , which has , . Term is . Check: .
Using the rule for every rational (positive or negative) and the convention , show that .
Hint
Solution
Signed lengths along one line add: , whichever order the three points are in. Now and , so . In particular the distance between the points is , and is to the right of exactly when .
Check yourself
Which of these is in lowest terms, in Hardy’s sense?
Lowest terms needs two things: no common factor, and a positive denominator. has the common factor and a negative denominator; and have negative denominators. All four name either or , and is written .
In Hardy’s list , what is the position of ?
Here . The blocks hold terms, and is the 3rd term of the block (the one with ). So it is term , as the formula says. A common slip is to count the block of itself among the earlier ones.
Since the rationals are closed under , every number you can compute from fractions is rational.
False. Closure covers only the four operations. Other operations, such as taking a square root, can lead out of the rationals: the next lesson shows that no fraction squares to .
In Hardy’s list every positive rational number appears infinitely often.
True. The number appears as , , , …, and each of these is in the list. That is why Hardy remarks that omitting the repeats makes the position formula harder.
Hardy’s language
they are illustrations and nothing more, and are employed merely for the sake of clearness of exposition.
Hardy means the geometry: pictures of points on a line help us think, but no proof in the book depends on them. This is why he can later define the real numbers without any geometry at all.
Summary
- A rational number is with integers , ; it has exactly one lowest-terms form, with and no common factor.
- The rationals are closed under : arithmetic alone never produces anything new.
- The positive rationals can be listed in a single sequence by running along the diagonals constant; is term .
- Each rational has a point on a line at signed distance from the origin. Geometry is used for illustration only.