I need to find a way of proving that the square roots of a finite set of different primes are linearly independent over the field of rationals.

I've tried to solve the problem using elementary algebra and also using the theory of field extensions, without success. To prove linear independence of two primes is easy but then my problems arise. I would be very thankful for an answer to this question.

  • 1,633
  • 3
  • 12
  • 6
  • I need the square roots of prime numbers – user8465 Apr 03 '11 at 17:45
  • 3
    http://mathforum.org/library/drmath/view/51638.html – Yuval Filmus Apr 03 '11 at 17:53
  • 5
    Also, see this: http://qchu.wordpress.com/2009/07/02/square-roots-have-no-unexpected-linear-relationships/ – Ehsan M. Kermani Apr 03 '11 at 18:14
  • 1
    This also comes up in T..'s answer here: http://math.stackexchange.com/questions/6244/is-there-a-quick-proof-as-to-why-the-vector-space-of-mathbbr-over-mathbbq/6517#6517 – Jonas Meyer Apr 03 '11 at 18:41
  • 7
    @J.M.: after Yuval's hint to the mathforum I'd like to mention, that the text of the question is 100% identical with that of the mathforum of 1996, and the fact that neither its reference was given nor anything about the existing answers there was mentioned I assume a) this is not a real question (also there was no followup interaction of "user8465") , and (see the recent meta thread on spam) b) maybe not even a real person asking but possibly an automated transfer of a somehow mathematically sounding text. Maybe that method of spam has been refined recently... – Gottfried Helms Oct 11 '11 at 09:16
  • add: the meta-thread on spambots which I mentioned in the previous comment is http://meta.math.stackexchange.com/questions/3063 – Gottfried Helms Oct 11 '11 at 10:00
  • 2
    @Gottfried The question is surely not spam - see my comments [here.](http://meta.math.stackexchange.com/questions/3063/whats-up-with-all-the-spambots/3072#3072) – Bill Dubuque Oct 11 '11 at 16:11
  • A recent post on MO which is related: [Sum of square roots of natural numbers](https://mathoverflow.net/q/396205). – Martin Sleziak Jun 28 '21 at 06:36

3 Answers3


Below is a simple proof from one of my old sci.math posts, followed by reviews of a few related papers.

Theorem $\ $ Let $\rm\,Q\,$ be a field with $2 \ne 0,\,$ and $\rm\ L = Q(S)\ $ be an extension of $\rm\,Q\,$ generated by $\rm\, n\,$ square roots $\rm\ S = \{ \sqrt{a}, \sqrt{b},\ldots \}$ of $\rm\ a,b,\,\ldots \in Q.\,$ If every nonempty subset of $\rm\,S\,$ has product $\rm\not\in Q\,$ then each successive adjunction $\rm\ Q(\sqrt{a}),\ Q(\sqrt{a},\sqrt{b}),\,\ldots$ doubles degree over $\rm Q,\,$ so, in total, $\rm\, [L:Q] = 2^n.\,$ Thus the $\rm 2^n$ subproducts of the product of $\rm\,S\, $ are a basis of $\rm\,L\,$ over $\rm\,Q.$

Proof $\ $ By induction on the tower height $\rm\,n =$ number of root adjunctions. The Lemma below implies $\rm\ [1, \sqrt{a}\,]\ [1, \sqrt{b}\,] = [1, \sqrt{a}, \sqrt{b}, \sqrt{ab}\,]\ $ is a $\rm\,Q$-vector space basis of $\rm\, Q(\sqrt{a}, \sqrt{b})\ $ iff $\ 1\ $ is the only basis element in $\rm\,Q.\,$ We lift this to $\rm\, n > 2\,$ i.e. to $\, [1, \sqrt{a_1}\,]\ [1, \sqrt{a_2}\,]\cdots [1, \sqrt{a_n}\,]\,$ with $2^n$ elts.

$\rm n = 1\!:\ L = Q(\sqrt{a})\ $ so $\rm\,[L:Q] = 2,\,$ since $\rm\,\sqrt{a}\not\in Q\,$ by hypothesis.

$\rm n > 1\!:\ L = K(\sqrt{a},\sqrt{b}),\,\ K\ $ of height $\rm\,n\!-\!2.\,$ By induction $\rm\,[K:Q] = 2^{n-2} $ so we need only show $\rm\, [L:K] = 4,\,$ since then $\rm\,[L:Q] = [L:K]\ [K:Q] = 4\cdot 2^{n-2}\! = 2^n.\,$ The lemma below shows $\rm\,[L:K] = 4\,$ if $\rm\ r = \sqrt{a},\ \sqrt{b},\ \sqrt{a\,b}\ $ all $\rm\not\in K,\,$ true by induction on $\rm\,K(r)\,$ of height $\rm\,n\!-\!1\,$ shows $\rm\,[K(r):K] = 2\,$ $\Rightarrow$ $\rm\,r\not\in K.\quad$ QED

Lemma $\rm\ \ [K(\sqrt{a},\sqrt{b}) : K] = 4\ $ if $\rm\ \sqrt{a},\ \sqrt{b},\ \sqrt{a\,b}\ $ all $\rm\not\in K\,$ and $\rm\, 2 \ne 0\,$ in $\rm\,K.$

Proof $\ \ $ Let $\rm\ L = K(\sqrt{b}).\,$ $\rm\, [L:K] = 2\,$ by $\rm\,\sqrt{b} \not\in K,\,$ so it suffices to show $\rm\, [L(\sqrt{a}):L] = 2.\,$ This fails only if $\rm\,\sqrt{a} \in L = K(\sqrt{b})$ $\,\Rightarrow\,$ $\rm \sqrt{a}\ =\ r + s\ \sqrt{b}\ $ for $\rm\ r,s\in K,\,$ which is false, because squaring yields $\rm\,(1):\ \ a\ =\ r^2 + b\ s^2 + 2\,r\,s\ \sqrt{b},\, $ which is contra to hypotheses as follows:

$\rm\qquad\qquad rs \ne 0\ \ \Rightarrow\ \ \sqrt{b}\ \in\ K\ \ $ by solving $(1)$ for $\rm\sqrt{b},\,$ using $\rm\,2 \ne 0$

$\rm\qquad\qquad\ s = 0\ \ \Rightarrow\ \ \ \sqrt{a}\ \in\ K\ \ $ via $\rm\ \sqrt{a}\ =\ r + s\ \sqrt{b}\ =\ r \in K$

$\rm\qquad\qquad\ r = 0\ \ \Rightarrow\ \ \sqrt{a\,b}\in K\ \ $ via $\rm\ \sqrt{a}\ =\ s\ \sqrt{b},\, \ $times $\rm\,\sqrt{b}\quad\quad$ QED

In the classical case $\rm\:Q\:$ is the field of rationals and the square roots have radicands being distinct primes. Here it is quite familiar that a product of any nonempty subset of them is irrational since, over a UFD, a product of coprime elements is a square iff each factor is a square (mod units). Hence the classical case satisfies the theorem's hypotheses.

Elementary proofs like that above are often credited to Besicovitch (see below). But I have not seen his paper so I cannot say for sure whether or not Besicovic's proof is essentially the same as above. Finally, see the papers reviewed below for some stronger results.

2,33f 10.0X
Besicovitch, A. S.
On the linear independence of fractional powers of integers.
J. London Math. Soc. 15 (1940). 3-6.

Let $\ a_i = b_i\ p_i,\ i=1,\ldots s\:,\:$ where the $p_i$ are $s$ different primes and the $b_i$ positive integers not divisible by any of them. The author proves by an inductive argument that, if $x_j$ are positive real roots of $x^{n_j} - a_j = 0,\ j=1,...,s ,$ and $P(x_1,...,x_s)$ is a polynomial with rational coefficients and of degree not greater than $n_j - 1$ with respect to $x_j,$ then $P(x_1,...,x_s)$ can vanish only if all its coefficients vanish. $\quad$ Reviewed by W. Feller.

15,404e 10.0X
Mordell, L. J.
On the linear independence of algebraic numbers.
Pacific J. Math. 3 (1953). 625-630.

Let $K$ be an algebraic number field and $x_1,\ldots,x_s$ roots of the equations $\ x_i^{n_i} = a_i\ (i=1,2,...,s)$ and suppose that (1) $K$ and all $x_i$ are real, or (2) $K$ includes all the $n_i$ th roots of unity, i.e. $ K(x_i)$ is a Kummer field. The following theorem is proved. A polynomial $P(x_1,...,x_s)$ with coefficients in $K$ and of degrees in $x_i$, less than $n_i$ for $i=1,2,\ldots s$, can vanish only if all its coefficients vanish, provided that the algebraic number field $K$ is such that there exists no relation of the form $\ x_1^{m_1}\ x_2^{m_2}\:\cdots\: x_s^{m_s} = a$, where $a$ is a number in $K$ unless $\ m_i \equiv 0 \mod n_i\ (i=1,2,...,s)$. When $K$ is of the second type, the theorem was proved earlier by Hasse [Klassenkorpertheorie, Marburg, 1933, pp. 187--195] by help of Galois groups. When $K$ is of the first type and $K$ also the rational number field and the $a_i$ integers, the theorem was proved by Besicovitch in an elementary way. The author here uses a proof analogous to that used by Besicovitch [J. London Math. Soc. 15b, 3--6 (1940) these Rev. 2, 33]. $\quad$ Reviewed by H. Bergstrom.

46 #1760 12A99
Siegel, Carl Ludwig
Algebraische Abhaengigkeit von Wurzeln. (German)
Acta Arith. 21 (1972), 59-64.

Two nonzero real numbers are said to be equivalent with respect to a real field $R$ if their ratio belongs to $R$. Each real number $r \ne 0$ determines a class $[r]$ under this equivalence relation, and these classes form a multiplicative abelian group $G$ with identity element $[1]$. If $r_1,\dots,r_h$ are nonzero real numbers such that $r_i^{n_i}\in R$ for some positive integers $n_i\ (i=1,...,h)$, denote by $G(r_1,...,r_h) = G_h$ the subgroup of $G$ generated by $[r_1],\dots,[r_h]$ and by $R(r_1,...,r_h) = R_h$ the algebraic extension field of $R = R_0$ obtained by the adjunction of $r_1,...,r_h$. The central problem considered in this paper is to determine the degree and find a basis of $R_h$ over $R$. Special cases of this problem have been considered earlier by A. S. Besicovitch [J. London Math. Soc. 15 (1940), 3-6; MR 2, 33] and by L. J. Mordell [Pacific J. Math. 3 (1953), 625-630; MR 15, 404]. The principal result of this paper is the following theorem: the degree of $R_h$ with respect to $R_{h-1}$ is equal to the index $j$ of $G_{h-1}$ in $G_h$, and the powers $r_i^t\ (t=0,1,...,j-1)$ form a basis of $R_h$ over $R_{h-1}$. Several interesting applications and examples of this result are discussed. $\quad$ Reviewed by H. S. Butts

Bill Dubuque
  • 257,588
  • 37
  • 262
  • 861
  • 3
    This is top-notch! – The Chaz 2.0 Apr 03 '11 at 20:59
  • @BillDubuque: Yes, a truly excellent posting! – paul garrett Dec 22 '11 at 23:56
  • 1
    Thanks! I just came across this theorem in an article related to rigidity of matrices and was at wits end how to prove it, until Qiaochu Yuan gave me a link to this post. – Jalaj Jan 30 '12 at 02:26
  • I don't understand a small part in the proof, can you please explain it ? a.what is the meaning of the notation $[1,\sqrt(a)][1,\sqrt(b)]$ ? b. I got to "true by induction on $K(r)$", I don't understand the use of the induction hypothesis (I understand it sais $[K:Q]=2^{n-2}$, but thats all I get from the induction hypothesis...). – Belgi Jul 09 '12 at 20:36
  • 7
    @BillDubuque: I read this couple more times and given it some thouht, I agree that $\sqrt{a},\sqrt{b}$ are not in $K$ by the hypothesis that the degree of the tower with hight $n-1$ is $2^{n-1}$ but I can't figure why $\sqrt{ab}$ is not in $K$ (it is not clear by the induction hypothesis since $\sqrt{ab}$ is not adjoined in any step...). I would be greatfull if you can explain this part of the proof, it is very interesting! – Belgi Jul 10 '12 at 10:31
  • Perhaps I'm not understanding well the phrase "If every nonempty subset of S has product $\not\in\Bbb Q$" but if you consider $\sqrt{6},\sqrt{10}$ and $\sqrt{15}$, then neither of them nor their products are in $\Bbb Q$ (rational numbers), but $2\sqrt{15}=\sqrt{6}\sqrt{10},$ so $\sqrt{15}$ is in $\Bbb Q(\sqrt{6},\sqrt{10})$ and this contradicts the thesis of the Theorem. –  Oct 07 '12 at 14:32
  • 1
    @Andres There is no problem since $\sqrt{6}\sqrt{10}\sqrt{15} = \sqrt{900} = 30\in\Bbb Q,\:$ so the Theorem does not apply. – Bill Dubuque Oct 07 '12 at 20:25
  • 14
    As always, your mathematics is excellent and your typesetting is atrocious. :) – Potato Jul 10 '15 at 08:34
  • @Potato fyi: 4 years ago MathJax had *many* bugs. Tthe typesetting was done by macros composed to workaround these problems, – Bill Dubuque Jul 10 '15 at 12:21
  • 2
    In the above comment you mentioned that $[K(r):K]=2$. That's because by induction hypothesis $K(r)$ has height $n-1$ and $[K(r):K]$ is equal to $\dfrac{[K(r):Q]}{[K:Q]}=2^{n-1}/2^{n-2}=2$. Right? – ZFR Apr 05 '19 at 23:25
  • @KFR Yes, that's correct. – Bill Dubuque Apr 05 '19 at 23:47
  • what is$ [1,\sqrt{a}]$? – eraldcoil Sep 05 '20 at 05:37
  • 2
    @eraldcoil A basis of $\,\Bbb Q(\sqrt a)\,$ over $\,\Bbb Q\ \ $ – Bill Dubuque Sep 05 '20 at 07:32
  • @Belgi After thinking about this proof some, I think that this point reveals a flaw in the argument. Namely: Bill's proof requires us to show that for all $n\geq 2$, for any $n$ pairwise distinct primes $p_i$ we have $[\mathbb{Q}(\sqrt{p_1}, \dots , \sqrt{p_{n-2}}, \sqrt{p_{n-1}p_n})]=2$. That is how we conclude $\sqrt{p_{n-1}p_n} \not \in \mathbb{Q}$. But to prove that is essentially to prove the original statement. But I hope I am wrong and someone corrects me. – Matthew Niemiro Apr 12 '22 at 06:44
  • I made a typo in my above comment. That extension should be OVER $\mathbb{Q}(\sqrt{p_1}, \dots , \sqrt{p_{n-2}})$. – Matthew Niemiro Apr 12 '22 at 06:59
  • @Matthew No, for the OP case the hypothesis is that products of square-roots of distinct primes are not rational (i.e. they are multiplicatively independent over $\Bbb Q).\,$ This is easy, e.g. by [classical proofs](https://math.stackexchange.com/a/2441234/242) that $\,\sqrt n\,$ is irrational if some prime occurs to odd power in $\,n$. To better understand how the proof works I recommend that you write the inductive steps in greater detail. – Bill Dubuque Apr 12 '22 at 07:11
  • @BillDubuque I see now. My mistake was that I was trying to specialize the inductive hypothesis to solely collections of square roots of distinct primes, hoping this would suffice to show square roots of distinct primes were independent. But to get that conclusion, more generality is necessary. (Namely, in $\mathbb{Q}$, I think one needs to work at least with collections of pairwise coprime integers $>1$. As you say, it is easy in the base case. And with this general hypothesis, $[K(\sqrt{p_{n-1}p_n}): Q] = 2$ falls out no differently than as it did for $\sqrt{p_{n-1}}, \sqrt{p_n}$.) – Matthew Niemiro Apr 12 '22 at 14:52

Iurie Boreico presents several Olympiad-style proofs of this fact in the Harvard College Mathematics Review. I give a somewhat more sophisticated proof in this blog post.

The source of the sophistication is interesting. For any particular finite set of primes, there is a completely elementary proof which is found by finding a suitable prime witness $q$ relative to which all but one of the primes is a quadratic residue. But in the above I use quadratic reciprocity and Dirichlet's theorem to show that $q$ always exists in general. (I am actually not sure if Dirichlet's theorem is necessary here.)

  • 297
  • 1
  • 8
Qiaochu Yuan
  • 359,788
  • 42
  • 777
  • 1,145

Assume that there was some linear dependence relation of the form

$$ \sum_{k=1}^n c_k \sqrt{p_k} + c_0 = 0 $$

where $ c_k \in \mathbb{Q} $ and the $ p_k $ are distinct prime numbers. Let $ L $ be the smallest extension of $ \mathbb{Q} $ containing all of the $ \sqrt{p_k} $. We argue using the field trace $ T = T_{L/\mathbb{Q}} $. First, note that if $ d \in \mathbb{N} $ is not a perfect square, we have that $ T(\sqrt{d}) = 0 $. This is because $ L/\mathbb{Q} $ is Galois, and $ \sqrt{d} $ cannot be a fixed point of the action of the Galois group as it is not rational. This means that half of the Galois group maps it to its other conjugate $ -\sqrt{d} $, and therefore the sum of all conjugates cancel out. Furthermore, note that we have $ T(q) = 0 $ iff $ q = 0 $ for rational $ q $.

Taking traces on both sides we immediately find that $ c_0 = 0 $. Let $ 1 \leq j \leq n $ and multiply both sides by $ \sqrt{p_j} $ to get

$$ c_j p_j + \sum_{1 \leq k \leq n, k\neq j} c_k \sqrt{p_k p_j} = 0$$

Now, taking traces annihilates the second term entirely and we are left with $ T(c_j p_j) = 0 $, which implies $ c_j = 0 $. Since $ j $ was arbitrary, we conclude that all coefficients are zero, proving linear independence.

Ege Erdil
  • 17,101
  • 1
  • 22
  • 44
  • 3
    That is such a cool proof. I was just wondering how you know that $L/\mathbb{Q}$ is Galios. Even if it is not Galios, does taking its normal closure do the trick since that would still be an extension of $\mathbb{Q}$ so its fixed field will be the rationals? – user357980 Sep 11 '16 at 18:42
  • It does do the trick, yes; however we already know that $ L/\mathbb Q $ is Galois since it is the splitting field of $ \prod_{p_k} (X^2 - p_k) $ over $ \mathbb Q $. – Ege Erdil Sep 11 '16 at 23:48
  • I see, thank you. I thought that it had to be irreducible, but a simple Googling disabused me of that. Once again, that was cool. – user357980 Sep 12 '16 at 00:58
  • 1
    Pretty! It just feels like magic. Can you give intuition to how you came up with it (I know it was long ago). In general I love your questions and answers and would love to ask your opinion on how to approach some things in algebra if you're available. – Andy Mar 01 '18 at 21:35
  • 1
    This is a nice argument (which I upvoted long time ago) : even if we don't know the degree of $L/\Bbb Q$, we know that for $d=p_ip_j$ ($i \neq j$), the subgroup $Gal(L / \Bbb Q(\sqrt d))$ has index $2$ in $Gal(L/\Bbb Q)$, so that the $L/\Bbb Q$-trace of $\sqrt d$ must vanish. – Watson Dec 04 '18 at 08:53
  • Let me mention another proof that uses algebraic number theory, briefly mentioned in the comments [here](https://math.stackexchange.com/questions/1657374) : if $n_i$ are square-free integers and $n$ is a square-free integer having an odd prime factor $p \nmid n_1 \cdots n_r$, then we have $$\sqrt n \not\in L:=\Bbb Q\left(\sqrt{n_1}, ..., \sqrt{n_r}\right).$$ – Watson Dec 04 '18 at 08:53
  • Indeed, the set of ramified primes in the compositum $L$ is the union of the ramified primes in each $\Bbb Q\left(\sqrt{n_i}\right)$. If we had $\sqrt n \in L$, then the prime $p$ would be ramified in $L$ (since it ramifies in $\Bbb Q(\sqrt n)$). But the only odd primes ramifying in $L$ are the prime divisors of the $n_i$, and $p$ is not among them by assumption. Whence the claim! – Watson Dec 04 '18 at 08:53