• Foundation
  • About 18 min
  • 5 practice questions

Real numbers and decimal expansions

Tell rational from irrational numbers by their decimals, predict whether a fraction's decimal terminates from its denominator, convert repeating decimals into fractions, and place every kind of number in the real number system.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Explain why the decimal of a rational number either terminates or repeats, and why an irrational number's decimal does neither.
  • Predict without dividing whether p/q terminates, using the prime factors of q, and how many decimal places it has.
  • Convert pure and mixed repeating decimals into the form p/q, and classify numbers in the real number system.

Joining the rational numbers to the irrational numbers gives the real numbers, written R: they fill the number line with no gaps. The easiest way to tell the two kinds apart is to look at their decimal expansions.

Three kinds of decimal

Divide the numerator of p/q by the denominator. Either the division terminates (a remainder of 0 appears and the decimal stops), as with 5/8 = 0.625, or it repeats for ever, as with 4/11 = 0.363636…, where the block 36 repeats. Why must it repeat if it does not stop? When dividing by q, the only possible non-zero remainders are 1, 2, …, q − 1. After at most q − 1 steps a remainder must come back, and from then on the digits loop. Irrational numbers behave differently: their decimals never end and never repeat, for example √2 = 1.41421356… and π = 3.14159265…

Decimal expansions tell rational from irrational
Decimal typeExampleKind of number
Terminating7/40 = 0.175Rational
Non-terminating, repeating5/12 = 0.41666…Rational
Non-terminating, non-repeating√2 = 1.414213…Irrational

Predicting a terminating decimal

Write p/q in lowest terms. Its decimal terminates exactly when the prime factors of q are only 2s and/or 5s. If q = 2ᵐ × 5ⁿ, the decimal has as many places as the larger of m and n.

The reason: if q has only 2s and 5s, multiplying top and bottom by suitable 2s or 5s turns q into a power of 10. For 9/20, 20 = 2² × 5, so 9/20 = (9 × 5)/(2² × 5 × 5) = 45/100 = 0.45.

Worked example 1: predict before dividing

(a) 7/40: 40 = 2³ × 5, only 2s and 5s, so it terminates, with 3 places: 7/40 = 175/1000 = 0.175. (b) 5/12: 12 = 2² × 3; the factor 3 means it repeats: 0.41666… (c) 9/15: first reduce to lowest terms, 9/15 = 3/5, so it terminates: 0.6. Forgetting to reduce first would wrongly suggest that the 3 in 15 makes it repeat.

Converting repeating decimals to p/q

Pure repeating (the block starts right after the point): let x be the decimal, multiply by 10ⁿ where n is the length of the repeating block, and subtract. Mixed repeating (some digits before the block starts): first multiply by 10ᵐ, where m is the number of non-repeating digits, then by a further 10ⁿ, and subtract the two.

Worked example 2: pure repeating decimals

(a) x = 0.777…: 10x = 7.777…; subtract: 9x = 7, so x = 7/9. (b) x = 0.363636…: the block 36 has 2 digits, so 100x = 36.3636…; subtract: 99x = 36, so x = 36/99 = 4/11.

Worked example 3: mixed repeating decimals

(a) x = 0.1333… (3 repeats): 10x = 1.333… and 100x = 13.333…; subtract: 90x = 12, so x = 12/90 = 2/15. (b) x = 1.24545… (45 repeats after the 2): 10x = 12.4545… and 1000x = 1245.4545…; subtract: 990x = 1233, so x = 1233/990 = 137/110 (dividing by 9). Check: 137 ÷ 110 = 1.24545…

A surprise: let x = 0.999… Then 10x = 9.999…, and subtracting gives 9x = 9, so x = 1. So 0.999… and 1 are two ways of writing the same number, just as 3.8 = 3.7999…

A cyclic number

1/7 = 0.142857142857…, with the block 142857 repeating. Multiply 142857 by 2, 3, 4, 5 and 6: you get 285714, 428571, 571428, 714285 and 857142, the same six digits turning round in a circle. Such a block is called a cyclic number, and these are exactly the repeating blocks of 2/7, 3/7, …, 6/7.

The real number system

  • Rational numbers Q
    • Integers Z, which contain the whole numbers and the natural numbers N
    • Fractions such as 3/4 and −2/7
    • Decimals that terminate or repeat
  • Irrational numbers
    • √2, √3, √10, π
    • Decimals that never end and never repeat
Together the rational and irrational numbers make up the real numbers R, the whole number line.

Is that the end? No real number squared gives a negative number, so √−1 is not on the real line. Mathematicians later created imaginary numbers for this, which you will meet in higher classes.

Key takeaways: a rational number's decimal terminates or repeats; an irrational number's decimal does neither. In lowest terms, p/q terminates exactly when q has no prime factors other than 2 and 5. To convert a repeating decimal, multiply by powers of 10 to line up the repeating blocks and subtract. Natural numbers ⊂ integers ⊂ rational numbers, and rationals together with irrationals make the real numbers.

Check your understanding

  1. 1. Which fraction has a terminating decimal expansion?

    1. 2/21
    2. 5/6
    3. 4/9
    4. 21/28
    Show answer

    Answer: D. 21/28 in lowest terms is 3/4, and 4 = 2², so it terminates: 0.75. The denominators 21 = 3 × 7, 6 = 2 × 3 and 9 = 3² contain primes other than 2 and 5, so those decimals repeat.

  2. 2. What is 0.2525… (with 25 repeating) as a fraction in lowest terms?

    1. 25/100
    2. 25/99
    3. 1/4
    4. 25/90
    Show answer

    Answer: B. Let x = 0.2525… Then 100x = 25.2525… Subtracting, 99x = 25, so x = 25/99, which is already in lowest terms. (25/100 = 1/4 = 0.25 exactly, which stops.)

  3. 3. What is 0.8333… (with only the 3 repeating) as a fraction?

    1. 83/99
    2. 8/9
    3. 5/6
    4. 5/9
    Show answer

    Answer: C. Let x = 0.8333… Then 10x = 8.333… and 100x = 83.333… Subtracting, 90x = 75, so x = 75/90 = 5/6. Check: 5 ÷ 6 = 0.8333…

  4. 4. A rational number in lowest terms has denominator 2² × 5⁴. How many decimal places does its expansion have?

    1. 4
    2. 2
    3. 6
    4. It never terminates
    Show answer

    Answer: A. The denominator has only 2s and 5s, so the decimal terminates. The number of places is the larger power, max(2, 4) = 4, because multiplying by 2² makes the denominator 10⁴.

  5. 5. Which number is irrational?

    1. 0.12112111211112… (one more 1 each time)
    2. 0.333…
    3. 0.123123123…
    4. 2.75
    Show answer

    Answer: A. 0.12112111211112… never ends and has no fixed block that repeats, so it is irrational. 0.333… = 1/3, 0.123123… repeats the block 123, and 2.75 = 11/4 terminates.

Privacy · Terms · Refunds · Delivery