# Proof that the set of irrational numbers is dense in reals

I'm being asked to prove that the set of irrational number is dense in the real numbers. While I do understand the general idea of the proof:

Given an interval $(x,y)$, choose a positive rational number (say) $z=\sqrt{2}$. By density of rationals, there exists a rational number $p$ in the interval $(x/z, y/z)$, which essentially means that $$\frac{x}{\sqrt{2}} < p < \frac{y}{\sqrt{2}}.$$ I find that $pz$ is irrational, since it is the product of a rational and irrational number. However, my instructions besides writing that proof down is to specifically verify that $y=xz$ is irrational. What does this have to do with anything and how does it prove denseness of irrationals? Regardless, assume that $x$ is a nonzero rational number and that $z$ is irrational. For the sake of contradiction, assume that $y=xz$ is rational. This should mean that $y/x$ rational as well, and therefore that $z$ is rational, a contradiction.

• I am confused too. It seems to me that at the beginning $x$ and $y$ are arbitrary real numbers with $x < y$, but later you say that $y = xz$... – Tunococ Sep 18 '14 at 1:45

Another argument:

$\mathbb{Q}$ is dense in $\mathbb{R}$, so $\mathbb{Q} + \sqrt{2}$ is dense in $\mathbb{R} + \sqrt{2} = \mathbb{R}$. Since $\mathbb{Q} + \sqrt{2}$ is a subset of the irrationals, we conclude that the irrationals are also dense in $\mathbb{R}$.

By the density of rational numbers, there exists a rational number $r \in (x, y)$.

Since $\frac{y - r}{2} > 0$, by the Archimedian Property, there exists $n \in \mathbb{N}$ such that $\frac{y - r}{2} > \frac{1}{n}$.

Then we have $x < r + \frac{\sqrt{2}}{n} < r + \frac{\sqrt{4}}{n} < y$.

Now we check that $s = r + \frac{\sqrt{2}}{n}$ is an irrational number sitting in $(x, y)$.

• Isn't it easier/better to understand, if you change $\frac{\sqrt{2}}{n}$ to $\frac{1}{n\sqrt{2}}$? – Florian Wendelborn May 17 '16 at 11:30

The density of the irrationals follows from the density of the rationals and the existence of positive irrational numbers. Indeed, given an interval $(a,b)$, choose any positive irrational number $z$; for instance, choose $z = \sqrt2$. By the density of the rationals there is a rational number $x$ in the interval $(a/z, b/z)$ so that $zx$ lies in the interval $(a, b)$ and $zx$ is irrational since it is the product of an irrational number and a rational number.

Source: ADVANCED CALCULUS by Patrick M. Fitzpatrick

For any real number $x$, the sequence of irrational numbers: $$x_n = \frac{\lfloor nx\rfloor}{n}+\frac{1}{\sqrt{n^2+1}}$$ converges towards $x$, since: $$|\,x_n - x\,|\leq \frac{2}{n}.$$

I guess this is what you're going for.

We first prove that $u/\sqrt{2}$ is irrational whenever $u$ is a non-zero rational number. Suppose, for a contradiction, that $\gamma=u/\sqrt{2}$ is rational. If $\gamma=0$ then we must have $u=0$, contradiction. If $\gamma\neq0$ then we can divide by $\gamma$, whence $\sqrt{2}=u/\gamma$. Since the quotient of two rational numbers is also rational, it then follows that $\sqrt{2}$ is rational, another contradiction. It must follows that $\gamma=u/\sqrt{2}$ must be irrational whenever $x$ is rational.

Pick any two non-zero rational numbers $x$ and $y$, and assume without loss of generality that $x<y$. Then $\alpha = x/\sqrt{2}$ and $\beta = y/\sqrt{2}$ are both irrational. You know that the rationals are dense in the reals. In particular that means that if I take two irrational numbers $\alpha$ and $\beta$ then you can find a rational number $r$ with $\alpha<r<\beta$. Hence you can find a rational number $r$ such that $\lvert x/\sqrt{2}\rvert <r<\lvert y/\sqrt{2}\rvert$, whence $$\lvert x\rvert <\frac{r}{\sqrt{2}}<\lvert y\rvert.$$

• If $x$ and $y$ are both positive, then we have found an irrational between them.
• If $x$ and $y$ are both negative, then $-r/\sqrt{2}$ is an irrational between them.
• If $x$ is negative and $y$ is positive then note that $x<\lvert x \rvert$ and so $r/\sqrt{2}$ is again an irrational between them.

This proves that between any two rational numbers there exists an irrational number. You already know that between any two numbers $a$ and $b$ there exists a rational number $r_{1}$, and then between $r_{1}$ and $b$ you can find another rational number $r_{2}$. Hence between any two numbers $a$ and $b$ there are two rational numbers, and between those two rational numbers there is an irrational number. This proves that the irrationals are dense in the reals.

• Why from $|x/\sqrt{2}| < r < |y/\sqrt{2}|$ didn´t you get $|x| < r\sqrt{2} < |y|$ instead? – User1618 Apr 17 at 21:33
• @Wybie: ah, that's just a mistake, sorry. But I'm sure you can see how to fix the argument. – Will R Apr 17 at 21:38

It sufficient to show that there is a irrational between $a<b\in \mathbb{Q}$. Since $1/\sqrt{2}\in (0,1)$ consider the map $(0,1)\to (a,b)$, $\,t\mapsto(b-a)t+a$, what can you say about $(b-a)/\sqrt{2}+a$?

If $(a,b) = (a,b) \cap\mathbb{Q}$, then $|(a,b)| = \aleph_0$. But $f:(a,b) \to \mathbb{R}$ given by $$f(x) = \tan\left(\frac{\pi}{b-a}\left(x - \frac{b+a}{2}\right)\right)$$

is a bijection.

A set $A\subset \mathbb R$ is dense in $\mathbb R$ if $Cl(A)=\mathbb R$, where $Cl(A)=A\cup der(A)$ is closure of $A$.