# Is there a dense planar rational point set within which the distance of any two points is an irrational number?

i.e. could we find a subset $$X\subset \mathbb{Q}^2$$ such that $$\overline{X}=\mathbb{R}^2$$ and that for any $$x,y\in X$$ the distance $$|x-y|$$ is an irrational number?

I'm considering the following assertion of which I'm not sure :

Given finite rational points $$p_1,p_2,\dots,p_n$$ , and an open ball $$D$$ on the plane, there is a rational point $$x\in D$$ such that $$|x-p_i|\in \mathbb{R}\backslash \mathbb{Q}$$ for $$i=1,2,\dots,n$$.

But this assertion accounts to be the following seemingly number-theoretic problem:

Given $$n$$ pairs $$(a_i,b_i) (i=1,2,\dots,n)$$ of positive integers such that $$a_i^2+b_i^2$$ is not square of any integer. Could we find an integer $$N\geq 2$$ such that the integral pairs $$(Na_i+1,Nb_i)$$ still satisfy the previous property(i.e. $$(Na_i+1)^2+(Nb_i)^2$$ is not square of any integer).

BTW the distribution of the Pythagorean triples might help.

• I'm a bit confused - why can one not take $X$ consisting of the two points $(0,0)$ and $(1,1)$? Apr 9, 2021 at 15:25
• Sorry my bad, I want $X$ to be a dense set. Now it's added.
– user178596
Apr 9, 2021 at 15:31
• Why do you take $N a_i +1$ and not $N a_i$ plus an integer which is at most a small multiple of $N$? Apr 9, 2021 at 15:50
• @WillSawin Here is my original thought: Once we get the first assertion we could using a seemingly 'exhaustion' of $\mathbb{R}^2$ to get one approach of constructing such $X$. So I'm hoping to prove the assertion. Notice that the distance of $x=(x_1,x_2)$ and $y=(y_1,y_2)$ is rational iff the slope of line $\overline{xy}$ lies in $f(\mathbb{Q})$ where $f=(x-1/x)/2$. Hence pick a rational point $t$ of $D$ and perturb it slightly(making one coordinate $+1/n$ in my way) to make the distances between $t$ and $p_i$ irrational for the rational ones and leave the irrational ones irrational still.
– user178596
Apr 9, 2021 at 16:07
• What you need to do is count solutions to the equation $(Na+1)^2 + N b^2 = M^2$ for fixed $a$, $b$, with $N <X$, and show the answer is much smaller than $X$ for $X$ large. This can be done using Pell's equation or congruences, for example. Apr 9, 2021 at 16:22

Construction: Find a sequence $$p_1,p_2,\dots$$ of the rational points such that each point appears infinitely often, and let $$G_1$$ be the integer grid. For each $$i$$ in sequence, replace $$p_i$$ by the nearest half-integral point $$q_i$$ of grid $$G_i$$, and then subdivide the grid by two to produce a new grid $$G_{i+1}$$ in which $$q_i$$ is integral. Then the resulting sequence of points $$q_i$$ gets arbitrarily close to every rational point, so it is dense, every point is rational (more strongly dyadic rational), and by the observation every point is at irrational distance from all previous points.