Chapter I · Real variables

Irrational numbers and sections

§§3–7 45 min

The rationals are dense but full of holes; Hardy splits them into two classes at each hole and takes the split itself as the new number.

Why this matters

The diagonal of a unit square has a length xx with x2=2x^2 = 2, yet no fraction squares to 22. So if numbers are only fractions, some perfectly good lengths have no number. These sections are Hardy’s response. He first shows how badly the fractions fail (they are packed densely along the line, but there is a hole wherever 2\sqrt2 should be), and then makes the key move of the chapter: describe the hole by the way it splits the fractions into a left part and a right part, and call that split a number.

The idea

Dense, but full of holes

The rational points are everywhere on the line: any segment, however short, contains infinitely many of them. Yet that does not mean they fill the line. Zoom in on the place where 2\sqrt2 ought to be. With denominators up to QQ you will find fractions very close to it, and raising QQ brings them closer, but at every magnification there is still empty space around the target.

Explore Zoom into the rationals and look for 2\sqrt2

Try this. Press “Zoom towards √2” and let it run for a while, then pause. Raise QQ to fill the view with fractions again, and zoom further. Try to make a fraction land exactly on the mark.

Fractions p/qp/q with q≤12q \le 12, and the target √2
00.20.40.60.81.01.21.41.61.82.0√2
  • fractions p/q, q ≤ 12
  • √2
width of view: 2
93 fractions with denominator ≤ 12 in view. Closest to √2: 1712\tfrac{17}{12}, off by 0.0025. Nearest ones in view are 0.014 to the left and 0.0025 to the right: none hits √2 exactly.
What to notice

Raising QQ always puts fractions close to 2\sqrt2, on both sides: the rationals are dense. But zooming always reopens a gap around the mark: no fraction is ever at 2\sqrt2. Closeness is cheap; hitting the point is impossible, and the next theorem proves it.

A split with nothing at the join

Since no rational squares to 22, every positive rational xx has either x2<2x^2 < 2 or x2>2x^2 > 2. Call the first kind the lower class LL and the second kind the upper class RR. Every member of RR is larger than every member of LL. Two further facts make this split remarkable:

  • LL has no greatest member: whatever member of LL you name, there is a larger one. Likewise RR has no least member.
  • Members of LL and of RR can be found as close together as we please.

The first fact is something you can play with. Starting from any positive fraction xx, the fraction (2x+2)/(x+2)(2x+2)/(x+2) lies on the same side of the gap and strictly closer to it.

Explore Chase the gap from either side

Try this. Start from 11 (that is, p=q=1p = q = 1) and apply the map several times. Then start from a member of RR, such as 32\tfrac32, and do the same. Look at the column x2−2x^2 - 2.

Start anywhere, then apply x↦2x+2x+2x \mapsto \dfrac{2x+2}{x+2}
1.251.301.351.401.451.504/3gap
  • in L (x² < 2)
  • in R (x² > 2)
  • the gap between L and R
1 step
stepxdecimalx2−2x^2 - 2class
0111.0000000000−1-1L
143\tfrac{4}{3}1.3333333333−29-\tfrac{2}{9}L
From 11 the map gives 43\tfrac{4}{3}, which is larger and still in L: the identities x′−x=2−x2x+2x' - x = \dfrac{2 - x^2}{x+2} and x′2−2=2(x2−2)(x+2)2x'^2 - 2 = \dfrac{2(x^2-2)}{(x+2)^2} show that a member of L is always followed by a larger member of L. Distance to the gap now about 0.081. However often you press, you never land on the gap: L has no greatest member.
What to notice

From a member of LL the map always produces a larger member of LL; from a member of RR, a smaller member of RR. The values of x2−2x^2 - 2 keep their sign and shrink (by a factor of about 66 each time), so the chase goes on for ever: LL has no greatest member and RR no least. From 11 the chain is 43,75,2417,4129,…\tfrac43, \tfrac75, \tfrac{24}{17}, \tfrac{41}{29}, \dots; every second one (75,4129,239169,…\tfrac75, \tfrac{41}{29}, \tfrac{239}{169}, \dots) is one of Hardy's approximations in Examples III.

So the line of rationals has a “cut” at 2\sqrt2 with no rational sitting in it. Common sense says there should be a number there. Hardy’s idea, borrowed from Dedekind, is to stop asking what that number is and to use the cut itself: the pair of classes (L,R)(L, R) carries all the information a number at that place could possibly carry. Every other rational is placed to the left or to the right of it, and its position is pinned down as tightly as we like.

Explore Squeeze the cut between decimals

Try this. Add decimal places one at a time and watch the two decimals that bracket the gap. Test fractions of your own: is 1712\tfrac{17}{12} in LL or in RR? What about 4129\tfrac{41}{29}? Then switch to the cut labelled 1/21/2.

L={x:x≤0 or x2<2}L=\{x : x \le 0 \text{ or } x^2 < 2\}, R = all other rationals
Cut
LR1.2501.3001.3501.4001.4501.5001.5501.6001.6501.41.5
  • L (lower class)
  • R (upper class)
  • gap not yet sorted
  • your fraction
With 1 decimal place: 1.4 is in L and 1.5 is in R; the gap between them has width 0.1. Your fraction 1712\tfrac{17}{12} ≈ 1.4166667 is in R.
Neither class has an end member: whatever rational you name in L, a larger one is still in L, and whatever you name in R, a smaller one is still in R. The cut defines a new number, √2, sitting in the gap.
What to notice

For 2\sqrt2 the bracket shrinks by a factor of 1010 each time but never closes on a fraction. For the cut at 12\tfrac12 the fraction 12\tfrac12 itself is the least member of RR: a cut at a rational has an end member, and a cut at a hole does not.

Precise statements

Theorem The rationals are dense Hardy: §3

Every segment BCBC of the line, however short, contains infinitely many rational points.

Theorem Which fractions are squares of rationals Hardy: §3

Let m/nm/n be a positive fraction in lowest terms. There is a rational number whose square is m/nm/n only if mm and nn are both perfect squares. In particular no rational number has square 22, and an integer that is the square of a rational is the square of an integer.

Definition Section of the rationals Hardy: §6

Let PP and QQ be two properties such that every positive rational number has exactly one of them, and every number with PP is less than every number with QQ. If both properties actually occur, the numbers with PP form the lower class LL, those with QQ the upper class RR, and the pair (L,R)(L, R) is a section of the positive rational numbers.

Theorem The three kinds of section Hardy: §6

For a section (L,R)(L, R) exactly one of the following holds: (i) LL has a greatest member; (ii) RR has a least member; (iii) LL has no greatest member and RR no least.

In cases (i) and (ii) the section is at a rational number aa (the end member). Conversely each positive rational aa gives exactly two sections, L={x:x≤a}L = \{x : x \le a\} and L={x:x<a}L = \{x : x < a\}, differing only in where aa goes. To have one section per number, Hardy agrees always to put the rational itself in the upper class. With that convention:

Definition Positive real number (provisional) Hardy: §7

A section of the positive rational numbers in which both classes exist and the lower class has no greatest member is a positive real number. A positive real number that does not correspond to a positive rational number in this way is a positive irrational number.

The section by x2<2x^2 < 2, x2>2x^2 > 2 is a positive irrational number; we call it 2\sqrt2. In the next lesson the definition is extended from positive rationals to all rationals, which brings in zero and the negative numbers.

Proofs

Hardy’s proof of density uses one assumption about lengths, the axiom of Archimedes: for any segment BCBC there is a whole number kk with k⋅BC>1k \cdot BC > 1.

Proof Every segment contains infinitely many rational points
Strategy

Cut the unit into kk equal pieces, each shorter than BCBC. A segment longer than every piece cannot fit between two neighbouring division points, so a division point, which is rational, falls inside it. Then repeat inside a smaller segment.

Reduce to a segment inside A1A2A_1A_2

Hardy takes BCBC inside A1A2A_1A_2 for definiteness; any other unit segment AnAn+1A_nA_{n+1} is handled in the same way, and if BCBC contains an integer point, shrink BCBC to a part of it that does not.

Choose kk with k⋅BC>1k \cdot BC > 1

This is the axiom of Archimedes. Then each of the kk equal parts of A1A2A_1A_2 has length 1/k<BC1/k < BC.

Some division point lies strictly inside BCBC

If none did, BCBC would lie entirely within one of the kk parts, and so would be no longer than 1/k1/k. That contradicts BC>1/kBC > 1/k. The division points are 1+j/k1 + j/k, which are rational.

Repeat to get as many as we please

Having found a rational point PP inside BCBC, apply the same argument to the segment BPBP to find a second one, then to the segment between BB and the second, and so on. Each step gives a new rational point of BCBC, so there are infinitely many.

Proof If (p/q)2=m/n(p/q)^2 = m/n in lowest terms, then mm and nn are squares
Strategy

Clear denominators and track the common factors. The hypothesis “no common factor” is used twice, once for p/qp/q and once for m/nm/n.

Clear denominators

Take p/qp/q in lowest terms. From p2/q2=m/np^2/q^2 = m/n we get np2=mq2np^2 = mq^2.

q2q^2 divides nn

q2q^2 divides np2np^2. Since qq has no prime factor in common with pp, it has none in common with p2p^2, so every prime power dividing q2q^2 divides nn. Hence n=λq2n = \lambda q^2 for some integer λ\lambda.

Then m=λp2m = \lambda p^2

Substitute into np2=mq2np^2 = mq^2: λq2p2=mq2\lambda q^2 p^2 = m q^2, so m=λp2m = \lambda p^2.

λ=1\lambda = 1

λ\lambda divides both mm and nn, which have no common factor; and λ>0\lambda > 0. So λ=1\lambda = 1, m=p2m = p^2, n=q2n = q^2.

The case m/n=2/1m/n = 2/1

11 is a square but 22 is not, so no rational squares to 22. Taking n=1n = 1 in general: if an integer mm is the square of p/qp/q then q2=1q^2 = 1, so p/qp/q is an integer.

Hardy also gives a second proof for 2\sqrt2 alone, by descent. If p2=2q2p^2 = 2q^2 with p/qp/q in lowest terms, then 1<p/q<21 < p/q < 2, so 0<p−q<q0 < p - q < q, and a line of algebra shows (2q−p)2=2(p−q)2(2q - p)^2 = 2(p - q)^2. So (2q−p)/(p−q)(2q - p)/(p - q) is the same fraction with a smaller denominator, which contradicts “lowest terms”.

Proof LL has no greatest member and RR no least
Strategy

Given a member xx of LL, exhibit a larger member. Hardy does it by showing that x2x^2 can be beaten by squares in LL as close to 22 as we please; the map in the second exploration does the same thing explicitly.

Members of LL and RR can be found as close as we please

Take any x0∈Lx_0 \in L, y0∈Ry_0 \in R and fill the gap between them with a chain of rationals whose consecutive terms differ by less than a given η>0\eta > 0. Walking along the chain, there is a last term in LL and the next term is in RR: they differ by less than η\eta.

Their squares are then close to 22

Take such x∈Lx \in L, y∈Ry \in R with y−x<14δy - x < \tfrac14\delta, both less than 22. Then y2−x2=(y−x)(y+x)<4(y−x)<δy^2 - x^2 = (y - x)(y + x) < 4(y - x) < \delta. Since x2<2<y2x^2 < 2 < y^2, both 2−x22 - x^2 and y2−2y^2 - 2 are less than δ\delta.

Beat any given member of LL

Let x∈Lx \in L and put δ=2−x2>0\delta = 2 - x^2 > 0. The previous step gives x1∈Lx_1 \in L with 2−x12<δ=2−x22 - x_1^2 < \delta = 2 - x^2, so x12>x2x_1^2 > x^2 and x1>xx_1 > x. So xx is not the greatest member of LL.

The same for RR

Symmetrically, for y∈Ry \in R put δ=y2−2\delta = y^2 - 2 and find y1∈Ry_1 \in R with y12−2<δy_1^2 - 2 < \delta; then y1<yy_1 < y.

Explicitly: if x>0x > 0 and x′=(2x+2)/(x+2)x' = (2x+2)/(x+2), then

x′−x=2−x2x+2,x′2−2=2(x2−2)(x+2)2,x' - x = \frac{2 - x^2}{x + 2}, \qquad x'^2 - 2 = \frac{2(x^2 - 2)}{(x+2)^2},

so x′x' is on the same side of 2\sqrt2 as xx, and nearer to it. That is a one-line proof of the same theorem.

Proof A section cannot have both a greatest lower member and a least upper member
Strategy

If both ends existed, the midpoint between them would be a rational number belonging to neither class.

Suppose ll is greatest in LL and rr is least in RR

Then l<rl < r, since every member of LL is less than every member of RR.

Look at 12(l+r)\tfrac12(l + r)

It is a positive rational with l<12(l+r)<rl < \tfrac12(l+r) < r. It is not in LL (it exceeds the greatest member ll), and it is not in RR (it is below the least member rr).

Contradiction

Every positive rational is in one of the classes. So the two ends cannot both exist, and the three cases of the theorem are the only possibilities.

Worked examples and exercises

Exercise ●○○ Hardy: Examples II, 1

Show that no rational number has its cube equal to 22.

Hint
Copy the proof for squares: suppose (p/q)3=2(p/q)^3 = 2 in lowest terms and clear denominators.

Solution

Suppose p/qp/q is in lowest terms and p3=2q3p^3 = 2q^3. Then q3q^3 divides p3p^3; since qq shares no prime with pp, this forces q=1q = 1, so p3=2p^3 = 2 for an integer pp. But 13=1<2<8=231^3 = 1 < 2 < 8 = 2^3, and no integer lies strictly between 11 and 22. (In the same way, a fraction in lowest terms is the cube of a rational only if its numerator and denominator are both perfect cubes: this is Examples II, 2.)

Exercise Gauss: rational roots are integers ●●○ Hardy: Examples II, 3

Show that an equation xn+p1xn−1+⋯+pn=0x^n + p_1x^{n-1} + \dots + p_n = 0 with integer coefficients and leading coefficient 11 cannot have a rational root that is not an integer, and that an integer root must divide pnp_n.

Hint
Let a/ba/b be a root in lowest terms with b>0b > 0. Substitute and multiply by bn−1b^{n-1}.
Hint
You get an/ba^n/b equal to an integer. When is a fraction in lowest terms an integer?

Solution

Substituting x=a/bx = a/b and multiplying by bn−1b^{n-1} gives

anb=−(p1an−1+p2an−2b+⋯+pnbn−1).\frac{a^n}{b} = -\left(p_1a^{n-1} + p_2a^{n-2}b + \dots + p_nb^{n-1}\right).

The right side is an integer. On the left, ana^n and bb have no common prime factor (any prime dividing ana^n divides aa), so an/ba^n/b is in lowest terms, and a fraction in lowest terms is an integer only if its denominator is 11. Hence b=1b = 1 and the root aa is an integer. Then an+p1an−1+⋯+pn−1a=−pna^n + p_1a^{n-1} + \dots + p_{n-1}a = -p_n, and aa divides the left side, so a∣pna \mid p_n.

Exercise ●○○ Hardy: Examples II, 5

Find the rational roots, if any, of x4−4x3−8x2+13x+10=0x^4 - 4x^3 - 8x^2 + 13x + 10 = 0.

Hint
By the previous exercise the only candidates are ±1,±2,±5,±10\pm1, \pm2, \pm5, \pm10.

Solution

Write f(x)f(x) for the left side. Then f(1)=12f(1) = 12, f(−1)=−6f(-1) = -6, f(2)=−12f(2) = -12, f(−2)=16+32−32−26+10=0f(-2) = 16 + 32 - 32 - 26 + 10 = 0, f(5)=625−500−200+65+10=0f(5) = 625 - 500 - 200 + 65 + 10 = 0, and f(−5)f(-5), f(±10)f(\pm10) are large and positive. So the rational roots are −2-2 and 55. Indeed f(x)=(x2−3x−10)(x2−x−1)f(x) = (x^2 - 3x - 10)(x^2 - x - 1), and the other two roots, 12(1±5)\tfrac12(1 \pm \sqrt5), are irrational.

Exercise Better and better approximations ●●○ Hardy: Examples III, 2–3

Show that if m/nm/n approximates 2\sqrt2, then (m+2n)/(m+n)(m + 2n)/(m + n) is a better approximation, with error of the opposite sign. Starting from 11, compute the next five approximations and 2−x22 - x^2 for each.

Hint
Put x=m/nx = m/n and x′=(x+2)/(x+1)x' = (x + 2)/(x + 1). Compute x′−2x' - \sqrt2 in terms of x−2x - \sqrt2.

Solution

With x′=(x+2)/(x+1)x' = (x+2)/(x+1),

x′−2=x+2−2x−2x+1=(1−2)(x−2)x+1.x' - \sqrt2 = \frac{x + 2 - \sqrt2 x - \sqrt2}{x + 1} = \frac{(1 - \sqrt2)(x - \sqrt2)}{x + 1}.

The factor (1−2)/(x+1)(1 - \sqrt2)/(x+1) is negative and, for x>0x > 0, has size (2−1)/(x+1)<0.42(\sqrt2 - 1)/(x+1) < 0.42. So the error changes sign and shrinks. From 11: 32,75,1712,4129,9970\tfrac32, \tfrac75, \tfrac{17}{12}, \tfrac{41}{29}, \tfrac{99}{70}, with 2−x22 - x^2 equal to 1,−14,125,−1144,1841,−149001, -\tfrac14, \tfrac1{25}, -\tfrac1{144}, \tfrac1{841}, -\tfrac1{4900}. In every case m2−2n2=±1m^2 - 2n^2 = \pm1: these are the solutions of Pell’s equation.

Exercise When the argument breaks ●○○ Hardy: Examples III, 5

Repeat the construction of this lesson with x2=4x^2 = 4 in place of x2=2x^2 = 2. What goes wrong?

Hint
Is every positive rational in one of the classes x2<4x^2 < 4, x2>4x^2 > 4?

Solution

The rational number 22 has 22=42^2 = 4, so it belongs to neither class: the two properties do not give a section at all. The repair is to put 22 into one of the classes, say the upper one (x2≥4x^2 \ge 4). Then RR has a least member, 22, and the section is the rational number 22, case (ii). The whole argument for x2=2x^2 = 2 depended on there being no rational with x2=2x^2 = 2.

Check yourself

Check yourself True or false?

Because every interval contains rational points, every point of the line is a rational point.

Why

False. Density says that rational points come arbitrarily close to every point; it does not say they are every point. The point at distance 2\sqrt2 from the origin is approached by fractions from both sides and is none of them.

Check yourself Choose one

Divide the positive rationals by: LL = those with x2≤9x^2 \le 9, RR = those with x2>9x^2 > 9. Which is true?

Why

32=93^2 = 9, so 33 is in LL, and it is the greatest member. RR has no least member: any y>3y > 3 has 12(3+y)\tfrac12(3 + y) in RR and smaller. Both ends can never exist together (their midpoint would be unclassified). Hardy’s convention would move 33 into RR, giving the same number 33 in case (ii).

Check yourself Choose one

In Hardy’s construction, what is the number 2\sqrt2?

Why

Hardy defines the number to be the section. Limits have not been defined yet (that is Chapter IV, and it needs real numbers to exist first), assuming a point exists is exactly what he wants to avoid, and there is no largest fraction with square less than 22: that is the point of the second exploration.

Check yourself Enter a number

For the approximation 1712\tfrac{17}{12} to 2\sqrt2, compute m2−2n2m^2 - 2n^2.

Why

172−2⋅122=289−288=117^2 - 2 \cdot 12^2 = 289 - 288 = 1. Dividing by 12212^2: (17/12)2−2=1144>0(17/12)^2 - 2 = \tfrac{1}{144} > 0, so 1712\tfrac{17}{12} is in the upper class RR, an approximation from above, and a very good one for so small a denominator. Getting −1-1 means the subtraction was done the wrong way round.

Hardy’s language

if we imagine the line to be made up solely of the rational points, and all other points (if there are any such) to be eliminated, the figure which remained would possess most of the properties which common sense attributes to the straight line

— G. H. Hardy, §3

The word that matters is “most”. The missing property is the one this lesson isolates: a split of the line into a left and a right part should happen at a point.

Summary

Summary
  • The rationals are dense (every segment holds infinitely many), yet no rational squares to 22; more generally m/nm/n in lowest terms is a rational square only if mm and nn are squares.
  • The condition x2<2x^2 < 2 splits the positive rationals into LL and RR with LL below RR, no greatest member of LL, no least member of RR, and members of each as close as we please.
  • A section has a greatest lower member, or a least upper member, or neither; never both.
  • Hardy defines a positive real number to be a section whose lower class has no greatest member; it is irrational when it does not correspond to a rational.