ArticleslgStudy

mathematics

Thue's lemma

Thue's lemma is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Thue's lemma rather than just read about it. In short: In modular arithmetic, Thue's lemma roughly states that every modular integer may be represented by a "modular fraction" such that the numerator and the denominator have absolute values not greater than the square root of the modulus. More precisely, for every pair of integers (a, m) with m > 1, given two positive integers X and Y such that X ≤ m < XY, there are two integers x and y such that a y ≡ x ( mod m ) {\dis…

Key takeaways

  • Thue's lemma belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Thue's lemma to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Thue's lemma from memory before moving on to harder problems.

Reference excerpt

In modular arithmetic, Thue's lemma roughly states that every modular integer may be represented by a "modular fraction" such that the numerator and the denominator have absolute values not greater than the square root of the modulus. More precisely, for every pair of integers (a, m) with m > 1, given two positive integers X and Y such that X ≤ m < XY, there are two integers x and y such that

a y ≡ x ( mod m ) {\displaystyle ay\equiv x{\pmod {m}}}

and

| x | < X , 0 < y < Y . {\displaystyle |x|<X,\quad 0<y<Y.}

Usually, one takes X and Y equal to the smallest integer greater than the square root of m, but the general form is sometimes useful, and makes the uniqueness theorem (below) easier to state. The first known proof is attributed to Axel Thue who used a pigeonhole argument. Thue's lemma can be used to prove Fermat's theorem on sums of two squares by taking m to be a prime p that is congruent to 1 modulo 4 and taking a to satisfy a2 + 1 ≡ 0 mod p. The existence of such an a follows from Wilson's theorem.

Uniqueness In general, the solution whose existence is asserted by Thue's lemma is not unique. For example, when a = 1 there are usually several solutions (x, y) = (1, 1), (2, 2), (3, 3), ..., provided that X and Y are not too small. Therefore, one may only hope for uniqueness for the rational number ⁠x/y⁠, to which a is congruent modulo m if y and m are coprime. Nevertheless, this rational number need not be unique; for example, if m = 5, a = 2 and X = Y = 3, one has the two solutions

2 a + 1 ≡ − a + 2 ≡ 0 ( mod 5 ) {\displaystyle 2a+1\equiv -a+2\equiv 0{\pmod {5}}} . However, for X and Y small enough, if a solution exists, it is unique. More precisely, with above notation, if

2 X Y < m , {\displaystyle 2XY<m,}

and

a y 1 − x 1 ≡ a y 2 − x 2 ≡ 0 ( mod m ) {\displaystyle ay_{1}-x_{1}\equiv ay_{2}-x_{2}\equiv 0{\pmod {m}}} , with

| x 1 | < X , | y 1 | < Y , {\displaystyle \left|x_{1}\right|<X,\quad \left|y_{1}\right|<Y,}

and

| x 2 | < X , | y 2 | < Y , {\displaystyle \left|x_{2}\right|<X,\quad \left|y_{2}\right|<Y,}

then

x 1 y 1 = x 2 y 2 . {\displaystyle {\frac {x_{1}}{y_{1}}}={\frac {x_{2}}{y_{2}}}.}

This result is the basis for rational reconstruction, which allows using modular arithmetic for computing rational numbers for which one knows bounds for numerators and denominators. The proof is rather easy: by multiplying each congruence by the other yi and subtracting, one gets

y 2 x 1 − y 1 x 2 ≡ 0 ( mod m ) . {\displaystyle y_{2}x_{1}-y_{1}x_{2}\equiv 0{\pmod {m}}.}

The hypotheses imply that each term has an absolute value lower than XY < ⁠m/2⁠, and thus that the absolute value of their difference is lower than m. This implies that y 2 x 1 − y 1 x 2 = 0 {\displaystyle y_{2}x_{1}-y_{1}x_{2}=0} , hence the result.

Computing solutions The original proof of Thue's lemma is not efficient, in the sense that it does not provide any fast method for computing the solution. The extended Euclidean algorithm, allows us to provide a proof that leads to an efficient algorithm that has the same computational complexity of the Euclidean algorithm. More precisely, given the two integers m and a appearing in Thue's lemma, the extended Euclidean algorithm computes three sequences of integers (ti), (xi) and (yi) such that

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Thue's lemma

Start with the simplest possible case. Write down what Thue's lemma claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Thue's lemma before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Thue's lemma ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Thue's lemma

In research
Thue's lemma appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Thue's lemma in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Thue's lemma is common in secondary-school and first-year university syllabi. It links to neighbouring topics Lemmas in number theory, Modular arithmetic, so understanding it makes those chapters shorter.
In everyday life
Look for Thue's lemma outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Thue's lemma” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Thue's lemma in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Thue's lemma means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Thue's lemma out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Thue's lemma in simple terms?

In modular arithmetic, Thue's lemma roughly states that every modular integer may be represented by a "modular fraction" such that the numerator and the denominator have absolute values not greater than the square root of the modulus. More precisely, for every pair of integers (a, m) with m > 1, gi…

Why does Thue's lemma matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Thue's lemma?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Thue's lemma.

Tags

  • Lemmas in number theory
  • Modular arithmetic

Keep exploring