Tutorials › Real Analysis › Density of the Irrational Numbers

Number Systems · Tutorial 120 of 1000

Density of the Irrational Numbers

Use rational density and the irrationality of rational shifts of \(\sqrt{2}\) to find irrational numbers in any interval and arbitrarily close to any real number.

Beginner 9 min read

What You'll Learn

  • Prove that every open interval with distinct real endpoints contains an irrational number
  • Use rational density to shift an interval and construct an irrational inside it
  • Approximate any real number by an irrational within any positive error tolerance
  • Show that every open interval contains infinitely many distinct irrational numbers
  • Check irrationality and interval membership in explicit examples

Finding Irrationals Between Real Numbers

The previous tutorial showed that every open interval between distinct real numbers contains a rational number. The corresponding statement for irrational numbers is also true: however close two distinct endpoints are, some irrational lies strictly between them. In fact, every such interval contains infinitely many irrationals.

A useful way to establish this is to translate the interval by a fixed irrational number. Rational density supplies a rational point in the translated interval; translating that rational point back by the irrational shift produces an irrational in the original interval. This method depends on two results established earlier: the Density Theorem for the Rational Numbers and the theorem that adding a rational number to an irrational number gives an irrational number.

The Density Theorem for Irrational Numbers

Definition (Dense Set of Irrational Numbers). A set \(D\subseteq\mathbb{R}\) is dense in \(\mathbb{R}\) if, for every pair of real numbers \(a<b\), there is some \(d\in D\) such that \(a<d<b\). In particular, the irrational numbers are dense in \(\mathbb{R}\) if every such interval contains an irrational number.

Write \(\mathbb{I}=\mathbb{R}\setminus\mathbb{Q}\) for the set of irrational numbers, as in the earlier discussion of the rational–irrational partition. We use \(\sqrt{2}\) as the fixed irrational shift; its irrationality was proved in the tutorial on Irrational Numbers.

Theorem (Density of the Irrational Numbers). For any real numbers \(a<b\), there is an irrational number \(x\) such that $$ a<x<b. $$ Therefore, \(\mathbb{I}\) is dense in \(\mathbb{R}\).

Proof. Fix real numbers \(a<b\). Subtract \(\sqrt{2}\) from each endpoint. Since subtracting the same real number preserves a strict inequality, $$ a-\sqrt{2}<b-\sqrt{2}. $$ By the Density Theorem for the Rational Numbers, there is a rational number \(q\) such that $$ a-\sqrt{2}<q<b-\sqrt{2}. $$ Add \(\sqrt{2}\) to each part of this inequality. The result is $$ a<q+\sqrt{2}<b. $$ Set \(x=q+\sqrt{2}\). The number \(q\) is rational and \(\sqrt{2}\) is irrational. The theorem on Rational Shifts and Nonzero Rational Multiples says that adding a rational number to an irrational number gives an irrational number. Thus \(x\) is irrational, and the displayed inequalities place it strictly between \(a\) and \(b\). This proves the theorem. \(\square\)

The proof is an existence argument: it tells us how to obtain an irrational once a rational \(q\) has been found in the translated interval. It does not require either endpoint to be rational, or the interval to have any particular length. The only necessary condition is \(a<b\), which ensures that the translated interval still has distinct endpoints.

Worked Applications

Worked Example: An Irrational Between One and Three Halves

Consider \(x=1+\sqrt{2}/4\). Since \(\sqrt{2}>0\), we have \(x>1\). To check that \(x<3/2\), it is enough to show \(\sqrt{2}/4<1/2\), or \(\sqrt{2}<2\). Both sides of this last comparison are positive, and their squares satisfy $$ 2<4=2^2. $$ Thus \(\sqrt{2}<2\), so \(\sqrt{2}/4<1/2\), and consequently $$ 1<1+\frac{\sqrt{2}}{4}<\frac{3}{2}. $$ The number \(\sqrt{2}/4\) is irrational because it is a nonzero rational multiple of \(\sqrt{2}\). Adding the rational number \(1\) leaves it irrational by the Rational Shifts and Nonzero Rational Multiples theorem. Therefore this gives an irrational strictly between the endpoints.

Worked Example: An Irrational in a Short Interval Containing Zero

Take the interval \((-1/5,1/10)\) and choose \(x=\sqrt{2}/20\). This number is positive. For the upper bound, \(\sqrt{2}<2\), as follows from \(2<2^2\) and positivity, so $$ \frac{\sqrt{2}}{20}<\frac{2}{20}=\frac{1}{10}. $$ The lower bound \(-1/5<\sqrt{2}/20\) follows because \(-1/5<0\) and \(\sqrt{2}/20>0\). Hence $$ -\frac{1}{5}<\frac{\sqrt{2}}{20}<\frac{1}{10}. $$ Since \(1/20\) is a nonzero rational number, \(\sqrt{2}/20\) is irrational. This example also illustrates that an interval may contain zero and still contain irrationals on either side of it.

Worked Example: An Irrational Between Negative Integers

Let \(x=-1-\sqrt{2}/4\). Since \(\sqrt{2}/4>0\), we have \(x<-1\). To verify the other endpoint, note that \(\sqrt{2}<2<4\), so \(\sqrt{2}/4<1\). Therefore $$ -1-\frac{\sqrt{2}}{4}>-1-1=-2. $$ Combining the comparisons gives $$ -2<-1-\frac{\sqrt{2}}{4}<-1. $$ The number \(-\sqrt{2}/4\) is an irrational nonzero rational multiple of \(\sqrt{2}\), and adding the rational number \(-1\) preserves irrationality. Thus the displayed number is an irrational in \((-2,-1)\). The signs of the endpoints cause no change in the method: the comparisons above verify membership directly.

Approximation by Irrational Numbers

Density can also be phrased as an approximation property. Instead of specifying two endpoints, we can fix a real number \(x\) and a positive tolerance \(\varepsilon\), then ask for an irrational within distance \(\varepsilon\) of \(x\). The density theorem answers this immediately by considering the interval centered at \(x\) with radius \(\varepsilon\).

Theorem (Irrational Approximation). For every \(x\in\mathbb{R}\) and every \(\varepsilon>0\), there is an irrational number \(y\) such that $$ |x-y|<\varepsilon. $$

Proof. Let \(x\in\mathbb{R}\) and \(\varepsilon>0\). Then \(x-\varepsilon<x+\varepsilon\), since their difference is \(2\varepsilon>0\). Apply the Density Theorem for the Irrational Numbers to these endpoints. There is an irrational \(y\) satisfying $$ x-\varepsilon<y<x+\varepsilon. $$ Subtract \(x\) throughout to obtain $$ -\varepsilon<y-x<\varepsilon. $$ By the strict absolute-value bound criterion, this is equivalent to \(|y-x|<\varepsilon\). Since \(|x-y|=|y-x|\), we have \(|x-y|<\varepsilon\), as required. \(\square\)

Worked Example: An Irrational Approximation to One Third

We want an irrational within \(1/10\) of \(1/3\). Set $$ y=\frac{1}{3}+\frac{\sqrt{2}}{100}. $$ The number \(y\) is irrational because \(\sqrt{2}/100\) is a nonzero rational multiple of an irrational number, and adding the rational \(1/3\) preserves irrationality. Its distance from \(1/3\) is $$ \left|y-\frac{1}{3}\right|=\frac{\sqrt{2}}{100}. $$ Because \(\sqrt{2}<2<10\), we have \(\sqrt{2}/100<10/100=1/10\). Therefore $$ \left|y-\frac{1}{3}\right|<\frac{1}{10}. $$ This verifies both required properties: the chosen number is irrational, and its error is strictly below the specified tolerance.

Every Interval Contains Infinitely Many Irrationals

The density theorem guarantees at least one irrational in each open interval. A stronger conclusion follows by using one rational point in the interval and adding a sequence of small irrational shifts. The shifts can be made small enough to stay inside the interval, and different positive integer denominators give different points.

Theorem (Infinitely Many Irrationals in Every Open Interval). If \(a<b\), then the interval \((a,b)\) contains infinitely many distinct irrational numbers.

Proof. By the Density Theorem for the Rational Numbers, choose a rational number \(q\) with \(a<q<b\). In particular, \(b-q>0\). Since \(\sqrt{2}>0\), the Archimedean Property gives a positive integer \(N\) such that $$ N>\frac{\sqrt{2}}{b-q}. $$ Multiplying by the positive number \(b-q\), and then dividing by the positive integer \(N\), gives $$ \frac{\sqrt{2}}{N}<b-q. $$ For each integer \(n\geq N\), we have \(n\geq N>0\), so $$ 0<\frac{\sqrt{2}}{n}\leq\frac{\sqrt{2}}{N}<b-q. $$ Adding \(q\) gives $$ q<q+\frac{\sqrt{2}}{n}<b. $$ Since \(a<q\), it follows that $$ a<q+\frac{\sqrt{2}}{n}<b. $$ Each number \(q+\sqrt{2}/n\) is irrational: \(1/n\) is a nonzero rational, so \(\sqrt{2}/n\) is irrational, and adding the rational \(q\) preserves irrationality. Finally, these numbers are distinct. If \(N\leq n<m\), then \(1/n>1/m\). Multiplying by \(\sqrt{2}>0\) and adding \(q\) yields $$ q+\frac{\sqrt{2}}{n}>q+\frac{\sqrt{2}}{m}. $$ Thus different indices give different irrationals. There are infinitely many integers \(n\geq N\), so \((a,b)\) contains infinitely many distinct irrational numbers. \(\square\)

What Density Does—and Does Not—Say

The density of the irrational numbers does not mean that every real number is irrational. Rational numbers remain in every open interval as well, by the Density Theorem for the Rational Numbers. Rather, density says that neither set leaves an open gap between distinct real endpoints. Given any interval \((a,b)\) with \(a<b\), it contains at least one rational and at least one irrational; in fact, the theorem above shows it contains infinitely many irrationals.

A common pitfall is to assume that an expression involving an irrational number must itself be irrational. That is not true without checking the operations involved. For instance, \(\sqrt{2}-\sqrt{2}=0\) is rational. The constructions here use a specific fact with specific hypotheses: adding a rational to an irrational preserves irrationality, and multiplying an irrational by a nonzero rational preserves irrationality. In the infinite-family proof, \(1/n\) is nonzero because \(n\) is a positive integer; that condition is essential for applying the nonzero-multiple result.

Key takeaway. To find an irrational between \(a<b\), use rational density to choose a rational \(q\) between \(a-\sqrt{2}\) and \(b-\sqrt{2}\), then take \(q+\sqrt{2}\). This proves irrational density and, by considering intervals centered at any real number, gives irrational approximations within every positive tolerance.

Check Your Understanding

Use rational density, the irrationality of \(\sqrt{2}\), and the interval and absolute-value results from earlier in the course to answer these questions.

  1. Why does translating both endpoints of an interval by \(-\sqrt{2}\) preserve their strict order?
  2. In the proof of irrational density, why is \(q+\sqrt{2}\) irrational when \(q\) is rational?
  3. How does irrational density imply that every real number can be approximated by irrationals within any positive tolerance?
  4. In the proof that every interval contains infinitely many irrationals, where is the Archimedean Property used?
  5. Why must the rational multiple \(1/n\) in the infinite-family construction be nonzero?