# Nearest neighbor of an irrational number

I am confused in my thoughts about the irrational numbers in real line. My confusion is: If $x\in$$\mathbb R$$-\mathbb Q$ then for $\epsilon>0$ as small as you please, the element ($x+\epsilon$) belongs to $\mathbb Q$ or $\mathbb R$$-\mathbb Q$ ?

• My thought(which confused me): (1)As any interval of $\mathbb R$ doesn't contain only irrationals (or rationals), it suggests that irrationals are disconnected and hence the nearest neighbor of an irrational number must be rational thereby making me think that ($x+\epsilon$) is rational.
• (2) If I am correct in (1), then what are the unique $p$ and $q$ s.t. $x+\epsilon=\frac{p}{q}$ where $gcd(p,q)=1$? I took $x=√2$ but unable to find such $p$ and $q$. Kindly help.
• Both the rational numbers and the irrational numbers are dense. It is possible then that $x+\epsilon$ will be rational. It is also possible that $x+\epsilon$ will be irrational. It depends on the specific value of $\epsilon$ in relation to $x$. – JMoravitz Jun 25 '16 at 15:22
• The short answer is: It depends on $\epsilon$. It could be a rational number, it could be an irrational number, and there is no way to tell in advance which is which. You just have to calculate $x + \epsilon$ and see. – Arthur Jun 25 '16 at 15:23
• There are both rationals and irrationals as close to $x$ as desired. Think of the decimal expansion of $x$...you can keep the first $N$ the same and then have all $0's$ after (to make a rational extremely close to $x$) or , after the first $N$, you can replace the digits of $x$ with those of your favorite irrational to get an irrational extremely close to $x$. – lulu Jun 25 '16 at 15:24
• Also, you say "the nearest neighbor of an irrational number"... but there is no nearest... If you suggest a number $y$ to be the nearest number to $x$ while being unequal, then I will show you $\frac{x+y}{2}$ which is nearer. – JMoravitz Jun 25 '16 at 15:24

You say "the nearest neighbor of an irrational number". But there is no such thing. If you suggest a number $y\ne x$ as the nearest number to $x$, then you must be wrong because $\frac{x+y}{2}$ is nearer. [Thanks to @JMoravitz ]
You can get both rationals and irrationals as close to $x$ as you wish. Think of the decimal expansion of $x$ ... you can keep the first $N$ places the same and then all $0$s to get a close rational or you can replace the remaining digits with those from $\pi$ to get a close irrational. [Thanks to @lulu ]
So the short answer to your question is it could be either: $x+\epsilon$ could be rational or irrational depending on the value of $\epsilon$. [Thanks to @Arthur ]
• @almagest no spaces between the square braces and parenthesis. Also http:// is a must. Adding a bit more words...[google](http://www.google.com) displays as google. – JMoravitz Jun 25 '16 at 15:46