*Mathematics is the mother of all sciences. Its reach bothers the philosophical and concerns the very nature of truth itself. Is mathematical truth something we discover or an invention of the human mind? Are we searching around in the dark and happening upon the next revelation like an explorer sailing across the ocean, or are we constantly constructing a set of ideas that give us meaning without any real objectivity?*

Since records began, we know that humanity has been concerned with maths – counting, calculating, and abstracting- to understand the universe more deeply. Since humanity has had mathematical ideas it can prove or disprove, it has thrown up countless conjectures and concepts for mathematicians to dissect and argue over. One such problem that frustrated mathematicians for centuries, is called Fermat’s last theorem.

**Pierre de Fermat**

Fermat’s last theorem is named for Pierre de Fermat, a 17th-century French lawyer. Fermat was an impressive man, fluent in six languages and fascinated by ancient science and mathematics texts. He was not a mathematician in any sense that we would understand today; maths was essentially his private hobby and, as was customary, he shared practically none of his work on a wide scale. Hobby or not, Fermat is credited as being the father of a branch of mathematics called number theory, and some of his work is considered an arrival at the ideas that underpin calculus, pre-Isaac Newton.

In around 1637, Fermat was looking at Pythagoras’ theorem. If you can remember right-angle triangles from school, you’ll remember that, to find the length of the long side, you can take the square root of the sum of the squares of the other two sides. Put more simply, it has been known since ancient times that there are infinitely many solutions to this equation, so-called Pythagorean triples – for example, 3, 4, and 5 (, ).

Fermat wondered if the equation still had solutions when the exponent was higher than two—what about cubing the numbers, or any exponent greater than two? While reading Arithmetica by Diophantus, he wrote in the margin, "A cube can't be the sum of two cubes, or a fourth power to be the sum of two fourth powers, or generally for any power greater than the second to be the sum of two like powers." In short, Fermat claimed the equation has no solutions for exponents greater than two.

Fermat claimed that he had incredible proof to back this up but ‘the margin was too small to contain it’. Fermat was fond of marginalia like this and claimed to have many proofs for various problems – proofs he didn’t write down or share with anyone. After his death, his son discovered this copy of Arithmetica and published it with his father’s notes included. Over time, each of Fermat’s notes was studied and the relevant proof was rediscovered – all but one, which then became known as Fermat’s last theorem.

**In Search of a Proof**

Though extremely simple to describe, easy to write down, and relatively straightforward to understand, it became clear over the years that the solution to this problem was unbelievably complex. On the face of it, it’s bizarre that, in Pythagoras' case where, we have known for thousands of years not only that there are solutions to the equation, but infinitely many solutions. And yet by simply changing the exponent, no solutions can be found. It had always been suspected that Fermat was indeed correct, that there are no solutions, but to take the step to categorically prove this would take the development of entirely new mathematics and no fewer than 358 years.

Until the mid-19th century, progress had only been made in proving Fermat for specific cases. Fermat himself proved there couldn’t be any solutions for and could therefore deduce with a bit of mathematical gymnastics that only prime numbers needed investigating. Eventually, 3, 5 and 7 were crossed off the list as potential solutions. The French mathematician Sophie Germain found an approach to rule out a whole class of prime numbers, which was then built upon by the German mathematician Ernst Kummer who extended the proof to all so-called ‘regular’ primes.

Over two centuries, though fractionally closer, the full proof Fermat had so nonchalantly hinted at was still completely out of reach. With the advent of computers, this work of whittling down potential solutions allowed the proof to extend to exponents lower than four million, yet still the conclusive proof wasn’t forthcoming. The belief was now beginning to seep into mathematical circles that a proof might be impossible.

**A Childhood Fascination**

In 1963, a ten-year-old boy called Andrew Wiles gets a book from the library in Cambridge — The Last Problem by ET Bell. The author describes the long and mysterious history of Fermat’s last theorem, from ancient origin through to the present day. The apparent inaccessibility of proof and the long and tortured history of those who had attempted one fascinated the young boy. With the confidence – perhaps even naivety – of youth, Wiles decides that he is going to solve it once and for all.

Though he didn’t work on it directly, the problem fascinated him through school, to Merton College Oxford and then to Cambridge where he did his PhD. Wiles studied something called elliptic curves; a type of equation originally used to study orbits of planets. After receiving his PhD in this field, he went to Harvard where he worked on another field of mathematics called modular forms.

In around 1955, two Japanese mathematicians posited a link between elliptic curves and modular forms. This became known as the Taniyama-Shimura conjecture. Essentially, they suggested that these two previously unlinked mathematical objects were actually identical, just viewed in different ways. This conjecture was studied relentlessly. The mathematical consequences of its potential truth were outlined in numerous papers, yet conclusive proof was thought to be impossible.

In 1984, a German mathematician named Gerhard Frey noticed that Fermat’s last theorem and the Taniyama-Shimura conjecture were linked – that if you could prove the latter, then you’d get Fermat for free. Frey’s ideas were then proved in 1986 by the American Ken Ribet, building on work by the French mathematician John-Pierre Serre.

To put all this another way, the mathematical stars aligned for Andrew Wiles. With the work of Taniyama, Shimura, Frey, Ribet and Serre, Wiles had a route to his childhood dream – proving Fermat’s last theorem.

Having a route and actually getting to the destination is, of course, not the same thing. Wiles worked on the problem for seven years in total secrecy. As he had worked on the areas of maths that provided the stepping stones to Fermat, he feared that the news he was working on the problem would cause an unwelcome distraction. He only confided in his wife, Nada.

**“I Think I’ll Stop Here.”**

After seven years of intense work, Wiles believed he had proof. He had painstakingly established each mathematical building block to construct the unbelievably intricate but beautiful route to Fermat’s last theorem.

In 1993 he decided to go public in a series of three lectures at the Isaac Newton Institute at Cambridge. He didn’t tell anyone what was coming, and the title of his talk ‘Modular Forms, Elliptic Curves and Galois Representations’ gave nothing away. Despite this, rumours circulated, and an exhilarating atmosphere built up throughout the series as it became clear what he was getting to. Having proved each necessary bridge along the way, he ended his talk by writing Fermat’s last theorem on the board, declaring it to be true and saying simply, “I think I’ll stop here”.

The room erupted with applause, the world’s media descended, and Wiles became an international headline. There was, however, one more twist in the tale. When Wiles published his work, the mathematical community pored over it to verify each minute detail. Devastatingly, a hole was found. Due to the absolute nature of maths, one small flaw is enough to bring the whole proof crumbling down. Having announced to the world that he had found the mathematical holy grail, he now had to admit he hadn’t and fix his proof.

The sheer force of will that this must have taken, to say nothing of the mathematical genius, is astounding. Wiles returned to his work, eventually enlisting the help of his student Richard Taylor. On the verge of giving up in 1994, Wiles eventually found a workaround to dodge the flaw in the original proof.

In an interview with Simon Singh, Wiles describes the moment he knew he’d fixed his problem. “Suddenly I had this incredible revelation. It was so indescribably beautiful; it was so simple and so elegant. I couldn't understand how I'd missed it, and I just stared at it in disbelief for twenty minutes. Then during the day, I walked around the department, and I'd keep coming back to my desk looking to see if it was still there. It was still there. I couldn't contain myself, I was so excited. It was the most important moment of my working life. Nothing I ever do again will mean as much.”

**One final mystery**

Andrew Wiles is now Regius Professor of Mathematics at Oxford and the building containing the Mathematical Institute at Oxford bears his name. Having published his final proof in 1995, he was showered with awards and honours, and his name was conclusively written in the history books alongside the end of one of the great mysteries of mathematics.

There is, however, one question still unanswered-did Pierre de Fermat have a proof or not? The short answer? No one knows. There are a few potential answers: he could have simply been lying, putting a self-aggrandising note in the margin without the proof to back it up. He could have thought he had proof but was mistaken. Or lastly, he could have had real proof that would stand up to modern scrutiny.

Of these options, it’s thought that the second is most likely. The problem is so incredibly complex and difficult to approach that the chance that he proved it in the 17th century, without the development of any of the maths that Wiles linked together to get his proof, is vanishingly small.

In the end. the story of Fermat’s last theorem is one of the passions ignited in a ten-year-old boy by a book he happened upon. It’s the story of the scientific method – of steady, incremental progress made in a global community of inquiry, each individual going further than the last. It’s the story of two mathematicians, 358 years apart, who worked in isolation fuelled by sheer determination and genius. Most of all, it is about the allure of the unanswered question, the draw towards the next summit, and humanity’s inexorable, unrelenting search for truth.