# Lab Wiki

### Site Tools

the_square_root_of_two
Originally published online by Floyd in 2016 and is being ported to the new website. This version needs some formatting clean up and broken links to be fixed.

The root of your first period you
Must place in quote, if you work true;
Whose square from your said period then
You must subtract; and to the remain
Another period being brought,
You must divide as here is taught,
By the double of your quote, but see
Your unit's place you do leave free;
Which place will be supplied by the Square
Of your next quoted figure there:
Next multiply, subtract, and then
Repeat your work unto the end;
And if your number be irrational,
Add pairs of cyphers for a decimal.

- John Hill, 1772, Arithmetick, both in the theory and practice:
made plain and easy in all the common and useful rules

This post has nothing to do with genetics or biology, just math. However, I enjoy thinking about math topics from time to time. This is a classic, an example of an irrational number, that goes back to the ancient Greeks. Just to lay it out, the square root of two is an irrational number that is made up of an infinite sequence of non-repeating digits: $$1.4142135623730950488016887242\ldots$$. We can prove that it is an irrational number, which have odd properties, and this post is a way to try to better understand this.

The poem above is one method to estimate the square root of a number but an even older algorithm is known as the “Babylonian method.” It is very simple and can quickly give reasonably accurate results. 1) Start with a guess of what the square root might be. 2) Divide the original number you are finding the square root of by this guess. 3) Average the resulting number and your guess. 4) Use the average as your new guess and repeat. 5) Stop when you have enough decimal places for the estimate.

To illustrate I will “guess” that the square root of two is one.

$$2/1=2$$

$$(2+1)/2=1.5$$

$$2/1.5=1.3333$$

$$(1.5+1.3333)/2=1.41665$$

$$2/1.41665=1.4118$$

$$(1.41665+1.4118)/2=1.4142$$

In just a couple of steps we have a very accurate estimate of the square root. This was done by the Babylonians 3,700 years ago (link and link). Now let's shift gears and think about tile geometry.

There are two ways to make larger squares out of tiles. You can start with a single tile and add squares around it. Or you can start with zero tiles and add squares around it. Notice that the width of the first kind of square is always an odd number, 1, 3, 5, … and the width of the second kind of square is always an even number, 0, 2, 4, 6, … . The square of these numbers are also always odd (1, 9, 25, …) or even (0, 4, 16, 36, …). So squaring an odd number always results in an odd number and squaring an even number always results in an even number. You can see this in a kind of visual proof. Evenly folding an odd square together breaks a line of tiles in the middle. However, folding an even square can be done evenly without breaking any tiles. (By the way, the figure contains an optical illusion—the Hermann grid illusion. There are “ghost” dots between the corners of the squares that disappear when you look directly at them.)

Now that we know this rule about the evenness and oddness of tiles in a square we can solve for the square root of two.

Represent the square root of two as a ratio of integers.

$$\sqrt{2}=\frac{a}{b}$$

Square both sides.

$$2=\frac{a^2}{b^2}$$

Rearrange.

$$2b^2=a^2$$

Realize that since the square of $$a$$ is even (the equation tells us that 2 is a factor of $$a$$) $$a$$ must also be even and can be factored into two and some other number $$c$$.

$$a=2c$$

Substitute in the new definition of $$a$$.

$$2b^2=(2c)^2$$

Solve.

$$2b^2=4c^2$$

Rearrange.

$$b^2=\frac{4c^2}{2}$$

Simplify.

$$b^2=2c^2$$

Realize that since the square of $$b$$ is even $$b$$ must also be even and two along with another number $$d$$ are factors of $$b$$.

$$b=2d$$

Substitute back in.

$$\sqrt{2}=\frac{2c}{2d}$$

Cancel out two.

$$\sqrt{2}=\frac{c}{d}$$

Using the same logic we can show that both $$c$$ and $$d$$ are even numbers, with two as a factor, and this reduction by halves will go on forever.

A lot of numbers we are used to can be represented by a ratio of integers, e.g. $$7=56/8$$. And an integer can be factored into a finite set of prime numbers, e.g. $$56=2\times2\times2\times7$$. However, the ratio that represents $$\sqrt{2}$$ is not the type of number we are used to. Both the numerator and denominator are infinitely large. We can extract an infinite number of factors out of each, 2 being the example here.

Another example of an irrational (non-repeated in decimal form) number is $$\pi = 3.1415926535897932384626433832795028841971\ldots$$.  $$\pi$$ can be approximated by ratios of integers.

$$\frac{3}{1} = 3.\overline{0}$$

$$\frac{22}{7} = 3.\overline{142857}$$

$$\frac{333}{106} = 3.1\overline{4150943396226}$$

As the integers in the ratio become larger the approximations become more accurate, they are able to make finer and finer over- or under-corrections to the target, but they will always eventually end up in a repeating sequence because they are integers. To be exactly equal with complete accuracy the ratios that represent an irrational number have to be infinitely large. And we proved above that the numbers that make up the ratio representing the square root of two contain an infinite number of twos multiplied together (among other numbers) and so are infinitely large.

The existence of irrational numbers, that cannot be represented as a ratio of integers, is supposed to have vexed the ancient Greeks with the story of Hippasus. He was supposed to have been killed for his discovery of these strange numbers. And, they get stranger still.

Georg Cantor realized that, while the rational numbers were, essentially by definition, infinite in number, for each rational number there was an infinite number of irrational numbers. So, the number of irrational numbers is infinitely larger than the number of rational numbers, even though both are infinite in number (the number of rational numbers is a countable infinity while the irrational numbers are uncountable).

It may seem strange that there are multiple infinities that are not equal to each other—if it's infinite it's infinite right. Think of the positive integers, 1, 2, 3, 4, etc. there are an infinite number of these. However, for each of these, 3 for example, we could make a set of ratios, 3/1, 3/2, 3/3, 3/4, etc. and there would be an infinite number for each of the infinite integers. The number of integer ratios is infinitely larger than the number of infinite integers, even though there are an infinite number of integers. (However, both of these follow a logical sequence and could in theory be counted if we had infinite time and patience) Now imagine that we wrote out all of the integer ratios, the rational numbers, in decimal form. They will form a repeating structure.

22/7 = 3. 142857 142857 142857 142857 142857 142857 …

There are an infinite number of positions where the decimal can be changed to break the repeating unit, making it irrational, and this can be done in an infinite number of ways

22/7 ≠ 3. 142887 142857 142157 142857 142857 742857 …

22/7 ≠ 3. 142857 142857 142857 142857 142857 142337 …

22/7 ≠ 3. 142857 842857 141856 142857 142857 142856 …

etc…

There is not necessarily a logical order to go through all possibilities, there are simply too many ways to break up the infinitely long repeating structure, which introduces a new kind of uncountable infinity, even if we had infinite time and patience. So, for each rational number, a ratio of integers, there is an uncountable infinite number of irrational numbers.

Since the number of irrational numbers is so much larger than the rational ones, if we threw a dart at all the the rational and irrational numbers combined we are more likely, with essential certainty, to hit an irrational number at random. Therefore, we shouldn't be surprised that irrational numbers come up so often in mathematics. If it is not tied down to a direct construction from integers (e.g. the sides of a square with the first side set equal to one versus the circumference of a circle, natural logs, golden ratios, square roots of (non-perfect-square) integers) then it almost has to be irrational. In fact isn't it, in a sense, stranger that some things work out so simply like lengths of 3, 4, and 5 can form the sides of a right triangle (another perfect square exception, where two perfect squares (9 and 16) add up to a third perfect square (25), these are Pythagorean triples which are generalized in Fermat's last theorem—that this cannot be done with cubes, etc., and only works for some squares). This suggests that the square roots of numbers are on the edge of being constrained between a direct construction from integers (perfect squares and Pythagorean triples) and the freedom to be any type of number (the square root of all other integers and the irrational side of some right triangles, like 1, 1, and $$\sqrt{2}$$). This may be related to being defined in a simpler (and more constrained) two-dimensional geometry since there are no integers that can add up in this way in three or more dimensions (see Fermat's Last Theorem).

There might be a parallel, in a sense, with heterclinic cycles in two-dimensional state space. These are deterministic and seem to be well ordered (they are often asymptotically stable) but the trajectory never moves through the same point twice. It is something that is on the edge of, but not quite, a chaotic system (on the edge of being constrained and the freedom of unpredictably arriving at any value possible); and, for continuous dynamical systems at least three dimensions are required for chaotic behaviors. 