1.6 Rational and irrational numbers

When we first discussed the rational numbers in Section 1.1, we gave the following definition, which isn’t quite right. \[ {\mathbb Q}= \left\{ \frac{a}{b} {\,:\,}a \in {\mathbb Z}\; \mbox{and} \; b \in {\mathbb Z}\; \mbox{and} \; b \neq 0 \right\}. \]

We are now in a position to fix the problem.

So what was the problem after all? Essentially this: there are many expressions formed with one integer written above another (with an intervening fraction bar) that represent the exact same rational number. For example \(\frac{3}{6}\) and \(\frac{14}{28}\) are distinct things that appear in the set defined above, but we all know that they both represent the rational number \(\frac{1}{2}\). To eliminate this problem with our definition of the rationals we need to add an additional condition that ensures that such duplicates don’t arise. It turns out that what we want is for the numerators and denominators of our fractions to have no factors in common. Another way to say this is that the \(a\) and \(b\) from the definition above should be chosen so that \(\operatorname{gcd} (a, b) = 1\). A pair of numbers whose gcd is 1 are called relatively prime.

We’re ready, at last, to give a good, precise definition of the set of rational numbers. (Although it should be noted that we’re not quite done fiddling around; an even better definition will be given in Section 6.3.) \[ {\mathbb Q}= \left\{ \frac{a}{b} {\,:\,}a,b \in {\mathbb Z}\; \mbox{and} \; b \neq 0 \; \mbox{and} \; \operatorname{gcd} (a, b)=1 \right\}. \]

As we have in the past, let’s parse this with an English translation in parallel.

\({\mathbb Q}\) \(=\) \(\{\)
The rational numbers are defined to be the set of all
\(\displaystyle \frac{a}{b}\) \({\,:\,}\) \(a,b \in {\mathbb Z}\)
fractions of the form \(a\) over \(b\) such that \(a\) and \(b\) are integers
and \(b \neq 0\) and \(\operatorname{gcd} (a, b)=1\) \(\}\)
and \(b\) is non-zero and \(a\) and \(b\) are relatively prime.

Finally, we are ready to face a fundamental problem that was glossed-over in Section 1.1. We defined two sets back then, \({\mathbb Q}\) and \({\mathbb R}\). The hidden assumption that one makes in asserting that there are two of something is that the two things are distinct. Is this really the case? The reals have been defined (unrigorously) as numbers that measure the magnitudes of physical quantities, so another way to state the question is this: Are there physical quantities (for example lengths) that are not rational numbers?

The answer is that there are numbers that measure lengths which are not rational numbers. With our new and improved definition of what is meant by a rational number, we are ready to prove that there is at least one length that can’t be expressed as a fraction. Using the Pythagorean theorem, it’s easy to see that the length of the diagonal of a unit square is \(\sqrt{2}\). The proof that \(\sqrt{2}\) is not rational is usually attributed to the followers of Pythagoras (but probably not to Pythagoras himself). In any case, it is a result of great antiquity. The proof is of a type known as reductio ad absurdum14. We show that a given assumption leads logically to an absurdity, a statement that can’t be true, then we know that the original assumption must itself be false. This method of proof is a bit slippery; one has to first assume the exact opposite of what one hopes to prove and then argue (on purpose) towards a ridiculous conclusion.

Theorem 1.4 The number \(\sqrt{2}\) is not in the set \({\mathbb Q}\) of rational numbers.

Before we can actually give the proof we should prove an intermediary result — but we won’t, we’ll save this proof for the student to do later (heh, heh, heh…). These sorts of intermediate results, things that don’t deserve to be called theorems themselves, but that aren’t entirely self-evident are known as lemmas. It is often the case that in an attempt at proving a statement we find ourselves in need of some small fact. Perhaps it even seems to be true but it’s not clear. In such circumstances, good form dictates that we first state and prove the lemma then proceed on to our theorem and its proof. So, here, without its proof is the lemma we’ll need.

Lemma 1.1 If the square of an integer is even, then the original integer is even.

Given that thoroughness demands that we fill in this gap by actually proving the lemma at a later date, we can now proceed with the proof of our theorem.

Proof. Assume the contrary that \(\sqrt{2}\) is a rational number. Then by the definition of the set of rational numbers, we know that there are integers \(a\) and \(b\) having the following properties: \(\displaystyle \sqrt{2} = \frac{a}{b}\) and \(\operatorname{gcd} (a, b) = 1\).

Consider the expression \(\displaystyle \sqrt{2} = \frac{a}{b}\). By squaring both sides of this we obtain \[ 2 = \frac{a^2}{b^2}. \]

This last expression can be rearranged to give \[ a^2 = 2 b^2.\]

An immediate consequence of this last equation is that \(a^2\) is an even number. Using the lemma above we now know that \(a\) is an even integer and hence that there is an integer \(m\) such that \(a=2m\). Substituting this last expression into the previous equation gives \[\begin{equation*} (2m)^2 = 2 b^2. \end{equation*}\] Thus, \[\begin{equation*} 4m^2 = 2 b^2, \end{equation*}\] implying that \[\begin{equation*} 2m^2 = b^2. \end{equation*}\]

This tells us that \(b^2\) is even, and hence (by the lemma), \(b\) is even.

Finally, we have arrived at the desired absurdity because if \(a\) and \(b\) are both even, then \(\operatorname{gcd} (a, b) \geq 2\), but one of our initial assumptions is that \(\operatorname{gcd} (a, b) = 1\).

1.6.1 Exercises

  1. Rational approximation is a field of mathematics that has received much study. The main idea is to find rational numbers that are very good approximations to given irrationals. For example, \(22/7\) is a well-known rational approximation to \(\pi\). Find good rational approximations to \(\sqrt{2}, \sqrt{3}, \sqrt{5}\) and \(e\).

  2. The theory of base-\(n\) notation that we looked at in subsection 1.4.2 can be extended to deal with real and rational numbers by introducing a decimal point (which should probably be re-named in accordance with the base) and adding digits to the right of it. For instance \(1.1011\) is binary notation for \(1 \cdot 2^0 + 1 \cdot 2^{-1} + 0 \cdot 2^{-2} + 1\cdot 2^{-3} + 1\cdot 2^{-4}\) or \(\displaystyle 1 + \frac{1}{2} + \frac{1}{8} + \frac{1}{16} = 1 \frac{11}{16}\).

    Consider the binary number \(.1010010001000010000010000001\ldots\), is this number rational or irrational? Why?

  3. If a number \(x\) is even, it’s easy to show that its square \(x^2\) is even. The lemma that went unproved in this section asks us to start with a square (\(x^2\)) that is even and deduce that the UN-squared number (\(x\)) is even. Perform some numerical experimentation to check whether this assertion is reasonable. Can you give an argument that would prove it?

  4. The proof that \(\sqrt{2}\) is irrational can be generalized to show that \(\sqrt{p}\) is irrational for every prime number \(p\). What statement would be equivalent to the lemma about the parity of \(x\) and \(x^2\) in such a generalization?

  5. Write a proof that \(\sqrt{3}\) is irrational.


  1. Reduction to an absurdity — better known these days as proof by contradiction.