# Real Analysis Inequality Proof Involving Reals and Rationals $0 < |r - q| < \varepsilon$

I'm having difficulties making progress in proving: $$\forall \varepsilon > 0, \ \exists q \in Q \text{ where } 0 < |r - q| < \varepsilon$$

To clarify, $$r$$ is a real number and $$q$$ is a rational number.

Is there some theorem I should be using? This exercise is presented in the same section/chapter as the Completeness Axiom (each nonempty set has a least upper bound or supremum), the Archimedean Property of Real Numbers ($$\exists n \in Z^{+}$$ such that $$na>b$$ for positive real numbers $$a$$ and $$b$$), and a theorem stating there is a rational and irrational number between any two distinct real numbers.

I'm just not seeing the connection (if any at all). Any help in the right direction would be much appreciated. Thank you!

• Dirichlet's approximation theorem should be helpful. Jan 12, 2019 at 10:40
• You know that there is a rational between any two distinct reals. Consider $r$ and $r+\epsilon$. Jan 12, 2019 at 10:42

Choose some positive integer $$n$$ such that $$n>\frac{1}{\varepsilon}$$. Define $$q$$ as $$\frac{[nr]+1}{n}$$. Then, $$|r-q|=\frac{1-\{nr\}}{n}\in (0;\varepsilon)$$.
• Could you clarify the notation of [nr] in defining q as $\frac{[nr]+1}{n}$ and the notation of {nr} in defining $|r - q| = \frac{1-{nr}}{n}$? Thanks! Jan 13, 2019 at 18:27
• For real $x$ we define the floor function of $x$ - $[x]$ as integer $n$ such that $n\leq x<n+1$ (it's easy to see that such integer exists and unique). Jan 13, 2019 at 20:05
• So the [nr] defined in q and the {nr} in |r - q| both evaluates to integers by definition of the floor function? Also, I don't get how you got to |r - q| = $\frac{1 - [nr]}{n}$. Could you help me understand the steps involved? Thanks again! Jan 13, 2019 at 20:10
• No, $\{x\}$ is known as fractional part of $x$ and it's defined as $\{x\}:=x-[x]$. Hence, from definition we always have $0\leq \{x\}<1$. Jan 13, 2019 at 21:40
No need to any theorem. Let $$r\notin\Bbb Q$$ and $$x=10^k\cdot r$$for some value of $$k\in \Bbb R$$ then define $$n\triangleq\Big\lfloor10^k\cdot r\Big\rfloor$$which leads to $$n\le 10^k\cdot ror $${n\over 10^k}-{1\over 10^k}finally $$0<|r-{n\over 10^k}|<{1\over 10^k}<\epsilon$$ and $$q={n\over 10^k}$$ when $$k>-\log \epsilon$$
For the case $$r\in \Bbb Q$$, define $$q=r+{1\over 10^k}$$ for large enough $$k\in \Bbb N$$.