The Irrationality of \(\sqrt{2}\)

9 minute read

Published:

We collect ten(ish) proofs that \(\sqrt{2}\) is irrational.

We have taken some suggestions from sx869257.

Proposition. Let \(\sqrt{2}\) be the positive real number such that \((\sqrt{2})^2=2\). Then \(\sqrt{2}\) is irrational.

Let’s begin with the classical descent argument.

Proof 1. Suppose for the sake of contradiction that \(\sqrt{2}\) is a rational number \(a/b\). By putting this fraction into reduced form, we may assume that \(\gcd(a,b)=1\) and \(a,b>0\). But then \(a/b=\sqrt{2}\) implies that \[a^2=2b^2.\] In particular, the right-hand side is even, so the left-hand side is even as well. But then \(a\) is even, so \(b^2\) is divisible by \(4\)! Thus, \(a^2/2\) is even as well. This implies that \(b^2\) is even, so \(b\) is even. This is a contradiction because \(\gcd(a,b)=1\). \(\blacksquare\)

Here is a different way to finish.

Proof 2. As before, suppose for the sake of contradiction that \(\sqrt2\) is a rational number \(a/b\), and we may assume \(\gcd(a,b)=1\). In particular, at least one of \(a\) or \(b\) is odd. However, \(a^2=2b^2,\) so we see that we must have \(a\) be even, so \(a^2\equiv0\pmod4\). On the other hand, we see we must have \(b\) odd. But then \(b^2\equiv1\pmod4\), so \(a^2\equiv2\pmod4\), which is our contradiction. \(\blacksquare\)

The first proof has an enlightening reformulation in terms of unique prime factorization.

Proof 3. As before, suppose for the sake of contradiction that \(\sqrt2\) is a rational number \(a/b\), and we may assume \(\gcd(a,b)=1\). Now, consider the exponent \(\nu\) of \(2\) in the unique prime factorization of the integer \(n\) equal to \[a^2=2b^2.\] Indeed, the main point is that \(2\) is prime, so it can only appear an even number of times in the unique prime factorization of a square integer. For example, on one hand, \(n\) is a square, so \(\nu\) is even. On the other hand, \(2n\) is a square, so \(\nu+1\) is also even. This is a contradiction! \(\blacksquare\)

The above proof notably only cares about the exponent of \(2\), so we can make it more manifestly “\(2\)-adic.”

Proof 4. Consider the function \(\nu\colon\mathbb Q^\times\to\mathbb Z\) which is the multiplicity of \(2\) appearing in the unique prime factorization of the quotient \(a/b\), where multiplicity in \(b\) counts “negatively.” By expanding prime factorizations, we see that \(\nu\) satisfies \(\nu(pq)=\nu(p)+\nu(q)\) for \(p,q\in\mathbb Q^\times\).

Now, suppose for the sake of contradiction that \(\sqrt2\) is a rational number. Then we can calculate the valuation of \(\sqrt2\) because \[2\nu(\sqrt{2})=\nu(\sqrt2\cdot\sqrt2)=\nu(2)=1.\] This is a contradiction because \(1\) is not even! \(\blacksquare\)

Remark. The given function \(\nu\) extends by continuity to the units in the \(2\)-adic rational numbers \(\mathbb Q_2\). In the language of the \(2\)-adics, we can restate the above argument simply by saying that \(\left|\sqrt2\right|_2=2^{-1/2}\) is not in \(\{0\}\cup2^{\mathbb Z}\), so \(\sqrt2\notin\mathbb Q_2\).

Our next few arguments will use some notion of integrality. Here is the most basic example.

Proof 5. We use the Rational root theorem. Indeed, \(\sqrt{2}\) is a root of the polynomial \(x^2-2\). Thus, any rational root \(a/b\) written in reduced form will have \(a\) divide the constant coefficient \(2\) and will have \(b\) divide the leading coefficient \(1\). In other words, if \(\sqrt{2}\) were rational, then \[\sqrt{2}\in\{-2,-1,+1,+2\}.\] However, the squares of these elements live in \(\{1,4\}\), none of which are \(2\). We conclude that \(\sqrt2\) is irrational. \(\blacksquare\)

There are other ways to finish the argument once we have established some weaker integrality. Let’s record what we need in a lemma.

Lemma. If \(\sqrt{2}\) is rational, then it is an integer.

Proof of Lemma. We unwind the proof of the Rational root theorem. Suppose that \(\sqrt2\) is rational, meaning that we can write it as \(a/b\) where \(\gcd(a,b)=1\). Then \(a/b\) is a root of the polynomial \(x^2-2=0\), so \(a^2/b^2\) is an integer. Thus, we see that the multiplicity of any prime dividing \(b\) is less than or equal to its multiplicity dividing \(a\), so we conclude that \(b\) divides \(a\). In other words, \(a/b\) is an integer. \(\blacksquare\)

Here are a few ways to finish using modular arithmetic.

Proof 6. We show that \(\sqrt2\) is not an integer. Indeed, the square of any integer \(n\) has \[n^2\equiv\begin{cases}0\pmod4 & \text{if }n\text{ is even}, \\1\pmod4 & \text{if }n\text{ is odd},\end{cases}\] so in particular \(n^2\not\equiv2\pmod4\). \(\blacksquare\)

Proof 7. We show that \(\sqrt2\) is not an integer. Indeed, the square of any integer \(n\) has \[n^2\equiv\begin{cases} 0\pmod5 & \text{if }n\equiv0\pmod5, \\1\pmod5 & \text{if }n\equiv\pm1\pmod5, \\4\pmod5 & \text{if }n\equiv\pm2\pmod5, \end{cases}\] so in particular \(n^2\not\equiv2\pmod5\). \(\blacksquare\)

Remark. There are infinitely many variants of the previous proof. Indeed, it suffices to find a prime \(p\) for which \(2\pmod p\) is not a quadratic residue. By Quadratic reciprocity, this is equivalent to \(p\) being \(\pm3\pmod8\). By Dirichlet’s theorem on primes in arithmetic progressions, half of all primes satisfy this property.

We can also use rational approximations.

Proof 8. We show that \(\sqrt2\) is not an integer. Indeed, note that \(1<2<4\) implies that \[1<\sqrt2<2.\] We are now done because there is no integer between \(1\) and \(2\). \(\blacksquare\)

Of course, the previous proof gets away with using extremely weak rational approximations because we already have some integrality. If we forget about the integrality, we need stronger rational approximations.

Lemma. Let \(\alpha\) be a real number. Suppose that there is \(\varepsilon>0\) for which there are infinitely many rational numbers \(p/q\) for which \[\left|\alpha-\frac pq\right|<\frac1{q^{1+\varepsilon}}.\] Then \(\alpha\) is irrational.

Proof of Lemma. We proceed by contraposition: supposing \(\alpha\) is a rational number \(a/b\), we show there are only finitely many \(p/q\) for which \(\left|\alpha-p/q\right|<1/q^2\). Indeed, we may as well suppose that \(b,q>0\), so \[\left|\alpha-\frac pq\right|=\frac{\left|aq-bp\right|}{bq}\ge\frac1{bq},\] so being smaller than \(1/q^{1+\varepsilon}\) forces \(q\le b^{1/\varepsilon}\) after rearranging. Thus, the denominator of \(q\) is bounded, and each \(q\) has finitely many available \(p\) because \(\left|q\alpha-p\right|\lt q^\varepsilon\). In total, there are only finitely many possible fractions \(p/q\). \(\blacksquare\)

Remark. The theory of continued fractions shows that the converse direction. In particular, if \(\alpha\) is an irrational real number, then there are infinitely many rational numbers \(p/q\) such that \[\left|\alpha-\frac pq\right|<\frac1{\sqrt 5\cdot q^2}.\] In fact, this denominator is sharp, and the inequality is only achieved for continued fraction convergents.

Proof 9. We exhibit infinitely many rational numbers \(p/q\) for which \(\left|\sqrt2-p/q\right|<1/q^2\). In fact, we will show that there are infinitely many pairs \((p,q)\) of coprime positive integers for which \[p^2-2q^2=\pm1.\] Let’s explain why this will complete the proof. Indeed, we see that any such pair \((p,q)\) produces a unique rational \(p/q\) with \[\left|\sqrt2-\frac pq\right|<\left|\sqrt2-\frac pq\right|\cdot\left|\sqrt2+\frac pq\right|=\frac1{q^2}.\] It remains to exhibit solutions to \(p^2-2q^2=1\), which we will do recursively. The main point is to consider the linear transformation \(\varphi\colon\mathbb Z^2\to\mathbb Z^2\) defined by \(\varphi(p,q)=(p+2q,p+q)\). This operator has the property that \[(p+2q)^2-2(p+q)^2=-\left(p^2-2q^2\right),\] so \(\varphi\) sends a positive integer solution to \(p^2-2q^2=\pm1\) to another positive integer solution with strictly larger coordinates. Additionally, \[\gcd(p+2q,p+q)=\gcd(q,p+q)=\gcd(p,q),\] so \(\varphi\) sends pairs of coprime integers to pairs of coprime integers.

Thus, starting with the solution \((1,1)\) to \(p^2-2q^2=\pm1\), we see that the set \[\left\{(1,1),\varphi(1,1),\varphi^{\circ2}(1,1),\varphi^{\circ3}(1,1),\ldots\right\}\] provides an infinite set of pairs \((p,q)\) of coprime positive integers satisfying \(p^2-2q^2=\pm1\). This is what we needed. \(\blacksquare\)

Remark. Of course, it is rather non-obvious where the operator \(\varphi\) comes from. Well, thinking about a pair \((p,q)\) of integers as \(p+q\sqrt2\in\mathbb Z[\sqrt2]\), the operator \(\varphi\) corresponds to multiplication by \(1+\sqrt2\). In this view, the given solution set is just the powers of \(1+\sqrt2\), and now it is easier to explain why these numbers have norm \(\pm1\).

Now that we are the end of the blog post, it seems legal to introduce more machinery.

Lemma (Eisenstein’s criterion). Let \(f(x)\in\mathbb Z[x]\) be a monic polynomial, which we write as \[f(x)=x^d+a_{d-1}x^{d-1}+\cdots+a_1x+a_0.\] Suppose there is a prime \(p\) for which \(p\mid a_k\) for all \(k\lt d\) but \(p^2\nmid a_0\). Then \(f(x)\) is irreducible in \(\mathbb Z[x]\).

Proof of Lemma. We proceed by a strange contraposition: suppose that \(f(x)\) is reducible, and we have a prime \(p\) for which \(p\mid a_k\) for all \(k< d\). Then we will show that \(p^2\mid a_0\).

Because \(f(x)\) is irreducible, we may write \(f(x)=g(x)h(x)\) where \(g(x)\) and \(h(x)\) are non-constant polynomials with integer coefficients and strictly smaller degree. By comparing leading coefficients, we may assume that \(g(x)\) and \(h(x)\) are monic. Now, we are given that \[g(x)h(x)\equiv x^d\pmod p,\] so unique prime factorization in \(\mathbb F_p[x]\) shows that \(g(x)\pmod p\) and \(h(x)\pmod p\) are also monomials \(x^\bullet\). It follows that both \(g(x)\) and \(h(x)\) have constant coefficient divisible by \(p\), so the constant coefficient \(a_0\) of \(f(x)\) must be divisible by \(p^2\). \(\blacksquare\)

Proof 10. We show that \(\sqrt2\) is not an integer. It is enough to show that \(x^2-2\) has no linear factors in \(\mathbb Z[x]\). In fact, \(x^2-2\) is irreducible in \(\mathbb Z[x]\) by Eisenstein’s criterion with the prime \(p=2\). \(\blacksquare\)

Remark. Gauss’s lemma shows that \(f(x)\) being irreducible in \(\mathbb Z[x]\) implies that it is also irreducible in \(\mathbb Q[x]\). Thus, appealing to Gauss’s lemma shows that \(x^2-2\) is irreducible in \(\mathbb Q[x]\), immediately showing that \(\sqrt2\) is not rational (instead of merely not integral).

Remark. It is a worthwhile exercise to see how far the above proofs generalize to irrationals other than \(\sqrt2\). For example, when is \(\sqrt n\) irrational for integers \(n\)? Can one show that \(\sqrt[3]2\) or \(\sqrt[3]4\) is irrational? Which proofs can be generalized to which algebraic numbers?