Skip to main content

# 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} = \{ \dfrac{a}{b} | a ∈ \mathbb{Z} \text{ and } b ∈ \mathbb{Z} \text{ and } b \neq 0\}$

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, $$\dfrac{3}{6}$$ and $$\dfrac{14}{28}$$ are distinct things that appear in the set defined above, but we all know that they both represent the rational number $$\dfrac{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 $$\text{gcd}(a, b) = 1$$. A pair of numbers whose $$\text{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} = \{ \dfrac{a}{b} | a,b ∈ \mathbb{Z} \text{ and } b \neq 0 \text{ and } \text{gcd}(a,b) = 1\}$

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
 $$\dfrac{a}{b}$$ $$|$$ $$a,b \in \mathbb{Z}$$ $$\text{and}$$ fractions of the form $$a$$ over $$b$$ such that $$a$$ and $$b$$ are integers and

 $$b \neq 0$$ $$\text{and}$$ $$\text{gcd}(a, b) = 1$$ $$\}$$ $$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 yes 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 absurdum1. 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 $$\PageIndex{1}$$

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 $$\PageIndex{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 $$1.6.1$$.

Proof:

Suppose to 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: $$\sqrt{2} = \dfrac{a}{b}$$ and $$\text{gcd}(a, b) = 1$$.

Consider the expression $$\sqrt{2} = \dfrac{a}{b}$$. By squaring both sides of this we obtain

$2 = \dfrac{a^2}{b^2}.$

This last expression can be rearranged to give

$a^2 = 2b^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

$(2m)^2 = 2b^2,$

thus,

$4m^2 = 2b^2,$

so

$2m^2 = b^2.$

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 $$\text{gcd}(a, b) ≥ 2$$, but, on the other hand, one of our initial assumptions is that $$\text{gcd}(a, b) = 1$$.

$$\text{Q.E.D.}$$

## Exercises:

##### Exercise $$\PageIndex{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, $$\dfrac{22}{7}$$ is a well-known rational approximation to $$π$$. Find good rational approximations to $$\sqrt{2}$$, $$\sqrt{3}$$, $$\sqrt{5}$$ and $$e$$.

##### Exercise $$\PageIndex{2}$$

The theory of base-$$n$$ notation that we looked at in sub-section 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 · 2^0 + 1 · 2^{−1} + 0 · 2^{−2} + 1 · 2^{−3} + 1 · 2^{−4}$$ or $$1 + \dfrac{1}{2} + \dfrac{1}{8} + \dfrac{1}{16} = 1 \dfrac{11}{16}$$.

Consider the binary number $$.1010010001000010000010000001 . . .$$, is this number rational or irrational? Why?

##### Exercise $$\PageIndex{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?

##### Exercise $$\PageIndex{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?

##### Exercise $$\PageIndex{5}$$

Write a proof that $$\sqrt{3}$$ is irrational.

1.6: Rational And Irrational Numbers is shared under a GNU Free Documentation License 1.3 license and was authored, remixed, and/or curated by Joseph Fields.

• Was this article helpful?