Let’s begin with an interesting problem. (I guess you can judge whether or not it’s interesting!)

Find three squares, each with rational side lengths, whose areas add to a bigger square such that the side length of the second square equals the area of the first square and the side length of the third square equals the area of the second square? Or, using modern algebra: solve the following equation

where x and y are rational numbers.

Give it a ago! It’s quite a challenge.

A Solution

This is a problem given in Diophantus Arithmetica, the book that Fermat was reading and adding comments into its margin. We will be solving this problem using modern tools, and not the way in which Diophantus solved it. We will be relying heavily on modular arithmetic, so if you need a little refresher take a look at this article.

The key idea is the following: If we found a solution to the problem, then our solution should carry over into a \pmod{p^n} world, where p is prime and n is a positive integer. With this as our motivation, we will begin by trying to find solutions to x^2 + x^4 + x^8 = y^2, working \pmod{3}.

Mod 3 Solution

Working \pmod{3} is advantageous because we can more easily search for a solution since there are only finitely many (three of them) modulo classes \pmod{3}. Meaning we only need to check the cases where x \equiv 0,1,2 \pmod{3} and y \equiv 0,1,2 \pmod{3}. Let’s construct a table to more easily see what is happening:

Note that our solution requires that y \equiv 0 \pmod{3}. Furthermore, we have three solutions: (x,y) = (0,0) ; \; (1,0) ;\; (2,0),but let’s ignore (0,0) because we don’t want to count squares with zero area as a solution. Let’s choose (1,0) to work with, since it’s mildly easier to do arithmetic with 1 rather than 2! In other words, our \pmod{3} solution is given by x_0 = 1 and y_0 = 0.

Mod 9 Solution

Let’s carry over our solution \pmod{3}, to \pmod{3^2} or \pmod{9}. This means that our solution will be of the form x = 1 + 3x_1 and y = 0 + 3y_1. It follows that

x^2 = (1 + 3x_1)^2 \equiv 1 + 6x_1\pmod{9}

x^4 = (1 + 6x_1)^2 \equiv 1 + 3x_1\pmod{9}

x^8 = (1 + 3x_1)^2 \equiv 1 + 6x_1\pmod{9}

Thus,

x^2 + x^4 + x^8  \equiv 3 + 6x_1 \pmod{9},

and y^2 = (0 + 3y_1)^2 \equiv 0 \pmod{9}. Combining everything, we see that x_1 must satisfy the following,

3 + 6x_1 \equiv 0\pmod{9},

from which we deduce x_1 = 1.

To summarize what we just found, we now have

x = 1 + 1\cdot 3 and y = 0 + 3(0) = 0.

Mod 27 Solution

This isn’t our first rodeo, so now we know we set x = 1 + 1\cdot 3 + 3^2 x_2 = 1 + 1\cdot 3 + 9 x_2 and y = 0 + 3(0) + 3^2y_2=0 + 3(0) + 9y_2. From these we determine the following,

x^2 = (1 + 1\cdot 3 + 9 x_2)^2 \equiv 16 + 18x_2\pmod{27}

x^4 = (16 + 18x_2)^2 \equiv 13 + 9x_2\pmod{27}

x^8 = (13 + 9x_2)^2 \equiv 7 + 18x_2\pmod{27}

Hence,

x^2 + x^4 + x^8  \equiv 9 + 18x_2 \pmod{27}.

And we also have y^2\equiv 0 \pmod{27}. Therefore, we deduce,

9 + 18x_2 \equiv 0\pmod{27}.

and thus, x_2\equiv 1 \pmod{27}. Altogeher,

x = 1 + 1\cdot 3 + 1\cdot 3^2 and y = 0 + 3(0) + 3^2(0).

Mod 81, 273, 819, . . . Solutions

We will not carry out all the arithmetic; we will just say that we could deduce that at every step we will end up with x_n = 1 and y_n = 0.

Bringing it Together!

We have deduced (kind of) that a solution to our problem is the following geometric series

x = 1 + 1\cdot 3 + 1\cdot 3^2 +1\cdot 3^3 + \cdots = \sum_{n=0}^{\infty}1\cdot 3^n=\sum_{n=0}^{\infty}3^n.

Can we make sense of this ridiculous answer? We have x equal to a divergent geometric series (the sum blows to infinity), this is nonsense! With reckless abandon, we use the formula we’d use when considering convergent geometric series: \sum_{n=0}^{\infty}x^n = 1 / (1-x). Note, this should only apply when |x|<1, and since we have x = 3 we are breaking all the calculus rules that we learn! But if we continue, we find

x = \sum_{n=0}^{\infty} 3^n = \frac{1}{1-3} = -\frac{1}{2}.

Again, ridiculous! However, we’re mathematical rebels so we use this as our solution. It follows,

x^2 =  \frac{1}{4},

x^4 =  \frac{1}{16},

x^8 = \frac{1}{256}.

Substituting back into our original equation x^2 + x^4 + x^8 = y^2, gives,

\frac{1}{4}+\frac{1}{16}+\frac{1}{256} = \frac{81}{256}.

Wait just a gosh darn minute! Take a look, \frac{81}{256} = \frac{9^2}{16^2}. So we just found a solution

(x,y) = (\frac{1}{2},\frac{9}{16}).

I think this is quite a victory…

What Just Happened?

We just used a technique called Hensel lifting. We took a solution \pmod{3} and used it (lifted it) to find a solution \pmod{3^2}. Then we lifted the solution \pmod{3^2} to find a solution \pmod{3^3}. This led us to a divergent geometric series, which should have been nonsense and shouldn’t have given us anything. And yet… it gave us a solution…

The reason why delves deep into the realm of a new number system called the p-adics. In this new number system, we define the distance between two numbers in a way that we are not used to. Usually, we’d say that the distance between \frac{4}{45} and \frac{21}{90} is equal to their (positive) difference: \mathrm{dis}(\frac{4}{45},\frac{21}{ 90}) = \Big| \frac{4}{45} - \frac{21}{90}\Big| = \frac{11}{90}. However, when working with the p-adics we get something different. Let’s use the prime 3 again. The 3-adic distance between \frac{4}{45} and \frac{21}{90} is equal to 9. This is because we now define distances using the following rules. First, we set up what’s called a norm. You can think of this like a generalized absolute value.

P-adic Norm: Fix some prime number p. For any rational number \frac{a}{b}, (where a,b\in \mathbb{Z} and b\neq 0) pull out as many factors of p as you can. This means that we have

\frac{a}{b} = p^n\cdot \frac{a'}{b'},

where p\nmid a' and p\nmid b' and a',b'\in \mathbb{Z}. Then the p-adic norm is equal to

\Big|\frac{a}{b}\Big|_p = p^{-n}.

For example, let p = 3 and we’ll consider \frac{a}{b} = \frac{11}{90}. Then we can pull out two powers of 3 from the denominator,

\frac{11}{90} = \frac{1}{9} \cdot\frac{11}{10} = 3^{-2}\frac{11}{10}

so that \Big|\frac{11}{90}\Big|_3 = 3^{2} = 9.

Now we define the distance between two numbers using the norm:

P-adic Distance: Fix some prime number p. For any two rational numbers \frac{a}{b} and \frac{c}{d}, the p-adic distance is defined to be

\Big|\frac{a}{b} - \frac{c}{d} \Big|_p.

Going back to our previous example, we can now see that \Big| \frac{4}{45} - \frac{21}{90}\Big|_3 = \Big|\frac{11}{90}\Big|_3, which we just saw was equal to 9.

\Big| \frac{4}{45} - \frac{21}{90}\Big|_3 = \Big|\frac{11}{90}\Big|_3 = 9

Now you could ask, does this notation of distance even make sense to consider? Well, yes, since this notation of distance satisfies properties that we want a distance to satisfy, which we will not go into right now (if you’re interested, just search for ‘definition of a metric’ or you can go here: Metric Space | Brilliant Math & Science Wiki). We might also say that this notion, although unfamiliar, is helpful since it allows us to make sense of things like x  = \sum_{n=0}^{\infty}\cdot 3^n,

Being Creative

First, I want to mention that I heard this problem and solution from two sources, the first is the following Veritassium video: What if you just keep squaring?, and in the first lecture of the great mathematician Alex Kontorovich’s lecture series: Automorphic Representations and L-functions.

Second, I think this is a great lesson in how creativity plays a crucial role in mathematics. Not many people get to see this side of it, and that’s a shame. However, once you discover something astounding (like how our series diverged and gave us a solution) the game has just begun! The next step is to make sense of, make rigorous, and further develop what we did in order to solve this problem.

With this said, see you next time!

Be Kind. Be Curious. Be Compassionate. Be Creative.

And Have Fun!

Leave a comment