# $\{ a + b\sqrt{2} \ : \ a, b \in \mathbb{Z} \}$ dense in $\mathbb{R}$? [duplicate]

This question already has an answer here:

I'm guessing $\{ a + b\sqrt{2} \ : \ a, b \in \mathbb{Z} \}$ is dense in $\mathbb{R}$. I'm having a mental block. How do you show that?

(This is motivated by a different hypothesis: if $f$ is continuous with two periods $T_1$, $T_2$, then $f$ is constant if $T_1/T_2$ is not rational.)

## marked as duplicate by Jonas Meyer, jdoicj, MJD, Rick Decker, user147263 Dec 19 '14 at 17:54

• There may be a simpler way to go about it, but I believe it follows from For an irrational number $a$ the fractional part of $na$ for $n\in\mathbb N$ is dense in $[0,1]$. The main argmuent used is the pigeonhole principle: Divide $[0,1]$ into $n$ subintervals; there are more than $n$ multiplies of $a$, so two must be in the same subinterval. – MJD Dec 19 '14 at 17:23
• Yes it does. Looks like this is fairly easy to show, so I'm happy to run with that for now. Thanks – Simon S Dec 19 '14 at 17:25
• Okay, I have posted that as an answer. – MJD Dec 19 '14 at 17:26
• – Jonas Meyer Dec 19 '14 at 17:27

There may be a simpler way to go about it, but I believe it follows from For an irrational number $$a$$ the fractional part of $$na$$ for $$n\in\mathbb N$$ is dense in $$[0,1]$$. The main argument used is the pigeonhole principle: Divide $$[0,1]$$ into $$k$$ subintervals; there are more than $$k$$ multiples of $$a$$, so two must be in the same subinterval; therefore there are two multiples of $$a$$ that differ by less than $$\frac1k$$.

Note that some of the fussy details in the answers there deal with the fact that the index set is $$\Bbb N$$ rather than $$\Bbb Z$$; since you want $$\Bbb Z$$ the arguments can be simplified.

Try a kind of Euclid's algorithm to find $\gcd(1,\sqrt 2)$:

$$\sqrt 2=1+r_1$$ $$1=q_1r_1+r_2$$ $$\ldots$$

Obviously, you never end, precisely because of the irrationality of $\sqrt 2$. You should find that for any $\epsilon>0$, there exist $a,b$ such that $|a+b\sqrt 2|<\epsilon$.

An additive subgroup $A$ of $\mathbb R$ is either cyclic or dense. This depends on whether $\inf A \cap \mathbb R^+ = 0$.

Your group contains $\alpha=-1+\sqrt 2$ and all its powers. Since $0 <\alpha <1$, the group cannot be cyclic, because $\alpha^n \to 0$.

• Thanks to you and @Clement C for this. I had forgotten this result. – Simon S Dec 19 '14 at 17:27

Writing $G = \{ a + b\sqrt{2} \mid a, b \in \mathbb{Z} \}$, can you show that $(G,+)$ is a subgroup of $(\mathbb{R},+)$? Then, what do you know about the additive subgroups of $\mathbb{R}$? $(\dagger)$

$(\dagger)$ They are all of the form $c\mathbb{Z}$, or dense.

• This is just obscuring the question. Why are subgroups that are not of the form $c \mathbb{Z}$ dense? – Dzoooks Apr 21 at 2:27
• @Dzoooks Because it is a standard exercise/fact, one very good to know, and not really hard to show. See, e.g., this. – Clement C. Apr 21 at 9:08
• That is more words than and is equivalent to the pigeonhole principle answer on this page! – Dzoooks Apr 21 at 14:55
• @Dzoooks and so? This is a valid answer, it works, and highlights another useful result worth knowing. Nothing asks you to use this approach; it is nonetheless a legitimate one. – Clement C. Apr 21 at 14:57
• It is a way to overcome the "mental block" the OP had and solve the question. As such, it is an answer. I don't know what else to respond, nor what your issue is with this 5-year old post. Further, if you have any doubt as to whether this is useful, read the comment left by the OP on lhf's answer: you will see that the OP did, in fact, find this helpful. @Dzoooks – Clement C. Apr 21 at 15:03