$$ \def\R{\mathbb R} \def\N{\mathbb N} \def\Q{\mathbb Q} \def\Z{\mathbb Z} \newcommand{\st}{~:~} \newcommand{\cee}{\mathsf{C}} \newcommand{\bee}{\mathrm{B}} \def\mathhlyellow#1{\bbox[##fff3bf,2px,border:1px solid ##b7791f]{#1}} \def\mathhlgold#1{\bbox[##ffe8a3,2px,border:1px solid ##b7791f]{#1}} \def\mathhlorange#1{\bbox[##ffddb3,2px,border:1px solid ##c05621]{#1}} \def\mathhlgreen#1{\bbox[##d9f7d7,2px,border:1px solid ##3f8f46]{#1}} \def\mathhlmint#1{\bbox[##d4f5e9,2px,border:1px solid ##2c7a7b]{#1}} \def\mathhlblue#1{\bbox[##dceeff,2px,border:1px solid ##2b6cb0]{#1}} \def\mathhlpurple#1{\bbox[##eadffd,2px,border:1px solid ##6b46c1]{#1}} \def\mathhlpink#1{\bbox[##ffdbe8,2px,border:1px solid ##b83280]{#1}} \def\mathhlred#1{\bbox[##ffd6d6,2px,border:1px solid ##c53030]{#1}} \def\mathhlgray#1{\bbox[##e8ecef,2px,border:1px solid ##64748b]{#1}} \def\mathhlgrey#1{\bbox[##e8ecef,2px,border:1px solid ##64748b]{#1}} $$

6  \(\mathbb{R}\) as a Metric Space

Highlights

  • See how distance interacts with previously established properties of \(\R\) (arithmetic, inequalities, and least upper bounds).
  • Equivalent conditions to being a least upper bound.
  • Use distance to investigate the relationships among the integers, rationals, irrationals, and reals.

6.1 Preparation

In this section, we will focus on thinking about the real number system as a metric space. We start with what will end up being one of the most-cited theorems in the course.

Theorem 6.1 Let \(r>0\) and \(a\in\R.\) Then \(|a-x|<r\) if and only if \(x\in(a-r,a+r).\)

Exercise 6.2  

  1. Draw a picture of what this Theorem 6.1 is saying on the number line.
  2. Prove Theorem 6.1.
  3. Rewrite \(|a-x|<r\) as a statement about distance in \(\R.\)
  4. Rewrite \(x\in(a-r,a+r)\) as an inequality.

Theorem 6.1 is foundational because it connects a statement about analysis (distances and closeness) to a statement about geometry (subsets of \(\R\)). In general, mathematicians love “if and only if” statements because they often let you translate a statement in one context to a statement in another, where you may have a whole new set of tools you can apply. Together with Parts 3 and 4 from Exercise 6.2, you now have four toolbags you can use to analyze the statement: absolute values, intervals, distances, and inequalities.

Indeed, the connections furnished by Theorem 6.1 can be used to help us prove other theorems relating the concepts we’ve encountered so far.

Theorem 6.3 Suppose \(b\) is an upper bound on a nonempty subset \(S\subseteq\R.\) Then the following are equivalent.

  1. \(b=\sup S\)
  2. For all \(\epsilon>0\) there exists \(x\in S\) such that \(x\in(b-\epsilon,b].\)
  3. For all \(\epsilon>0\) there exists \(x\in S\) such that \(|b-x|<\epsilon.\)
Desmos Applet 6.1: A demonstration of Theorem 6.3. In blue is the set \(S=\left\{\frac{0}{1},\frac{1}{2},\frac{2}{3},\ldots\right\}.\) When \(b=1,\) note that for whatever \(\epsilon>0\) is chosen, there is at least one element of \(S\) in both the green and orange intervals. When \(b>1,\) you could choose a small \(\epsilon>0\) and have no points of \(S\) in the orange and green intervals.

Proof. Suppose \(b\) is an upper bound on \(S.\)

\((1\Rightarrow2)\): Suppose \(b=\sup S\) and let \(\epsilon>0\)Since we are proving something starting with ’for all \(\epsilon>0,\) this has to be the first line of our proof (after stating the baseline assumptions).. Then \(b-\epsilon\) is not an upper bound on \(S\) because \(b-\epsilon<b\) and \(b\) is the least upper bound on \(S.\) That means there exists \(x\in S\) with \(b-\epsilon<x.\) Since \(b\) is an upper bound on \(S,\) \(x\leq b.\) Thus we have shown \(x\in(b-\epsilon,b].\)

\((2\Rightarrow3)\): If \(x\in(b-\epsilon,b],\) then \(x\in(b-\epsilon,b+\epsilon),\) so \(|b-x|<\epsilon\) by Theorem 6.1.

\((3\Rightarrow1)\): We will prove this by contrapositionThis means we need to prove ‘(not 1) \(\Rightarrow\) (not 3).’ What is the negation of (3)?. Suppose \(b\) is not the least upper bound on \(S.\) That means there exists another upper bound \(u\) on \(S\) such that \(u<b.\) If we let \(\epsilon=b-u,\) then for any \(x\in S,\) \(x\leq b-\epsilon=u,\) so by Theorem 6.1, \(|b-x|\geq \epsilon.\)

Note

When we encounter a new concept, we will often have a TFAE (“the following are equivalent”) theorem that follows giving us alternative ways of understanding the new concept. Since these theorems are so useful, I will color-code them with a lightseagreen vertical bar. In fact, the last two theorems are of this kind.

Exercise 6.4 Carefully prove that \(5\) is the supremum of \([0,5)\) using Part 2 or 3 of Theorem 6.3.

Exercise 6.5 Write down a “the following are equivalent” theorem about infima analogous to Theorem 6.3 and prove it.

6.2 The \(\max\) and \(\min\) of a Finite Set

In Theorem 5.5, I used the notation \(\max\{a,-a\}\) to mean whichever of these two numbers is greater. Here we will make that notation precise with some words of caution about when you can use it.

Theorem 6.6 Suppose \(F\subseteq\R\) is a nonempty finite set. Then \(\sup F\) exists and \(\sup F\in F\) (i.e. that \(F\) has a greatest element). In this case we write \(\max F\) for the greatest element of \(F.\)

For example, \(\max\{3,7,5\}=7.\)

Proof. Let \(n\) be the number of elements of \(F.\) We will prove that \(F\) has a greatest element by induction on \(n.\)

As a base case, suppose \(n=1.\) Then \(F=\{x_1\}.\) In this case \(x_1\geq x_1,\) so \(x_1\) is an upper bound on \(F.\) And any upper bound \(b\) on \(F\) must have \(b\geq x_1,\) so \(x_1\) is the least upper bound. And of course \(x_1\in F.\)

Now suppose that \(k\in\N\) and any set with \(k\) elements has a greatest element. Now suppose \(F=\{x_1,\ldots,x_k,x_{k+1}\}\) has \(k+1\) elements. Define \(E=\{x_1,\ldots,x_k\}\) so that \(E\) has \(k\) elements and therefore a greatest element \(g.\) If \(x_{k+1}\geq g,\) then let \(b=x_{k+1},\) and otherwise, let \(b=g.\) Either way, \(b\geq x_{k+1}\) and \(b\geq g\geq x_i\) for all \(i=1,\ldots,k\) (so \(b\) is an upper bound), and either way \(b\in F.\) And if \(u\) is any upper bound on \(F,\) then \(u\geq g\) and \(u\geq x_{k+1},\) so \(u\geq b.\) Thus, \(b\) is the least upper bound of \(F,\) and since \(b\in F,\) \(b\) is the greatest element.

Caution

In this text we only write \(\max S\) when \(S\) is known to be a nonempty finite set. We have seen examples of infinite sets \(S\) where \(S\) has no greatest element.

Exercise 6.7 Prove that if \(F\) is a finite nonempty subset of \(\R,\) then \(F\) has a least element, which we call the \(\min.\)

Hint: You can try replicating the proof of Theorem 6.6, but it may be easier to apply that theorem to \(F\) somehow instead!

6.3 Integers, Rationals, and Irrationals in \(\R\)

By now we may have an intuitive sense that even though the rationals have “holes” where we would expect suprema to be, they are still “everywhere” along the number line. This somewhat bizarre discrepancy is made precise by the next few exercises.

Exercise 6.8 Let \(a\in\R.\) Prove that there exists a unique \(n\in\Z\) such that \(n\leq a<n+1.\)

Note that you will need the Well-Ordered Property of \(\Z\) in order to prove this (see Appendix D).

Exercise 6.8 now allows us to use the “floor function”; for any \(x\in \R\) we can define \(\lfloor x\rfloor\) to be the greatest integer that is less than or equal to \(x\); similarly, \(\lceil x\rceil,\) the “ceiling”, is the least integer that is greater than or equal to \(x.\) In practice, students tend to overuse the floor function in real analysis proofs—most of the time you just need an integer that is greater \(x,\) which is furnished by the Archimedean Property (Theorem 3.8).

Exercise 6.9 Let \(b\in\R\) and \(q\in\N.\) Prove that there exists a unique \(p\in\Z\) such that \[\frac{p}{q}\leq b< \frac{p+1}{q}\]

Don’t start from scratch. How can you apply the previous exercise to help you prove the result of this one? Here we need to prove something about all \(b\in\R\) and all \(q\in\N\), so we must start with something like “Suppose \(b\in\R\) and \(q\in\N\)”. To what value of \(a\) should we apply the result of Exercise 6.8?

Exercise 6.10 Let \(b\in\R\) and \(\epsilon>0.\) Prove that there exists \(r\in\Q\) such that \(d(b,r)<\epsilon.\)

Once again, don’t start from scratch. First note that the inequality you are trying to prove appears in Theorem 6.1 although the variable names have changed. How can you apply Exercise 6.9 to get what you want?

If you get stuck, draw this a picture on the number line.

If you are still stuck, use the following concrete example to help you wrap your head around the problem. If \(b=\pi\) and \(\epsilon=0.1,\) how would you choose the rational number \(r\)? Can you frame your technique in terms of the notation Exercise 6.9? Given \(\epsilon,\) to what value of \(q\) would you apply the result?

Exercise 6.11 Let \(c,d\in\R\) with \(c<d.\) Prove that there exists a rational number \(x\) with \(c<x<d.\)

Once again, don’t start from scratch. In both this exercise and Exercise 6.10, you need to show that a rational number exists in a particular interval but the intervals are described differently. Given \(c,d,\) can you figure out what \(b,\epsilon\) to use so you can apply Exercise 6.10?

Exercise 6.12 Let \(c,d\in\R\) with \(c<d.\) Prove that there exists an irrational number \(x\) with \(c<x<d.\)

Think about using Theorem 4.9 and a cardinality argument here!

Review Questions

  1. A good study strategy for this course is to keep a catalog of all the major concepts in the course, and then quiz yourself by picking two at random and asking yourself to think of how they are connected.1 Give this a try for the major concepts we’ve encountered so far
G arithmetic arithmetic inequalities inequalities arithmetic--inequalities least upper bounds least upper bounds arithmetic--least upper bounds distance distance arithmetic--distance inequalities--least upper bounds inequalities--distance least upper bounds--distance
Figure 6.1
  1. What do we mean when we write \(\max S\)? When are we “allowed” to use this notation?
  2. In what sense are the rationals “all over” the real number line?

  1. I heard one study skills expert suggest writing the concepts on index cards, shuffling, and drawing the cards two at a time.↩︎