Decimal Representation of Real Numbers

Every real number can be expressed as a decimal — a string of digits with a decimal point separating the integer part from the fractional part. This representation is far more than a notational convenience: the structure of a number's decimal expansion reveals exactly what kind of number it is. A simple fraction like 1/4 terminates after two decimal places (0.25), while 1/3 produces the endless repeating pattern 0.333…, and the irrational number π generates a completely unpredictable, non-repeating infinite string of digits. Understanding these three behaviours is the key to classifying real numbers. The decimal system is a positional number system with base 10. Each digit to the right of the decimal point occupies a place corresponding to a negative power of 10: tenths (10⁻¹), hundredths (10⁻²), thousandths (10⁻³), and so on. A terminating decimal is one in which all digits beyond a certain position are zero — it has a finite number of non-zero decimal places. A non-terminating decimal continues forever; if the infinite tail consists of a repeating block of digits, it is called a repeating (or recurring) decimal, and it always represents a rational number. If the digits never settle into any repeating pattern, the decimal represents an irrational number. This article explores the mathematics behind each type of decimal expansion: how to determine whether a fraction will terminate or repeat, how to convert a repeating decimal back into a fraction, and why irrational numbers like √2 and π can never be written as repeating decimals. Mastering these ideas builds a complete picture of the real number line and the algebraic properties that separate its rational and irrational inhabitants.

Key takeaways
  • Terminating Decimals
  • Repeating (Non-Terminating) Decimals from Rationals
  • Converting a Repeating Decimal to a Fraction
  • Non-Terminating, Non-Repeating Decimals — Irrationals
  • The Density and Completeness of the Real Numbers

Terminating Decimals

A decimal terminates when the long-division process reaches a remainder of zero. Algebraically, a fraction p/q in lowest terms (where p and q are integers, q > 0, and gcd(p, q) = 1) has a terminating decimal expansion if and only if the denominator q has no prime factors other than 2 and 5. In other words, q must be of the form 2^a · 5^b for non-negative integers a and b. For example, 7/40 terminates because 40 = 2³ · 5, giving 7/40 = 0.175. You can always multiply numerator and denominator by the appropriate power of 2 or 5 to make the denominator a power of 10: 7/40 × (5²/5²) = 175/1000 = 0.175.

Repeating (Non-Terminating) Decimals from Rationals

If q contains any prime factor other than 2 or 5, the decimal expansion of p/q is non-terminating but eventually repeating. The repeating block is called the repetend, and its length (the period) divides φ(q'), where φ is Euler's totient function and q' is the part of q coprime to 10. For instance, 1/7 = 0.142857142857… has period 6, and 1/6 = 0.1666… has a repetend of '6' with period 1. The repeating part is denoted with a vinculum (overbar): 1/3 = 0.3̄, 1/7 = 0.1̄4̄2̄8̄5̄7̄. Every rational number p/q eventually repeats because long division can produce only finitely many distinct remainders (0 through q−1), so a remainder must eventually recur.

Converting a Repeating Decimal to a Fraction

The standard algebraic technique uses the fact that multiplying by a power of 10 shifts the decimal expansion. Suppose x = 0.727272…. Set x = 0.72̄ and multiply by 100 (since the period is 2): 100x = 72.727272…. Subtracting: 100x − x = 72, so 99x = 72, giving x = 72/99 = 8/11. For a mixed case like 0.41666… = 0.416̄, first write x = 0.416̄. Multiply by 10 to move the non-repeating part: 10x = 4.16̄. Then 100x = 41.6̄. Subtracting: 90x = 37.5, so x = 37.5/90 = 75/180 = 5/12. Always simplify the resulting fraction by dividing by the GCD.

Non-Terminating, Non-Repeating Decimals — Irrationals

Irrational numbers are real numbers that cannot be written as p/q for any integers p and q. Their decimal expansions are infinite and never settle into a repeating pattern. Classic examples: √2 = 1.41421356237…, π = 3.14159265358…, e = 2.71828182845…. The proof that √2 is irrational is a famous proof by contradiction: assume √2 = p/q in lowest terms; then 2q² = p², so p² is even, meaning p is even; write p = 2k, giving 2q² = 4k², so q² = 2k², meaning q is also even — contradicting gcd(p,q) = 1. Therefore no such fraction exists, and the decimal cannot repeat.

The Density and Completeness of the Real Numbers

Between any two distinct real numbers there are infinitely many rational numbers AND infinitely many irrational numbers — the rationals and irrationals are each dense in ℝ. However, the irrationals are uncountably infinite while the rationals are only countably infinite, meaning in a precise sense 'most' real numbers are irrational. The completeness of ℝ (every Cauchy sequence of real numbers converges to a real number) is exactly what guarantees that infinite decimal expansions always represent well-defined real numbers — no 'gaps' exist on the real number line.

The Key Equation

pq terminates  ⟺  q=2a⋅5b,a,b∈Z≥0\frac{p}{q} \text{ terminates} \iff q = 2^a \cdot 5^b, \quad a,b \in \mathbb{Z}_{\geq 0}
  • p — numerator (dimensionless): Any integer; the fraction p/q must be in lowest terms, meaning gcd(p, q) = 1.
  • q — denominator (dimensionless): A positive integer. The condition on q determines whether the decimal terminates.
  • a, b — exponents of 2 and 5 (dimensionless): Non-negative integers specifying how many times 2 and 5 appear as prime factors of q. Either can be zero.

Worked Example

Problem. Express 5/12 as a decimal. Identify the type of decimal, find the repeating block, and verify by converting the decimal back to a fraction.

512=0.46‾\frac{5}{12} = 0.4\overline{6}

Answer. 5/12 = 0.41666… (non-terminating, repeating with repetend 6)

Figure
Diagram
Decimal Expansions on the Number Line (0 to 2)x0120.51.50.5Terminating(= 1/2)0.3̄Repeating(= 1/3)0.25Terminating(= 1/4)√2≈1.4142…Non-repeating(Irrational)π/2≈1.5708…Non-repeating(Irrational)LegendTerminating (e.g. 1/2, 1/4, 1/8)Repeating non-term. (e.g. 1/3, 1/6, 1/7)Irrational (e.g. √2, π, e)
Origins · 1 minRichard Dedekind and how this was discovered
RD
Richard Dedekind
1831–1916 · German

Dedekind gave the first rigorous construction of the real numbers in his 1872 essay 'Stetigkeit und irrationale Zahlen' (Continuity and Irrational Numbers). He introduced the concept of a 'Dedekind cut': a partition of the rationals into two sets A and B such that every element of A is less than every element of B and A has no greatest element. Each such cut defines exactly one real number, providing a formal proof that the real line has no gaps. This construction placed irrational numbers — and hence all non-terminating, non-repeating decimal expansions — on the same rigorous footing as rational numbers. Dedekind was close friends with Georg Cantor, whose work on infinite sets showed that the irrational numbers are far more 'numerous' than the rationals in a precise mathematical sense. Dedekind was one of the first mathematicians to fully appreciate and support Cantor's revolutionary ideas, even though they were deeply controversial at the time.

  • Rational Numbers — Rational numbers are precisely the real numbers with terminating or repeating decimal expansions; understanding their definition as ratios p/q underpins the termination criterion.
  • Irrational Numbers — Irrational numbers have non-terminating, non-repeating decimal expansions; learning why √2 and π are irrational deepens understanding of the decimal structure of ℝ.
  • The Real Number System — The full hierarchy ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ provides context for why decimal expansions differ between number classes.
  • Prime Factorisation — The termination criterion for fractions depends directly on the prime factorisation of the denominator — specifically, whether any prime other than 2 or 5 appears.