Show that ? is Dense in the Real Numbers Using Supremum

real-analysis

I am stuck on a homework the teacher gave us to hand in. It is stated as following:

The set of rational numbers $\mathbb{Q}$ given by all $q = \frac{m}{n}$ for some $m, n \in \mathbb{Z}$ with $n \neq 0$ is dense in the real numbers in the following sense:
For each real $\epsilon > 0$ and $x \in \mathbb{R} \exists q_{\epsilon}: |x- q_{\epsilon}| < \epsilon$

With the problem, I am given a hint:

Prove the statement first for $x > 0$ Let $\mathbb{Q}_{x}$ be the set of rational numbers, such that $a \in \mathbb{Q}_{x} \Rightarrow a \leq x$. Why is $\mathbb{Q}_{x}$ nonempty? Apply the supremum property to $\mathbb{Q}_{x}$ and prove that the supremum of $\mathbb{Q}_{x}$ is $x$

Here my attempts:
Suppose $x > 0$. Let $\mathbb{Q}_{x}$ the set of $q \in \mathbb{Q}$ s.th. $q \leq x$.

(i) Show that $\mathbb{Q}_{x}$ is nonempty:

$ q \leq x \Rightarrow \frac{m}{n} \leq x \Rightarrow n \geq \frac{m}{x}$. Then by the Archimedian property and the fact that $\mathbb{N}$ is a subset of $\mathbb{Z}$ there exists an $n$ for which this is the case, thus $\mathbb{Q}_{x}$ is nonempty.

(ii) Supremum

By defintion, $\mathbb{Q}_{x}$ is a bounded set. Thus, by the supremum property, $\mathbb{Q}_{x}$ has a supremum.

(iii) Show that $x = sup(\mathbb{Q}_{x})$

(I am not too certain how to show this, but I think I will get it in time, however, hints are appreciated)

But from then on I am stuck. For any x > 0, I can show that there is a set of rational numbers for which x is the supremum. Thus, I can find a rational number arbitratly close to x, making $x-q < \epsilon$?
And what about $x\neq0$? How does my result help me there?

Thanks for the time and advice!


First, thanks for your help. However, I am still in need of some more. I find myself unable to show that if $\mathbb{Q}_{x}$ is bounded by $x$, $x$ is indeed the supremum of that set. If I suppose that there is a $y < x$ and that that $y$ is an upper bound (in order to prove by contradiction), how can I find a $q \in \mathbb{Q}_{x}$ which is larger than $y$ without using that between any two real numbers, there lies a rational number, which is what I am supposed to show in the first place?

Best Answer

Another way to see that that $\mathbb Q$ is dense in $\mathbb R$ is by showing that $\frac{\left\lfloor{nx}\right\rfloor}{n}$ is a sequence of rational numbers that converges to $x$ for $n$ goes to infinity. If you want this sequence also helps you to show that $x$ is the supremum of $\mathbb Q_x$, because $\frac{\left\lfloor{nx}\right\rfloor}{n}$ converges to $x$ from below...

To be clear the floor function is defined as $\left\lfloor{y}\right\rfloor:= \max \{m\in \mathbb Z: m \leq y \}$.