Real Numbers

Unit 2 · Algebra · 4 teaching hours · 22 min read

Real Numbers

What the syllabus asks for 3
  • Geometric representation of real numbers
  • Interval
  • Absolute value

Every number you will use this year — every coordinate, every limit, every root — is a real number. This short unit pins down what that means: how the real numbers fill a straight line with no gaps, how to name a stretch of that line (an interval), and how to measure distance along it (absolute value). Intervals and absolute values then reappear constantly as domains, ranges and error bounds, so the notation must become automatic.

What the exam asks for

Expect one Group A mark on interval notation or on |x|, and a Group B question that is almost always one of three things: convert a recurring decimal to a fraction, represent a surd such as \sqrt{5} on the number line by construction, or solve an absolute-value equation or inequality and show the answer as an interval.

2.1 Geometric representation of real numbers

The number systems are built up in stages, each containing the one before it.

Symbol Name Description Examples
\mathbb{N} Natural numbers counting numbers 1, 2, 3, \dots
\mathbb{W} Whole numbers \mathbb{N} together with 0 0, 1, 2, \dots
\mathbb{Z} Integers whole numbers and their negatives \dots, -2, -1, 0, 1, \dots
\mathbb{Q} Rational numbers p/q with p, q \in \mathbb{Z}, q \ne 0 \frac{3}{4}, -5, 0.25, 0.\overline{3}
\mathbb{Q}^c Irrational numbers reals that are not of the form p/q \sqrt{2}, \sqrt[3]{7}, \pi, e
\mathbb{R} Real numbers \mathbb{Q} \cup \mathbb{Q}^c all of the above

So \mathbb{N} \subset \mathbb{W} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R}, and \mathbb{Q} \cap \mathbb{Q}^c = \emptyset.

figure
Figure 1. The real number system. Each region contains the one inside it; the irrationals \mathbb{Q}^c are everything in \mathbb{R} outside \mathbb{Q}.

Decimal test for rationality

A real number is rational exactly when its decimal expansion terminates (0.375) or recurs (0.\overline{36} = 0.363636\dots). It is irrational exactly when the expansion is non-terminating and non-recurring (\pi = 3.14159265\dots).

The number line

Choose a point O on a straight line to be 0 and a point one unit to its right to be 1. Every real number then corresponds to exactly one point of the line, and every point corresponds to exactly one real number. This one-to-one correspondence is what makes the real line a line: it has no gaps. (The rationals alone leave gaps — there is no rational point at the diagonal of a unit square.)

figure
Figure 2. The real line. Rational and irrational points are interleaved; between any two distinct reals lie infinitely many of each kind.

Density of \mathbb{Q} and \mathbb{Q}^c

Between any two distinct real numbers a < b there is a rational number and also an irrational number — hence infinitely many of each. A quick recipe: the mean \frac{a+b}{2} gives a rational between two rationals, and a + \frac{b-a}{\sqrt{2}} gives an irrational between them.

Representing a surd on the number line

Irrational numbers of the form \sqrt{n} can be located exactly with ruler and compasses, using Pythagoras' theorem.

Locating \sqrt{2} and \sqrt{3}

Step 1. Draw the number line and mark O at 0 and A at 1.

Step 2. At A erect AB \perp OA with AB = 1 unit. Then by Pythagoras in the right triangle OAB,

OB = \sqrt{OA^{2} + AB^{2}} = \sqrt{1^{2} + 1^{2}} = \sqrt{2}

Step 3. With centre O and radius OB, draw an arc cutting the number line at P. Then OP = \sqrt{2}, so P represents \sqrt{2}.

Step 4. Repeat: at P erect PQ \perp OP with PQ = 1. Then OQ = \sqrt{(\sqrt{2})^{2} + 1^{2}} = \sqrt{3}, and an arc of radius OQ cuts the line at the point representing \sqrt{3}.

Continuing gives \sqrt{4}, \sqrt{5}, \dots — this chain is called the spiral of Theodorus. \blacksquare

figure
Figure 3. Constructing \sqrt{2} and \sqrt{3} on the number line. Each right triangle adds one to the square of the hypotenuse.

Worked example 2.1

Problem. Express 0.\overline{36} and 0.4\overline{7} as fractions in lowest terms.

Solution. (a) Let x = 0.363636\dots Two digits repeat, so multiply by 10^2:

100x = 36.363636\dots

Subtracting the first line from the second cancels the whole repeating tail:

100x - x = 36 \;\Rightarrow\; 99x = 36 \;\Rightarrow\; x = \frac{36}{99} = \frac{4}{11}

(b) Let x = 0.4777\dots Here one digit repeats but only after one non-repeating digit, so use two multipliers:

10x = 4.777\dots, \qquad 100x = 47.777\dots

100x - 10x = 43 \;\Rightarrow\; 90x = 43 \;\Rightarrow\; x = \frac{43}{90}

Check: 4 \div 11 = 0.3636\dots and 43 \div 90 = 0.4777\dots Both correct.

\sqrt{2} is irrational (proof by contradiction)

Suppose, for contradiction, that \sqrt{2} is rational. Then \sqrt{2} = p/q where p, q are integers with q \ne 0 and the fraction is in lowest terms, so p and q have no common factor.

Squaring: 2 = p^{2}/q^{2}, hence

p^{2} = 2q^{2}

So p^2 is even, and therefore p is even (the square of an odd number is odd). Write p = 2m. Substituting,

(2m)^{2} = 2q^{2} \;\Rightarrow\; 4m^{2} = 2q^{2} \;\Rightarrow\; q^{2} = 2m^{2}

So q^2 is even, hence q is even. But then p and q are both even, contradicting "no common factor". The assumption must be false, so \sqrt{2} is irrational. \blacksquare

Worked example 2.2

Problem. Insert one rational and one irrational number between \frac{1}{3} and \frac{1}{2}.

Solution. In decimals, \frac{1}{3} = 0.3333\dots and \frac{1}{2} = 0.5.

Rational: take the mean, \frac{1}{2}\left(\frac{1}{3} + \frac{1}{2}\right) = \frac{1}{2} \cdot \frac{5}{6} = \frac{5}{12} = 0.41\overline{6}, which lies between them.

Irrational: any non-terminating, non-recurring decimal starting 0.4 will do, for example 0.401001000100001\dots (the number of zeros grows each time, so the expansion never repeats). It satisfies 0.3333 < 0.4010\dots < 0.5.

2.2 Interval

Interval

An interval is a set of real numbers containing every number between any two of its members — geometrically, an unbroken piece of the number line. A square bracket includes the endpoint; a round bracket excludes it. \infty and -\infty are not numbers, so they always take a round bracket.

Interval Set-builder form Name Endpoints
(a, b) \{x \in \mathbb{R} : a < x < b\} open neither included
[a, b] \{x \in \mathbb{R} : a \le x \le b\} closed both included
[a, b) \{x \in \mathbb{R} : a \le x < b\} half-open (right-open) a only
(a, b] \{x \in \mathbb{R} : a < x \le b\} half-open (left-open) b only
(a, \infty) \{x \in \mathbb{R} : x > a\} open, unbounded above none
[a, \infty) \{x \in \mathbb{R} : x \ge a\} closed, unbounded above a
(-\infty, b] \{x \in \mathbb{R} : x \le b\} closed, unbounded below b
(-\infty, \infty) \mathbb{R} the whole line none

The length of a bounded interval with endpoints a < b is b - a, regardless of which endpoints are included.

figure
Figure 4. The six interval types on the number line. A hollow dot excludes the endpoint, a solid dot includes it.

Intervals can be combined like any other sets. The intersection of two intervals is the overlap; the union is a single interval only if they meet or touch.

Neighbourhood

For a \in \mathbb{R} and \delta > 0, the open interval (a-\delta,\ a+\delta) is called the \delta-neighbourhood of a. It is exactly the set \{x : |x - a| < \delta\}. Removing a itself gives the deleted neighbourhood, used when defining limits in Unit 17.

Worked example 2.3

Problem. Write in interval notation: (a) -3 < x \le 4, (b) x > 5, (c) all real x except x = 2.

Solution.

(a) Left endpoint excluded, right included: (-3, 4].

(b) Unbounded above, 5 excluded: (5, \infty).

(c) The line with one point removed is two rays: (-\infty, 2) \cup (2, \infty), also written \mathbb{R} - \{2\}. This is not a single interval, because it is not unbroken.

Worked example 2.4

Problem. If A = (-3, 4] and B = [1, 7), find A \cap B, A \cup B and A - B.

Solution. Draw both on one line and read off.

A \cap B: x must satisfy -3 < x \le 4 and 1 \le x < 7. The binding conditions are x \ge 1 (from B) and x \le 4 (from A), so

A \cap B = [1, 4]

A \cup B: the two intervals overlap, so the union is one interval running from the smaller left endpoint to the larger right endpoint, keeping each endpoint's own bracket:

A \cup B = (-3, 7)

A - B: the part of A with x < 1, i.e. A - B = (-3, 1).

Worked example 2.5

Problem. Solve 2x - 5 < 7 and 3x + 1 \ge -8 simultaneously, and write the solution as an interval.

Solution. Solve each inequality separately.

2x - 5 < 7 \;\Rightarrow\; 2x < 12 \;\Rightarrow\; x < 6

3x + 1 \ge -8 \;\Rightarrow\; 3x \ge -9 \;\Rightarrow\; x \ge -3

Both must hold, so we intersect: -3 \le x < 6, that is [-3, 6).

Multiplying an inequality by a negative number

Multiplying or dividing an inequality by a negative number reverses the sign: from -2x < 6 we get x > -3, not x < -3. Adding, subtracting, and multiplying by a positive number leave the direction unchanged.

2.3 Absolute value

Absolute value (modulus)

For x \in \mathbb{R},

|x| = x \ \text{ if } x \ge 0, \qquad |x| = -x \ \text{ if } x < 0

Equivalently |x| = \sqrt{x^{2}}, the non-negative square root. Geometrically |x| is the distance of the point x from the origin, and |x - y| is the distance between the points x and y.

Properties of the absolute value

For all real a, b:

  • |a| \ge 0, and |a| = 0 only when a = 0
  • |-a| = |a| and |a|^{2} = a^{2}
  • |ab| = |a|\,|b| and |a/b| = |a|/|b| for b \ne 0
  • -|a| \le a \le |a|
  • Triangle inequality: |a + b| \le |a| + |b|
  • | \,|a| - |b|\, | \le |a - b| (the reverse triangle inequality)
Solving with absolute values (let k > 0)
Statement Equivalent to As an interval
|x| = k x = k or x = -k two points
|x| < k -k < x < k (-k, k)
|x| \le k -k \le x \le k [-k, k]
|x| > k x < -k or x > k (-\infty, -k) \cup (k, \infty)
|x - a| < \delta a - \delta < x < a + \delta (a-\delta,\ a+\delta)

Read the last line as "x is within \delta of a". Less than gives one interval; greater than gives two.

figure
Figure 5. Graphs of y = |x|, y = |x-2| and y = |x| - 2. The V is shifted right by 2 and down by 2 respectively; the corner is where the inside expression is zero.

The triangle inequality |a+b| \le |a| + |b|

For any real a we know -|a| \le a \le |a|, and likewise -|b| \le b \le |b|.

Adding the two chains of inequalities term by term,

-\left(|a| + |b|\right) \le a + b \le |a| + |b|

Now apply the rule "|X| \le k is the same as -k \le X \le k", with X = a+b and k = |a| + |b|:

|a + b| \le |a| + |b|

Equality holds exactly when a and b have the same sign (or one is zero). \blacksquare

Worked example 2.6

Problem. Solve |2x - 5| = 7.

Solution. |X| = 7 means X = 7 or X = -7, so

2x - 5 = 7 \;\Rightarrow\; 2x = 12 \;\Rightarrow\; x = 6

2x - 5 = -7 \;\Rightarrow\; 2x = -2 \;\Rightarrow\; x = -1

Check: |2(6)-5| = |7| = 7 and |2(-1)-5| = |-7| = 7. Solution set \{-1, 6\}.

Worked example 2.7

Problem. Solve |3x + 2| \le 8 and write the answer in interval notation.

Solution. |X| \le 8 means -8 \le X \le 8:

-8 \le 3x + 2 \le 8

Subtract 2 throughout:

-10 \le 3x \le 6

Divide by 3 (positive, so no sign change):

-\frac{10}{3} \le x \le 2

The solution set is \left[-\frac{10}{3},\ 2\right].

Worked example 2.8

Problem. Solve |x - 4| > 3 and interpret the answer geometrically.

Solution. |X| > 3 means X > 3 or X < -3:

x - 4 > 3 \;\Rightarrow\; x > 7 \qquad\text{or}\qquad x - 4 < -3 \;\Rightarrow\; x < 1

Solution set (-\infty, 1) \cup (7, \infty).

Geometrically: |x-4| is the distance from x to 4, so we want all points more than 3 units from 4 — everything outside the interval [1, 7], as found.

figure
Figure 6. Solving |x-3| < 2 graphically: the V-graph lies below the line y=2 exactly for 1 < x < 5, i.e. within 2 units of 3.

Worked example 2.9

Problem. Solve |2x - 1| = |x + 4|.

Solution. |A| = |B| means A = B or A = -B.

Case 1: 2x - 1 = x + 4 \Rightarrow x = 5.

Case 2: 2x - 1 = -(x + 4) \Rightarrow 2x - 1 = -x - 4 \Rightarrow 3x = -3 \Rightarrow x = -1.

Check: at x = 5, |9| = |9| ✓; at x = -1, |-3| = 3 and |3| = 3 ✓. Solution set \{-1, 5\}.

(An alternative is to square both sides: (2x-1)^2 = (x+4)^2 gives 3x^{2} - 12x - 15 = 0, i.e. x^{2} - 4x - 5 = 0, (x-5)(x+1) = 0 — the same roots.)

Worked example 2.10

Problem. Solve |x - 1| + |x - 3| = 4.

Solution. Two modulus signs, so split the line at the points where each inside expression changes sign: x = 1 and x = 3. That gives three cases.

Case 1: x < 1. Here x-1 < 0 and x-3 < 0, so both moduli flip sign:

(1-x) + (3-x) = 4 \;\Rightarrow\; 4 - 2x = 4 \;\Rightarrow\; x = 0

Since 0 < 1, this is valid.

Case 2: 1 \le x < 3. Here x - 1 \ge 0 but x - 3 < 0:

(x-1) + (3-x) = 2

This is 2, never 4, so there is no solution in this interval.

Case 3: x \ge 3. Both are non-negative:

(x-1) + (x-3) = 4 \;\Rightarrow\; 2x - 4 = 4 \;\Rightarrow\; x = 4

Since 4 \ge 3, this is valid. The solution set is \{0, 4\}.

Geometric reading: |x-1| + |x-3| is the total distance from x to the points 1 and 3. Between them that total is always 2 (the gap); outside, it grows.

figure
Figure 7. y = |x-1| + |x-3|. The graph is flat at height 2 between the corners, so y = 4 has exactly two solutions, x = 0 and x = 4; y = 2 has infinitely many and y = 1 has none.

Worked example 2.11

Problem. Express \{x : |x - 3| < 2\} as an interval, and write the interval (-1, 7) in the form |x - a| < \delta.

Solution. (a) |x-3| < 2 means -2 < x - 3 < 2, so 1 < x < 5, i.e. (1, 5).

(b) Reverse the process. The midpoint of (-1, 7) is

a = \frac{-1 + 7}{2} = 3, \qquad \delta = \frac{7 - (-1)}{2} = 4

so (-1, 7) = \{x : |x - 3| < 4\}.

\sqrt{x^{2}} = |x|, not x

\sqrt{(-5)^{2}} = \sqrt{25} = 5 = |-5|, not -5. The radical sign always denotes the non-negative root. Similarly, |x| = k has two solutions whenever k > 0, and none when k < 0 — an equation such as |3x-1| = -4 has no solution at all.

Chapter summary

  • \mathbb{N} \subset \mathbb{W} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R}; a real number is rational iff its decimal terminates or recurs.
  • Each real number corresponds to exactly one point of the number line and conversely; \sqrt{n} is located exactly by a Pythagorean construction.
  • Between any two distinct reals there are infinitely many rationals and infinitely many irrationals.
  • (a,b) excludes endpoints, [a,b] includes them; \infty always takes a round bracket; the length of either is b-a.
  • |x| = x for x \ge 0 and -x for x < 0; |x| = \sqrt{x^{2}}; |x-y| is the distance from x to y.
  • |x| < k \Leftrightarrow -k < x < k (one interval); |x| > k \Leftrightarrow x < -k or x > k (two intervals).
  • Triangle inequality |a+b| \le |a|+|b|; a sum of two moduli is solved by splitting the line at the zeros of each inside expression.

Practice questions

Group A — Multiple choice (1 mark each)

  1. Which of the following is irrational? [1]a\sqrt{16}b0.\overline{27}c\sqrt{7}d\frac{22}{7}
  2. The set \{x \in \mathbb{R} : -2 \le x < 5\} in interval notation is [1]a(-2, 5)b[-2, 5)c(-2, 5]d[-2, 5]
  3. |x| < 3 is equivalent to [1]ax < 3bx > -3c-3 < x < 3dx < -3 or x > 3
  4. \sqrt{(-9)^{2}} equals [1]a-9b9c\pm 9d81
  5. The solution set of |x| = -2 is [1]a\{2, -2\}b\{-2\}c\emptysetd\mathbb{R}
  6. (-\infty, 3] \cap (0, 5) equals [1]a(0, 3]b[0, 3)c(0, 5)d(-\infty, 5)
  7. The decimal 0.\overline{5} as a fraction is [1]a\frac{1}{2}b\frac{5}{9}c\frac{5}{99}d\frac{1}{5}
Answers to Group A

1. (c) — \sqrt{16}=4 is an integer, 0.\overline{27} recurs, \frac{22}{7} is a ratio of integers; only \sqrt{7} is a non-perfect-square surd.

2. (b) — -2 is included (square bracket), 5 is not (round bracket).

3. (c) — "|x| less than k" always collapses to the single interval -k < x < k.

4. (b) — \sqrt{x^2} = |x|, and |-9| = 9.

5. (c) — an absolute value is never negative, so no x works.

6. (a) — need x \le 3 and 0 < x < 5; the binding conditions are x>0 and x \le 3.

7. (b) — x = 0.555\dots, 10x = 5.555\dots, 9x = 5, x = \frac{5}{9}.

Group B — Short answer (5 marks each)

  1. Define rational and irrational numbers. Express 0.\overline{4} and 1.2\overline{3} as fractions in lowest terms. [5]
  2. Represent \sqrt{5} on the number line by an exact geometric construction, justifying each step. [5]
  3. Write in interval notation and represent on a number line: (i) -2 \le x < 3, (ii) x > 5, (iii) |x| \le 4. Also find (-5, 2] \cap [0, 6). [5]
  4. Solve |3x - 2| < 4 and express the solution as an interval. [5]
  5. Solve the pair |x - 2| \le 3 and |x + 1| > 1 simultaneously. [5]
  6. If |x - 5| < 0.01, find the interval containing x and hence an upper bound for |2x - 10|. [5]
Answers to Group B

1. A rational number can be written p/q with p, q \in \mathbb{Z}, q \ne 0; its decimal terminates or recurs. An irrational number cannot be so written; its decimal neither terminates nor recurs.

x = 0.444\dots, so 10x = 4.444\dots and 10x - x = 4, giving 9x = 4 and x = \frac{4}{9}.

x = 1.2333\dots, so 10x = 12.333\dots and 100x = 123.333\dots Subtracting, 90x = 111, so x = \frac{111}{90} = \frac{37}{30}. Check: 37 \div 30 = 1.2333\dots ✓

2. Mark O at 0 and A at 2 on the number line. At A erect AB \perp OA with AB = 1 unit. By Pythagoras,

OB = \sqrt{OA^{2} + AB^{2}} = \sqrt{2^{2} + 1^{2}} = \sqrt{5}

With centre O and radius OB, draw an arc meeting the number line at P on the positive side. Then OP = OB = \sqrt{5} (radii of the same arc), so P represents \sqrt{5} \approx 2.236 — between 2 and 3, as expected since 4 < 5 < 9.

3. (i) [-2, 3): solid dot at -2, hollow at 3, segment shaded between. (ii) (5, \infty): hollow dot at 5, shading to the right. (iii) |x| \le 4 means -4 \le x \le 4, i.e. [-4, 4]: solid dots at both ends.

For the intersection, x must satisfy -5 < x \le 2 and 0 \le x < 6. The binding conditions are x \ge 0 and x \le 2, so (-5, 2] \cap [0, 6) = [0, 2].

4. |3x-2| < 4 means -4 < 3x - 2 < 4. Adding 2: -2 < 3x < 6. Dividing by 3:

-\frac{2}{3} < x < 2

Solution set \left(-\frac{2}{3},\ 2\right).

5. First inequality: |x-2| \le 3 \Rightarrow -3 \le x-2 \le 3 \Rightarrow -1 \le x \le 5, i.e. [-1, 5].

Second: |x+1| > 1 \Rightarrow x+1 > 1 or x+1 < -1 \Rightarrow x > 0 or x < -2, i.e. (-\infty,-2) \cup (0,\infty).

Intersecting: [-1,5] has no points below -2, so only the piece x > 0 survives, giving (0, 5].

6. |x-5| < 0.01 means -0.01 < x - 5 < 0.01, so

4.99 < x < 5.01, \qquad \text{i.e. } x \in (4.99,\ 5.01)

Then |2x - 10| = |2(x-5)| = 2|x-5| < 2(0.01) = 0.02. So |2x-10| < 0.02.

Group C — Long answer (8 marks each)

  1. (a) Prove that \sqrt{3} is irrational. [4](b) Solve |2x + 1| \ge 5, write the solution in interval notation and show it on a number line. [4]
  2. (a) State and prove the triangle inequality |a+b| \le |a| + |b|. [4](b) Solve |x - 2| + |x + 1| = 5. [4]
Answers to Group C

1. (a) Suppose \sqrt{3} = p/q in lowest terms, p, q \in \mathbb{Z}, q \ne 0. Squaring gives p^{2} = 3q^{2}, so 3 \mid p^{2}, and since 3 is prime, 3 \mid p. Write p = 3m. Then 9m^{2} = 3q^{2}, so q^{2} = 3m^{2}, hence 3 \mid q^{2} and 3 \mid q. Now 3 divides both p and q, contradicting "lowest terms". Therefore \sqrt{3} is irrational.

1. (b) |X| \ge 5 means X \ge 5 or X \le -5:

2x + 1 \ge 5 \;\Rightarrow\; 2x \ge 4 \;\Rightarrow\; x \ge 2

2x + 1 \le -5 \;\Rightarrow\; 2x \le -6 \;\Rightarrow\; x \le -3

Solution set (-\infty, -3] \cup [2, \infty). On the number line: a solid dot at -3 with shading to the left, a solid dot at 2 with shading to the right, and the open gap (-3, 2) left unshaded.

2. (a) Statement: for all real a, b, |a+b| \le |a| + |b|.

Proof. Since -|a| \le a \le |a| and -|b| \le b \le |b|, adding gives

-(|a| + |b|) \le a + b \le |a| + |b|

A number X satisfying -k \le X \le k (with k \ge 0) satisfies |X| \le k. Taking X = a+b and k = |a|+|b| gives |a+b| \le |a| + |b|. Equality occurs when a and b have the same sign or one of them is zero.

2. (b) The inside expressions vanish at x = 2 and x = -1, so split there.

Case 1: x < -1. Both are negative: (2 - x) + (-x - 1) = 5 \Rightarrow 1 - 2x = 5 \Rightarrow x = -2. Valid, as -2 < -1.

Case 2: -1 \le x < 2. Then |x-2| = 2-x and |x+1| = x+1: (2-x) + (x+1) = 3 \ne 5, so no solution here.

Case 3: x \ge 2. Both are non-negative: (x-2) + (x+1) = 5 \Rightarrow 2x - 1 = 5 \Rightarrow x = 3. Valid, as 3 \ge 2.

Solution set \{-2, 3\}. Check: at x=-2, |-4| + |-1| = 4+1 = 5 ✓; at x=3, |1| + |4| = 1+4 = 5 ✓.

Practise more: Mathematics question bank