# Prove that the irrational numbers are dense [duplicate]

In Understanding Real Analysis, exercise 1.4.5 asks us to prove that between any two real numbers a and b there is at least one irrational number. The hint says to do this by considering a-sqrt(2) and b-sqrt(2). I believe I have proven it, but not using the hint. How can I prove it using the hint?

My proof: If a and b were both rational then $$a+(\sqrt{2}/2)(b-a)$$ is an irrational number between a and b

If a were rational and b were irrational, or a were irrational and b were rational, then $$(a+b)/2$$ would be an irrational number between a and b

If a and b were both irrational, then choose q between 1 and b/a. q*a would be an irrational number between a and b.

Is my proof correct and also how can I prove it using the hint?

• What if $a$ or $b$ is irrational? Commented Sep 9, 2021 at 21:50
• To prove it, note that there is a rational number $q$ between $a - \sqrt{2}$ and $b - \sqrt{2}$. Therefore, $q + \sqrt{2}$ is an irrational number between $a$ and $b$. Commented Sep 9, 2021 at 21:51
• Is it assumed that you know that between any two real numbers there is a rational? If so then your proof and the hint are similar in that you "offset" by an irrational number and find a rational between two numbers and then undo the offset to have an irrational. The hint is: there is a rational $q$ so that $a -\sqrt 2 < q< a-\sqrt b$ so $a < q + \sqrt 2 < b$ and $x=q+\sqrt 2$ is the irrational you want. You more or less did a similar thing but took a lot of steps. And I guess you considered the multi (not addition) properties of rationals and irrationals. Addition may have made it easier. Commented Sep 9, 2021 at 22:45