Fermat’s Last Theorem extends to negative Integers

I bumped into Fermat’s Last Theorem the other day, probably the most famous margin note in history:


Where a, b, c and n are all positive integers. The equation has no solutions for n>2.

But the theorem always constrains a, b and c to be positive. Why?

Here’s what I found plugging in -a and -b scenarios into the formula.

First, if n is even, (-a)^n=a^n so this returns us to the positive Integer version of Fermat’s Last Theorem.

Conversely, if n is odd and we have both -a and -b, then:


This is just the negative version of Fermat’s Last Theorem, so it follows again there’s no solution for n>2.

Next, I discovered an infinite number of solutions for the equation to any odd power. If we set b=-a, this leads to:


Let’s just declare that solution “trivial” and move on. So the final leftover scenario is this:


Which can be rearranged to this:


And this, of course, is just another rewrite of Fermat’s Last Theorem.

So throwing away the trivial case that b=-a with n_{odd} it quickly becomes clear that the theorem is true for all negative numbers with n>2. Which still makes me wonder why the theorem is always stated “for positive a, b and c“?

PS. When I was initially googling to find other work on this question nothing relevant popped up (leaving me to figure out how negative numbers work in the theorem myself). However, I found other interesting proofs. Here’s a  simple proof extending Fermat’s Last Theorem to all positive rationals a and b:

Write Fermat’s Last Theorem with rationals:


Multiply through by xyz which recovers the original Fermat’s Last Theorem:


My reasoning for negative Integers applies equally well to the negative Rationals.

So, throwing out trivial solutions, Fermat’s Last Theorem is true for all Integers and Rationals, not just the positive ones.