Loading...
Login

Diophantine Equations – Integer-Only Solutions

A Diophantine equation is any equation where only whole-number (integer) solutions are allowed, even if the equation itself would have plenty of solutions using fractions or decimals. Insisting on whole numbers only sounds like a small restriction, but it can turn an easy equation into one of the hardest open problems in mathematics.

These equations are named after Diophantus of Alexandria (c. 3rd century CE), whose book Arithmetica posed dozens of problems demanding whole-number answers. The book survived only in fragments and was translated into Latin in 1621 by Claude Gaspard Bachet. It was in the margin of this very translation that the French mathematician Pierre de Fermat, in 1637, scribbled his famous claim to have a proof that xn + yn = zn has no positive whole-number solutions when n > 2 – a proof he said the margin was “too small to contain.” Known as Fermat's Last Theorem, it remained the most famous unsolved problem in mathematics for 358 years, until the British mathematician Andrew Wiles finally proved it in 1994 after seven years of secret work.

Linear Diophantine Equations

An equation of the form ax + by = c has whole-number solutions if and only if gcd(a, b) divides c exactly. When a solution exists, the Euclidean Algorithm can be used to find it.

Does 3x + 5y = 1 have integer solutions?

gcd(3, 5) = 1, and 1 divides 1, so solutions exist.
Trying small values: x = 2, y = −1 gives 3(2) + 5(−1) = 6 − 5 = 1. ✓

Famous Diophantine Equations

EquationWhat It's About
x² + y² = z²Pythagorean triples – see our Pythagoras' Theorem page for the full geometry behind it
xn + yn = zn (n > 2)Fermat's Last Theorem – proven to have no positive solutions
x² − Ny² = 1Pell's equation, studied since antiquity and central to algebraic number theory

Solving by Substitution

The equation 4x + 3y = 23 has a solution with x = 5. Find y.

4(5) + 3y = 23 ⇒ 20 + 3y = 23 ⇒ 3y = 3 ⇒ y = 1.

Key Takeaways

  • A Diophantine equation only accepts whole-number solutions.
  • ax + by = c has integer solutions exactly when gcd(a, b) divides c.
  • Pythagorean triples and Pell's equation are both Diophantine equations.
  • Fermat's Last Theorem, a Diophantine equation with no solutions for n > 2, took 358 years to prove.

Practice: Diophantine Equations

Solving a Linear Diophantine Equation

Related Topics

Home About Resources Dashboard