# Decimal Representation of Real Numbers

From the Axiom of Completeness, Archimedean Properties, and Density Theorem we know that the real number line has no holes in it. Now we will look at representing some of these numbers in a new format known as the decimal representation of a real number $x$

Definition: Let $x$ be a real number. Then the decimal representation of $x$ is $x = b_0 + \frac{b_1}{10} + \frac{b_2}{10^2} + \frac{b_3}{10^3} + ...$ where $b_0, b_1, b_2, ...$ represent the digits of the number $x$, that is $b_i \in \{0, 1, 2, ..., 8, 9 \}$. |

For example, consider the number $x = 4.523$. In this case, $b_0 = 4$, $b_1 = 5$, $b_2 = 2$ and $b_3 = 3$. Therefore $x = 4.523 = 4 + \frac{5}{10} + \frac{2}{100} + \frac{3}{1000}$.

Now consider the case where $b_0 = 0$, that is let $x \in [0, 1]$, for example, let $x = 0.682...$.

We will think of decimal numbers in terms of intervals. Now suppose that we take the interval $[0, 1]$ and subdivide it into ten equal intervals. Then $x \in \left [\frac{b_1}{10}, \frac{b_1+1}{10} \right]$ where $b_1$ is the first digit after the decimal for $x$. For our example of $x = 0.682...$, $b_1 = 6$ and so $x \in \left [ \frac{6}{10}, \frac{7}{10} \right ]$:

Now suppose that we take the interval $\left [\frac{b_1}{10}, \frac{b_1+1}{10} \right]$ and subdivide it into 10 equal intervals too. Then $x \in \left [\frac{b_2}{10^2}, \frac{b_2+1}{10^2} \right]$ where $b_2$ represents the second digit after the decimal, namely for our example $x = 0.682...$, $b_2 = 8$ and so:

If we do this more times, eventually we will have a common point between the intersection of all these *nested intervals* which will be the digital representation of our number $x$, that is $x \in \bigcup_{n=1}^{\infty} \left [ b_n , b_n + 1 \right]$.

Now there's a special case to consider. Suppose that the $n^{\mathrm{th}}$ stage of this process places $x$ on one of the end points of an interval. For example, consider the case where $x = 0.5$. So $x \in \left [ \frac{4}{10} , \frac{5}{10} \right ]$ and $x \in \left [ \frac{5}{10}, \frac{6}{10} \right ]$. If we choose $x \in \left [ \frac{4}{10} , \frac{5}{10} \right ]] we will get [[$ x = 0.4999...$, and if we choose $x \in \left [ \frac{5}{10}, \frac{6}{10} \right ]$ we will get $x = 0.500...$. With this convention we will usually choose the latter interval to place $x$ in since zeros tend to be nicer to work with than nines and we will simply say that $0.499... = 0.5 = 0.500...$. From this, we derive the following definitions.

Definition: A real number $x$ whose decimal representation is $b_0.b_1b_2...$ is periodic if there exists a natural number $k$ such that $b_n = b_{n+m}$ for every $n ≥ k$, and the smallest number $m$ for which this is satisfied is called the period. |

For example, consider the decimal $x = \frac{1}{7} = 0.142857142857142...$. Let $m = 6$, that is the period of this decimal is 6, and so $b_n = b_{n + 6}$. Now for $n ≥ 1$, this is always true. For example, the 1st digit after the decimal is equal to the seventh digit after the decimal, that is $b_1 = b_7 = b_{13} = ... = 1$.

Definition: A real number $x$ whose decimal representation is $b_0.b_1b_2...$ is **terminating if for some natural number $k$, $b_n = 0$ for every $n ≥ k$. |

For example, consider the decimal $x = \frac{1}{8} = 0.12500...$. We say this decimal is terminating since if $n ≥ 4$, then $b_n = 0$. That is $b_4 = b_5 = b_6 = ... = 0$. In such a case, we write $x = 0.125$ without the ellipse without any confusion.