# is it possible to find the closest rational number to an irrational number?

given an irrational number is it possible to find the closest rational number to the irrational number? If so, how?

-
No: if $x$ is any irrational number, and $q$ is any rational number, there is another rational number between $x$ and $q$. –  Brian M. Scott Dec 13 '12 at 9:45
On the other hand, Liouville's theorem on irrational algebraic numbers says there is an upper bound on how well you can approximate such numbers by rationals. –  Zhen Lin Dec 13 '12 at 10:12
The continued fraction of your irrational number will allow you to get fractions as near as you want from your irrational (in some way the bests possible). –  Raymond Manzoni Dec 13 '12 at 22:35

No. It is a fact that in any open interval $]a,b[$ there exists a rational number.

Proof:

Assume WLOG that $a>0$. Let $n$ be a positive integer such that $\frac{1}{b-a}<n$. Now consider the subset of natural numbers $\{m\in N|a<\frac{m}{n}\}$. By the well ordering principle, we know that this set has a minimum $m_0$. Because of the way $m_0$ was chosen we know that: $$\frac{m_0-1}{n}\leq a<\frac{m_0}{n}$$ Thus: $a<\frac{m_0}{n}\leq a+1/n<a+b-a=b$

Let $x$ be irrational and $r$ be the closest rational number, now get a closer rational from the interval $]r,x[$ (or $]x,r[$ if $x<r$).

-
That's what I thought. So is there then an interval on which there aren't any rational numbers around an irrational, and is it possible to find it? –  user1066113 Dec 13 '12 at 9:57
I edited my answer to include a proof of the first fact I used –  Amr Dec 13 '12 at 10:10

There is no closest one, as already pointed out. However, you can sometimes estimate how far a rational number is from an irrational one. Take $\sqrt{2}$ for example and a rational number $\frac{p}{q}$. Then

$$\frac{p^2}{q^2} - 2 = \frac{p^2 - 2q^2}{q^2}.$$

Since the numerator is a non-zero integer this shows

$$\left|\frac{p}{q} - \sqrt{2}\right| \cdot \left| \frac{p}{q} + \sqrt{2} \right| = \left|\frac{p^2}{q^2} - 2 \right| \geq \frac{1}{q^2}$$

and so if $\left| \frac{p}{q} - \sqrt{2} \right| \leq \varepsilon$ then

$$\left|\frac{p}{q} - \sqrt{2}\right| \geq \frac{1}{q^2 ( 2\sqrt{2} + \varepsilon)}.$$

See here for a more general discussion.

-