This site is supported by donations to The OEIS Foundation.

# Square root

Please do not rely on any information it contains.

The square root ${\sqrt {x}}$ of a number $x$ is the number that multiplied by itself gives $x$ . For example, the square root of 44100 is 210, since 210 × 210 = 44100. Actually, positive numbers have two square roots, one positive, one negative; e.g., –210 × –210 = 44100. The square root of a negative number is an imaginary number.

Theorem SQRT1. The square root of a positive integer is either a positive integer or an irrational number, but never a non-integral rational number.

Proof. Take the set of all positive integers $\mathbb {Z} ^{+}$ and square all its members, label the resulting set ${\mathcal {Q}}$ . Clearly ${\mathcal {Q}}$ is the set of all positive integers that have integer square roots. Obviously, these integer square roots are rational numbers, as they can be expressed as ${\frac {a}{b}}$ , where $b=1$ .

Now, take any $n$ from $\mathbb {Z} ^{+}$ that is not in ${\mathcal {Q}}$ . Then ${\sqrt {n}}$ is not an integer, but at this point we have not ruled out the possibility that it could be rational. If that were the case, there would be integers $a$ and $b$ such that ${\sqrt {n}}={\frac {a}{b}}$ , with $b>1$ since ${\sqrt {n}}\not \in \mathbb {Z}$ . If ${\frac {a}{b}}$ is not a fraction in lowest terms, we make it so by dividing $a$ and $b$ by $\gcd(a,b)$ . From the fundamental theorem of arithmetic, it follows that $n$ has a least prime factor, which we label $p_{1}$ here. Then $n=p_{1}q$ (it doesn't matter if $n$ is itself prime, in which case $q=1$ , nor does it matter if $p_{1}|q$ , since a number can have square divisors but not itself be a square).

Since ${\sqrt {n}}={\frac {a}{b}}$ , we can write $p_{1}q={\frac {a^{2}}{b^{2}}}$ . Multiply by $b^{2}$ to get $a^{2}=p_{1}qb^{2}$ . This means that $a^{2}$ is divisible by $p_{1}$ , and therefore $a=p_{1}c$ (the value of $c$ is not necessary for this proof). So, $(p_{1}c)^{2}=p_{1}qb^{2}$ and thus ${p_{1}}^{2}c^{2}=p_{1}qb^{2}$ . Dividing both sides by $p_{1}$ we obtain $p_{1}c^{2}=qb^{2}$ . This means that $qb^{2}$ is also divisible by $p_{1}$ . But we established that $a$ is also divisible by $p_{1}$ , contradicting the assertion that $a$ and $b$ are coprime, and therefore ${\sqrt {n}}$ is not a rational number. ¿¿¿IS THERE A HOLE IN THIS PROOF REGARDING COMPOSITE NUMBERS???

In summary, if $n\in {\mathcal {Q}}$ , then ${\sqrt {n}}\in \mathbb {Z}$ , but if not, then ${\sqrt {n}}\not \in \mathbb {Q}$ as specified by the theorem. □

Corollary. Much of the foregoing can be said for negative numbers with only small adjustments. For convenience, let's say that the function $\Im (z)$ returns a real value, that is to say, $\Im (a+bi)=b$ , not $bi$ . Then, if $n\in \mathbb {Z} ^{-}$ , either $\Im ({\sqrt {n}})\in \mathbb {Z}$ or $\Im ({\sqrt {n}})\not \in \mathbb {Q}$ .

This proof is essentially a generalization of proofs for the square roots of specific integers. Perhaps it would be more elegant to first prove the fundamental theorem of algebra and then derive not only this result but also the similar results for cubes, biquadrates, etc.

However it is proven, this result can be used to prove the irrationality of some other numbers involving square roots quite easily. For example:

Theorem SQRT23. The number ${\sqrt {2}}+{\sqrt {3}}$ is irrational.

Proof. Assume that ${\sqrt {2}}+{\sqrt {3}}$ is in fact rational, and thus ${\sqrt {2}}+{\sqrt {3}}={\frac {a}{b}}$ . Thus, $({\sqrt {2}}+{\sqrt {3}})^{2}=2+{\sqrt {6}}+{\sqrt {6}}+3=5+2{\sqrt {6}}$ , so $5+2{\sqrt {6}}={\frac {a^{2}}{b^{2}}}$ . Redistributing gives us $2{\sqrt {6}}={\frac {a^{2}}{b^{2}}}-5$ and therefore ${\sqrt {6}}={\frac {{\frac {a^{2}}{b^{2}}}-5}{2}}$ . Remember that a rational number divided by any integer (except 0) is also rational. This means that ${\frac {{\frac {a^{2}}{b^{2}}}-5}{2}}$ is a rational number. But that also means ${\sqrt {6}}$ is rational, which it can't be since its square root is not an integer, as established by the previous theorem, thus proving this theorem. □ 

See A135611 for the decimal expansion of ${\sqrt {2}}+{\sqrt {3}}$ , and A089078 for the continued fraction expansion.

Theorem SQRT2.25. The square of rational number that is not an integer is another rational number that is not an integer either.

Proof. If $x\in \mathbb {Q}$ but $x\not \in \mathbb {Z}$ , this means that $x={\frac {a}{b}}$ with $a,b\in \mathbb {Z}$ , $\gcd(a,b)=1$ and $|b|\neq 1$ . Therefore, $x^{2}=\left({\frac {a}{b}}\right)^{2}={\frac {a^{2}}{b^{2}}}$ , and it follows that $a^{2},b^{2}\in \mathbb {Z}$ , $\gcd(a^{2},b^{2})=1$ and $b^{2}\neq 1$ , and thus $x^{2}\in \mathbb {Q}$ but $x^{2}\not \in \mathbb {Z}$ just like $x$ .

For example, $\left({\frac {3}{2}}\right)^{2}={\frac {9}{4}}$ .

Corollary. The square root of an integer may be an integer or it may be an irrational number, but it may not be a non-integral rational number, as that would obviously contradict what we have just proven.

The converse is not always true: the square root of a rational number that is not an integer may be an irrational number. This is the case with the reciprocals of most integers, e.g., ${\sqrt {\frac {1}{2}}}={\frac {1}{\sqrt {2}}}$ , which is clearly irrational.

## Square roots of some small integers

In the following table, the square roots are given to 20 decimal places, truncated.

$n$ ${\sqrt {n}}$ A-number
1 1.00000000000000000000 A000007*
2 1.41421356237309504880 A002193
3 1.73205080756887729352 A002194
4 2.00000000000000000000 A000038*
5 2.23606797749978969640 A002163
6 2.44948974278317809819 A010464
7 2.64575131106459059050 A010465
8 2.82842712474619009760 A010466
9 3.00000000000000000000
10 3.16227766016837933199 A010467
11 3.31662479035539984911 A010468
12 3.46410161513775458705 A010469
13 3.60555127546398929311 A010470
14 3.74165738677394138558 A010471
15 3.87298334620741688517 A010472
16 4.00000000000000000000
17 4.12310562561766054982 A010473
18 4.24264068711928514640 A010474
19 4.35889894354067355223 A010475
20 4.47213595499957939281 A010476

* With a different offset.

A note on square roots of positive integers: we can write ${\sqrt {n}}=b{\sqrt {c}}$ where $c$ is squarefree. Then $b$ is given by A000188(n), which we can call the "inner square root" of $n$ , while $c$ is given by A007913(n), and $\operatorname {lcm} (b,c)$ is the "squarefree kernel" of $n$ , given by A007947(n); $bc$ , the "outer square root" of n, is given by A019554(n). For example, ${\sqrt {12}}=2{\sqrt {3}}$ .

## Square roots of some important constants

As before, these are given to 20 decimal places, truncated.

$x$ ${\sqrt {x}}$ A-number
${\frac {1}{2}}$ 0.70710678118654752440 A010503
$\phi$ 1.27201964951406896425 A139339
$e$ 1.64872127070012814684 A019774
$\pi$ 1.77245385090551602729 A002161

The square root of –1 is the imaginary unit $i$ , and the square root of the imaginary unit is ${\sqrt {\frac {1}{2}}}+{\sqrt {\frac {1}{2}}}i$ .