ArticleslgStudy

mathematics

Midy's theorem

Midy's theorem 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 Midy's theorem rather than just read about it. In short: In mathematics, Midy's theorem, named after French mathematician E. Midy, is a statement about the decimal expansion of fractions a/p where p is a prime and a/p has a repeating decimal expansion with an even period (sequence A028416 in the OEIS).

Key takeaways

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

Reference excerpt

In mathematics, Midy's theorem, named after French mathematician E. Midy, is a statement about the decimal expansion of fractions a/p where p is a prime and a/p has a repeating decimal expansion with an even period (sequence A028416 in the OEIS). If the period of the decimal representation of a/p is 2n, so that ap=0.a1a2a3…anan+1…a2n‾ then the digits in the second half of the repeating decimal period are the 9s complement of the corresponding digits in its first half. In other words, ai+ai+n=9 a1…an+an+1…a2n=10n−1. For example, 17=0.142857‾ and 142+857=999. 113=0.076923‾ and 076+923=999. 117=0.0588235294117647‾ and 05882352+94117647=99999999.

Extended Midy's theorem If k is any divisor of h (where h is the number of digits of the period of the decimal expansion of a/p (where p is again a prime)), then Midy's theorem can be generalised as follows. The extended Midy's theorem states that if the repeating portion of the decimal expansion of a/p is divided into k-digit numbers, then their sum is a multiple of 10k − 1. For example, 119=0.052631578947368421‾ has a period of 18. Dividing the repeating portion into 6-digit numbers and summing them gives 052631+578947+368421=999999. Similarly, dividing the repeating portion into 3-digit numbers and summing them gives 052+631+578+947+368+421=2997=3×999.

Midy's theorem in other bases Midy's theorem and its extension do not depend on special properties of the decimal expansion, but work equally well in any base b, provided we replace 10k − 1 with bk − 1 and carry out addition in base b. For example, in octal 119=0.032745‾80328+7458=7778038+278+458=778. In dozenal (using inverted two and three for ten and eleven, respectively)

119=0.076ℰ45‾1207612+ℰ4512=ℰℰℰ120712+6ℰ12+4512=ℰℰ12

Proof of Midy's theorem Short proofs of Midy's theorem can be given using results from group theory. However, it is also possible to prove Midy's theorem using elementary algebra and modular arithmetic: Let p be a prime and a/p be a fraction between 0 and 1. Suppose the expansion of a/p in base b has a period of ℓ, so ap=[0.a1a2…aℓ‾]b⇒apbℓ=[a1a2…aℓ.a1a2…aℓ‾]b⇒apbℓ=N+[0.a1a2…aℓ‾]b=N+ap⇒ap=Nbℓ−1 where N is the integer whose expansion in base b is the string a1a2...aℓ. Note that b ℓ − 1 is a multiple of p because (b ℓ − 1)a/p is an integer. Also bn−1 is not a multiple of p for any value of n less than ℓ, because otherwise the repeating period of a/p in base b would be less than ℓ. Now suppose that ℓ = hk. Then b ℓ − 1 is a multiple of bk − 1. (To see this, substitute x for bk; then bℓ = xh and x − 1 is a factor of xh − 1. ) Say b ℓ − 1 = m(bk − 1), so ap=Nm(bk−1). But b ℓ − 1 is a multiple of p; bk − 1 is not a multiple of p (because k is less than ℓ ); and p is a prime; so m must be a multiple of p and amp=Nbk−1 is an integer. In other words, N≡0(modbk−1). Now split the string a1a2...aℓ into h equal parts of length k, and let these represent the integers N0...Nh − 1 in base b, so that Nh−1=[a1…ak]bNh−2=[ak+1…a2k]b ⋮N0=[al−k+1…al]b To prove Midy's extended theorem in base b we must show that the sum of the h integers Ni is a multiple of bk − 1. Since bk is congruent to 1 modulo bk − 1, any power of bk will also be congruent to 1 modulo bk − 1. So N=∑i=0h−1Nibik=∑i=0h−1Ni(bk)i ⇒N≡∑i=0h−1Ni(modbk−1) ⇒∑i=0h−1Ni≡0(modbk−1) which proves Midy's extended theorem in base b. To prove the original Midy's theorem, take the special case where h = 2. Note that N0 and N1 are both represented by strings of k digits in base b so both satisfy 0≤Ni≤bk−1. N0 and N1 cannot both equal 0 (otherwise a/p = 0) and cannot both equal bk − 1 (otherwise a/p = 1), so 0<N0+N1<2(bk−1) and since N0 + N1 is a multiple of bk − 1, it follows that N0+N1=bk−1.

Corollary From the above, amp is an integer Thus m≡0(modp) And thus for k=ℓ2 bℓ/2+1≡0(modp) For k=ℓ3 and is an integer b2ℓ/3+bℓ/3+1≡0(modp) and so on.

Notes

References

External links Weisstein, Eric W. "Midy's Theorem". MathWorld.

Worked examples

Example 1 — a first encounter with Midy's theorem

Start with the simplest possible case. Write down what Midy's theorem 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 Midy's theorem 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 Midy's theorem 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 Midy's theorem

In research
Midy's theorem 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 Midy's theorem 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
Midy's theorem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Fractions (mathematics), Numeral systems, Theorems in number theory, so understanding it makes those chapters shorter.
In everyday life
Look for Midy's theorem 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 “Midy's theorem” →

How to study Midy's theorem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Midy's theorem 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 Midy's theorem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Midy's theorem in simple terms?

In mathematics, Midy's theorem, named after French mathematician E. Midy, is a statement about the decimal expansion of fractions a/p where p is a prime and a/p has a repeating decimal expansion with an even period (sequence A028416 in the OEIS).

Why does Midy's theorem 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 Midy's theorem?

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 Midy's theorem.

Tags

  • Fractions (mathematics)
  • Numeral systems
  • Theorems in number theory

Keep exploring