# What fields between the rationals and the reals allow to define the usual 2D distance?

Consider a field $$K$$, let's say $$K \subseteq \mathbb R$$. We can consider the 'plane' $$K \times K$$. I am wondering in which cases the distance function $$d: K \times K \to \mathbb R$$, defined as is normal by $$d(x, y) = \sqrt{x^2 + y^2}$$, takes values in $$K$$.

Certainly this is not true for $$\mathbb Q$$: we have $$d(1, 1) = \sqrt{2} \notin \mathbb Q$$. If we take any $$K$$ which is closed under taking square roots of non-negative numbers, then certainly $$d$$ will take values in $$K$$.

However, a priori it might still be true that $$a \in K$$ positive has no square root, yet this does not provide an obstruction because there is no way to write $$a = x^2 + y^2$$. Thus I am wondering:

Are there fields $$K \subseteq \mathbb R$$ which do not have all square roots of positive numbers, yet are closed under $$d$$?

• Just so you know, there are other distances besides euclidean distance. – PyRulez Mar 21 at 23:47

Consider the tower of fields

$$K_0:=\mathbb{Q}$$,

$$K_{i+1}:=K_i(\sqrt{x^2+y^2}| x,y\in K_i)$$,

$$K:=\bigcup_i K_i$$.

Then $$K$$ is closed under $$d$$ and contains $$1+\sqrt 5$$ but not $$\sqrt{1+\sqrt 5}$$, as I have found by following the Pythagorean fields Wikipedia link given by @Dirk in his answer: If $$\sqrt{1+\sqrt 5}$$ were in $$K$$ then $$1+\sqrt 5$$ would be a sum of two squares in some extension $$K_i$$, and then it would be so in an extension of $$\mathbb{Q}(\sqrt 5)$$, which implies that it is a sum of squares in $$\mathbb{Q}(\sqrt 5)$$, which is impossible because that would entail that $$1-\sqrt 5$$, which is negative, is also a sum of squares in $$\mathbb{Q}(\sqrt 5)$$.

The details can be found in Chapter 5 of the book Geometric constructions by Martin. The relevant results are Theorems 5.10-5.15.

Similarly, $$\sqrt 2\in K$$ but $$\sqrt2\not\in K$$, and more in general, this is true for any positive number which is not a sum of squares in the first extension in which it appears.

Geometrically, numbers in $$K$$ correspond to constructible points by ruler and dividers. Hence $$\sqrt2$$ is constructible by rule and compass but not by rule and dividers.

• "which implies that it is a sum of squares in $\mathbb Q(\sqrt{5})$" -- I do not see directly how this follows from the previous sentence, but I could very well be missing something obvious. – Mees de Vries Mar 21 at 13:04
• @MeesdeVries Not obvious, it is a consequence of Theorems 5.10-5.13 in Martin's book. – Jose Brox Mar 21 at 13:06
• $K$ is countable, right? – PyRulez Mar 21 at 20:00
• @PyRulez yeah the same construction which makes $\mathbb Q$ countable from $\mathbb N^2$ plus skipping over duplicates should work to imply that $K_{i+1}$ is countable given that $K_{i}$ is countable, skipping over duplicates; by induction therefore all $K_i$ are countable; then we should be able to repeat the same construction again with $K_m(n)$, again skipping over duplicates, to find that $K$ is countable. – CR Drost Mar 21 at 21:52
• @PyRulez Yes: clearly, all elements of $K$ are algebraic, and algebraic numbers are countable (there is a countable number of rational polynomials, with a finite number of roots each) – Jose Brox Mar 21 at 22:57

edit: Look what I found: Wiki

The field $$\mathbb{Q}(\sqrt{p} \mid p \in \mathbb{P})$$ might be a good candidate.
At least, all fields closed under $$d$$ must contain this field.

• Why must a field closed under $d$ contain $\sqrt{3}$? – FredH Mar 21 at 10:51
• @FredH, it must contain $\sqrt{2} = d(1, 1)$, and thus it must contain $\sqrt{3} = d(1, \sqrt{2})$. – Mees de Vries Mar 21 at 10:53
• – lhf Mar 21 at 11:16
• I don't think this works: $d(\sqrt 2 + 1, 1) = \sqrt{2\sqrt2 + 4}$, but that doesn't look like a sum of square roots of rational numbers. – Arthur Mar 21 at 12:05