Rational and Irrational Numbers: Recurring Decimals to Fractions

By Engr. Henry Akpan

The Family of Numbers

Numbers come in families, and much of mathematics depends on knowing which family a number belongs to. Is 0.333… a fraction? Is √2 a fraction? Can π ever be written exactly as a decimal? This tutorial explains the real number system, the difference between rational and irrational numbers, how to convert terminating and recurring decimals into fractions, how to tell whether a fraction gives a terminating decimal, and the classic proof that √2 is irrational. These ideas appear in WAEC and JAMB questions on number and numeration and are the foundation of first-year university mathematics.

Natural Numbers, Integers and the Real Line

The number system is built up in layers, each containing the one before it:

  • Natural numbers (ℕ): the counting numbers 1, 2, 3, 4, … Some books also include 0 and call the set with 0 the whole numbers.
  • Integers (ℤ): the natural numbers, zero and the negative whole numbers: …, −3, −2, −1, 0, 1, 2, 3, …
  • Rational numbers (ℚ): every number that can be written as a fraction p/q, where p and q are integers and q ≠ 0. Every integer is rational, since 5 = 5/1.
  • Irrational numbers: real numbers that cannot be written as a fraction of two integers, such as √2, √3, π and e.
  • Real numbers (ℝ): all the rational and irrational numbers together. Every point on the number line is a real number.

So ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ, and the irrational numbers are the real numbers that are not in ℚ. Beyond the real numbers lie the complex numbers, which include √(−1); those are covered in a separate tutorial.

Rational and Irrational Numbers as Decimals

The quickest way to tell rational and irrational numbers apart is by their decimals.

  • A rational number has a decimal that either terminates (stops), like 3/8 = 0.375, or recurs (repeats a block of digits forever), like 1/3 = 0.333… or 5/7 = 0.714285714285…
  • An irrational number has a decimal that goes on forever without ever repeating, like √2 = 1.41421356… or π = 3.14159265…

Why must a fraction terminate or repeat? When you divide p by q by long division, each remainder is one of 0, 1, 2, …, q − 1. If a remainder of 0 appears, the decimal stops. If not, after at most q − 1 steps some remainder must appear for a second time, and from then on the digits repeat. So 1/7 has a repeating block of 6 digits (0.142857…), which is the most a denominator of 7 allows.

Recurring decimals are written with a dot or bar over the repeating digits. In plain text we write 0.(3) or 0.333… for 1/3, and 0.1(6) for 0.1666…

Which Fractions Give Terminating Decimals?

Write the fraction in its lowest terms and factorise the denominator. The decimal terminates if and only if the denominator has no prime factors other than 2 and 5.

  • 7/20: 20 = 2² × 5, so it terminates: 7/20 = 0.35.
  • 3/40: 40 = 2³ × 5, so it terminates: 3/40 = 0.075.
  • 5/12: 12 = 2² × 3; the factor 3 means it recurs: 5/12 = 0.41666…
  • 9/15: first simplify to 3/5. The denominator 5 means it terminates: 0.6. (The 3 in 15 cancelled.)

The reason is that our decimal system is base ten, and 10 = 2 × 5. A fraction terminates exactly when it can be rewritten with a denominator of 10, 100, 1000 and so on.

Converting a Terminating Decimal to a Fraction

Write the digits over the right power of ten and simplify.

  • 0.45 = 45/100 = 9/20.
  • 2.125 = 2125/1000 = 17/8 (divide top and bottom by 125).
  • 0.064 = 64/1000 = 8/125.

Converting a Recurring Decimal to a Fraction

The method uses algebra to cancel out the repeating part. Let x be the decimal, multiply by a power of ten so that the repeating parts line up, then subtract.

Example 1. Express 0.777… as a fraction.

Let x = 0.777… Then 10x = 7.777… Subtracting, 10x − x = 7.777… − 0.777…, so 9x = 7 and x = 7/9.

Example 2. Express 0.454545… as a fraction.

The repeating block has two digits, so multiply by 100. Let x = 0.4545… Then 100x = 45.4545… Subtracting, 99x = 45, so x = 45/99 = 5/11.

Example 3. Express 0.1666… (only the 6 repeats) as a fraction.

Let x = 0.1666… Then 10x = 1.666… and 100x = 16.666… Subtracting these two, 90x = 15, so x = 15/90 = 1/6.

Example 4. Express 2.3(18), meaning 2.31818…, as a fraction.

Let x = 2.31818… Then 10x = 23.1818… and 1000x = 2318.1818… Subtracting, 990x = 2295, so x = 2295/990. Dividing top and bottom by 45 gives 51/22. Check: 51 ÷ 22 = 2.31818… ✓

A shortcut. A pure recurring decimal equals the repeating block over the same number of 9s: 0.(7) = 7/9, 0.(45) = 45/99, 0.(123) = 123/999. This shows a surprising fact: 0.999… = 9/9 = 1 exactly.

Proof That √2 Is Irrational

This proof by contradiction, known to the ancient Greeks, is one of the most famous in mathematics and appears in first-year university courses.

  1. Suppose √2 is rational. Then √2 = p/q, where p and q are integers with no common factor (the fraction is in lowest terms).
  2. Squaring, 2 = p²/q², so p² = 2q². Therefore p² is even.
  3. If p were odd, p² would be odd, so p must be even. Write p = 2k.
  4. Then (2k)² = 2q², so 4k² = 2q² and q² = 2k². So q² is even, and therefore q is even.
  5. Now p and q are both even, so they share the factor 2. This contradicts our assumption that the fraction was in lowest terms.
  6. So the assumption is false, and √2 is irrational.

The same argument shows that √3, √5 and the square root of any whole number that is not a perfect square are irrational. Note that √9 = 3 and √(4/25) = 2/5 are rational, because 9 and 4/25 are perfect squares.

Operations with Rational and Irrational Numbers

  • The sum, difference, product and quotient of two rational numbers (not dividing by zero) are always rational.
  • Rational + irrational is always irrational: 1 + √2 is irrational.
  • A non-zero rational number times an irrational number is irrational: 3√2 is irrational.
  • Two irrational numbers can give a rational result: √2 × √2 = 2, and (1 + √2) + (1 − √2) = 2. So irrational numbers are not "closed" under addition or multiplication.

Example 5. Classify each number as rational or irrational: 0.25, √49, √50, 22/7, π, 0.1010010001…

  • 0.25 = 1/4: rational.
  • √49 = 7: rational.
  • √50 = 5√2: irrational.
  • 22/7: rational. It is only an approximation to π (22/7 = 3.142857…, π = 3.141592…).
  • π: irrational.
  • 0.1010010001… (the number of zeros keeps growing): irrational, because the pattern never settles into a repeating block.

Practice Questions

  1. Express 0.(36) as a fraction in its lowest terms. Answer: 36/99 = 4/11.
  2. Express 0.2(7), meaning 0.2777…, as a fraction. Answer: 100x − 10x = 27.777… − 2.777… = 25, so x = 25/90 = 5/18.
  3. Without dividing, decide whether 11/80 and 7/30 terminate. Answer: 80 = 2⁴ × 5, terminates (0.1375); 30 = 2 × 3 × 5, recurs (0.2333…).
  4. Is √0.16 rational? Answer: yes, √0.16 = 0.4 = 2/5.

Summary

  • ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ. The real numbers are the rational and irrational numbers together.
  • Rational numbers are fractions p/q; their decimals terminate or recur. Irrational numbers have decimals that never end and never repeat.
  • A fraction in lowest terms terminates only if its denominator's prime factors are 2s and 5s.
  • To convert a recurring decimal, multiply by powers of ten so the repeating parts line up, then subtract.
  • √2 is irrational, proved by contradiction; so is the square root of any non-square whole number.

Related Tutorials