Thursday, May 12, 2005

Fermat's One Proof

In his life, Pierre de Fermat only left one proof in relation to number theory. He used his method of infinite descent to show that the area of a right triangle cannot be a square within the domain of whole numbers.

The proof itself was found after his death in his notes on Diophantus's Arithmetica.

In what follows, I will go through each sentence of Fermat's proof and provide details to make his step clear. My goal is to shed light on Fermat's thinking in his one existent proof.

I will show how this proof can also be used to prove the case of Fermat's Last Theorem where n = 4. In my next blog, I go over a simpler proof for n=4.

My analysis is based on the work by Harold M. Edwards called Fermat's Last Theorem. The translation is taken from T. L. Heath's translation.

Fermat writes:

(1) Fermat: "If the area of a right-angled triangle were a square, there would exist two biquadrates the difference of which would be a square number."

A biquadrate is a value to the fourth-power. So, the biquadrate of 2 is 24 = 16.

This corresponds to the following equation:
p4 - q4 = z2.

When I first read this, it was surprising to me that Fermat assumed that this equation was obvious from the problem of showing that right triangle's area cannot be equal to a square.

This equation proves n = 4 since if x4 + y4 = z4, then:
x4 = (x2)2 = z4 - y4

So, proving there is no right triangle that has an area equal to a square will also prove Fermat's Last Theorem for n=4.

The steps to this equation can be traced as follows:

(a) A right triangle is characterized by the Pythagorean Theorem:
a2 + b2 = c2.

(b) The area of a rectangle is base x height.

(c) A right triangle of a given base and height is created by dividing the same rectangle across the diagonal.

(d) Therefore, the area of a right triangle is base * height / 2.

(e) Or, using a,b,c from above: area = ab/2

(f) From the solution to Pythagorean Triples, we know that:
a = (2pq)d
b = (p2 - q2)d
where we know that p,q are relatively prime.

(g)So, saying the area of a right triangle is equal to a square comes down to proving that there are no solutions for:
z2 = ((2pq)d[p2 - q2]d)/2 = (pq)(d2)[p2 - q2]

(h) From a previous result, we know that d will divide z so, we are left with showing no solutions for:
(z/d)2 = (pq)[p2 - q2]

(i) Since p,q are relatively prime, it follows that (pq) and [p2 - q2] are relatively prime [see here for details]

(j) From this we conclude, that pq is a square and p2 - q2 are squares.

(k) And since p,q are relatively prime, p,q are themselves squares.

(l) So, there exist P,Q such that p = P2 and q = Q2

(m) Since pq is a square, there exists a value k such that k2 = pq.

(n) And from (m), k divides (z/d), so we get:

(z/dk)2 = p2 - q2 = P4 - Q4

(2) Fermat: "Consequently there would exist two square numbers the sum and difference of which would both be squares."

This one is a bit easier to derive
z2 = P4 - Q4 = (P2 + Q2)(P2 - Q2)

Now, all, we need to show is that (P2 + Q2) is relatively prime to (P2 - Q2) which means that p + q is realtively prime to p - q. [ The trick is to remember that p,q are relatively prime and they are of different parity (see 13(b) here). See here for details]

In other words, there exist two square numbers (P2,Q2) the sum (P2 + Q2) and difference (P2 - Q2) are both squares.

(3) Fermat: "Therefore we should have a square number which would be equal to the sum of a square and the double of another square..."

We know that P2 + Q2 is equal to a square. Let's say S2.
We also know that P2 - Q2 is equal to a square. Let's say T2
So that P2 = Q2 + T2
Which combined with the other equation gives us:
Q2 + T2 + Q2 = T2 + 2Q2 = S2

We can assume that S,P, Q are relatively prime and also that P,T,Q are relatively prime with S,P,T odd and Q even. [See here for details]

We can also assume that Q,S,T are relatively prime. [See here for details]

(4) Fermat: "...while the squares of which this sum is made up would themselves have a square number for their sum."

And as stated before: P2 = Q2 + T2.

(5) Fermat: "But if a square is made up of a square and the double of another square, its side, as I can very easily prove, is also similarly made up of a square and the double of another square."

So, he is saying this:
T2 + 2Q2 = S2 --> S = t2 + 2q2.

This means that

2Q2 = S2 - T2 = (S - T)(S + T)


Q2 = (1/2)(S-T)(S+T)

Now Q,S,T are relatively prime. We know that Q, S-T, S+T are even. [see above for details]
Let S-T = 2u, S + T = 2v
So that Q2 = (1/2)(2u)(2v) = 2uv
Now, u,v are relatively prime [see here for details]
And, either u or v is even, let's assume u
So that, u = 2w and Q2 = 2(2w)v
And w,v are relatively prime so w,v are squares.
Let w = W2, v = V2
And S + T + S - T = 2S = 2u + 2v = 2(2W2 + V2)
So that S = 2W2 + V2

(6) Fermat: "From this we conclude that the said side is the sum of the sides about the right angle in a right-angled triangle and that the simple square contained in the sum is the base and the double of the other square is the perpendicular."

So, he is saying this:
S = 2W2 + V2 -> (2W2 )2 + ( V2)2 is a square.

(2W2 )2 + ( V2)2 = (2w)2 + ( v)2 = (u)2 + ( v)2 =
[(1/2)(S-T)]2 + [(1/2)(S+T)]2 =
[S2 - 2ST + T2]/4 + [S2 + 2ST + T2]/4 =
= [2S2 + 2T2]/4 = (S2 + T2)/2.

Now, since S2 = 2Q2 + T2
We have:
(2Q2 + T2 + T2)/2 = Q2 + T2

Which equals P2.

(7) Fermat: "This right-angled triangle will thus be formed from two squares, the sum and differences of which will be squares."

We can once again apply the Solution to the Pythagorean Triples so that:

2W2= 2mn
V2 = m2 - n2
P= m2 + n2

So we've proven that the difference is a square. Now, we need to prove that the sum is a square.

Since Q2 = 2(2w)v = 4W2V2.

Q2= 2(2mn)(m2 - n2)=4mn(m2 - n2).


(Q/2)2 = mn(m2 - n2)

Since m,n and m2 - n2 are relatively prime, then m,n,m2-n2 are all squares.

Letting m = M2 and n = N2

We get:
V2 = M4 - N4 = (M2 - N2)(M2 + N2)

Since M2 - N2, M2 + N2 are relatively prime, both the sum and differences are squares.

(8) Fermat: "But both these squares can be shown to be smaller than the squares originally assumed to be such that both their sum and differences are squares."

So M2 + N2 P2 + Q2.

Since M2 + N2 ≤ m + n is less than P which is less than P2 + Q2.

(9) Fermat: "Thus if there exist two squares such that their sum and differences are both squares, there will also exist two other integer squares which have the same property but a smaller sum"

We have proven that:
if P2 + Q2 is a square and P2 - Q2 is a square, then there exists M,N such that:
(a) M2+N2 is less than P2 + Q2
(b) M2 + N2 is a square
(c) M2 - N2 is a square.

(10) Fermat: "By the same reasoning we find a sum still smaller than the last found, and we can go on ad infinitum finding integer square numbers smaller and smaller which have the same property."

This leads to an infinite number of smaller solutions.

(11) Fermat: "This is, however, impossible because there cannot be an infinite series of numbers smaller than any given integer we please."

So that we have a proof by Infinite Descent.

(12) Fermat: "The margin is too small to enable me to give the proof completely and with all detail."

At least, this time we were able to reconstruct the proof. :-)



Terry Smith said...

I just want to say I really appreciate this - thank you very much!

I'll be reading the whole thing over the course of time!

Andrew said...

I agree with your proof. However, your conclusion that there is not a set of infinitly desending integers such that (M^2 + N^2) and (M^2 - N^2) bothers me.

With reasonable assumptions, M and N would reach 1 and 0 respectively, and would cease to infinitly decend. 1^2 - 0 is a square, as is 1^2 +0. Their product (1)*(1) is also a square. This is where the continuing descent stops.

I contend that the proof still stands, but for a different reason.

Andrew said...

I suppose I have answered my own question. Looks like my observation is completely inconsequential.

Its obvious (upon further inspection of course) that M and N can not reach 1 and 0, since the loop I described above cannot be 'stepped' into by decrementing squares.

Not only is there not an infinite set of integers below an arbitrary integer, not all integer squares can be reached. Infinite descent holds even stronger.

Unknown said...

The proof you give is a complete proof
of the fact that there is no right triangle whose area is a perfect square.
However, this is not a complete
proof of the fact that there are no
positive integer solutions to p^4 - q^4 = z^2.

The issue is the claim that P^2 - Q^2 and P^2 + Q^2 are coprime. If exactly one of P or Q is odd (which will be the case if these P and Q come from a triangle), they will be coprime. However, if both are odd, then P^2 - Q^2 and P^2 + Q^2 are both even, and so they aren't coprime!

Larry Freeman said...

Hi Jeremy,

Great question. The proofs works because we know that P^2 and Q^2 have different parity (that is, one is odd and one is even).

I will update the proof to make this point more clear.


sathimantha said...
This comment has been removed by the author.
Scouse Rob said...

In Step (2), we also need the fact that p,q are of different parity. (in addition to being relatively prime.)

This fact is proved in 13(b) of the Pythagorean Triples: Solution!

It would be helpful if there was some reference back to this parity proof, it took me a little while to back track and find it.



Larry Freeman said...

Hi Scouse Rob,

Thanks for your comment! I've added the link to 13(b) of Pythagorean Triples: Solution.


The Blogger Formerly Known As Lvka said...

There seems to be something wrong here...

If a right triangle has the sides a^2 and 2*b^2, its area is (ab)^2, which is obviously the square of an integer...

Unknown said...

Larry, can you explain why a right triangle cannot be equal to a square in simpler terms?
BTW Thank you for the last answer

Unknown said...

So that a 14 year old can understand.....

Larry Freeman said...

I believe that Fermat is arguing that for a right triangle with integer sides, it's area cannot be the square of an integer.


Unknown said...

Yes but I need to understand how to prove this.

Larry Freeman said...

The argument is up above.

Here is the summary:

(1) Assume that a right triangle with integer sides has an integer area.
(2) Then the following equation would be true:

z^2 = P^4 + Q^4

(3) But this can't be true so the conclusion follows.

Larry Freeman said...


Your example is not correct.

If one side is a^2 and the other side is 2*b^2, then the hypotenuse would not be an integer.

sqrt(a^4 + 4*b^4) is not an integer.

See Pythagorean Triples for more information.

Unknown said...

i understand where z^2 = P^4 + Q^4 comes from but why is it not true

Larry Freeman said...

Hi Andy,

The main idea is infinite descent. If this were true, then there would also exist a set of positive variables where it would also be true.

But for integers, this is impossible. There is not always an infinite number of smaller positive integers.

The explanation behind infinite descent can be found here

Unknown said...

Hi larry,

I am doing some reading on how XN+YN=ZN+1 where n is the raised power. Is this significant in anyway?

Unknown said...

a = (2pq)d
b = (p2 - q2)d

Is that "d" is necessary? Or is it just might be replaced with 1?