Fractions and Rational Numbers


Definition. A rational number is a real number which can be written as $\dfrac{a}{b}$ , where a and b are integers and $b \ne 0$ . A real number which is not rational is irrational.


Example. If p is prime, then $\sqrt{p}$ is irrational.

To prove this, suppose to the contrary that $\sqrt{p}$ is rational. Write $\sqrt{p} = \dfrac{a}{b}$ , where a and b are integers and $b \ne 0$ . I may assume that $(a,b) = 1$ --- if not, divide out any common factors.

Now

$$b \sqrt{p} = a \quad\hbox{so}\quad b^2p = a^2.$$

Since $p \mid a^2$ and p is prime, $p
   \mid a$ . Write $a = pc$ . Then

$$b^2p = p^2 c^2, \quad\hbox{so}\quad b^2 = pc^2.$$

Now $p \mid b^2$ , so $p \mid b$ . Thus, p is a common factor of a and b contradicting my assumption that $(a,b) = 1$ .

It follows that $\sqrt{p}$ is irrational.

More generally, if $a_0$ , ..., $a_{n-1}$ are integers, the roots of

$$x^n + a_{n-1}x^{n-1} + \cdots + a_1x + a_0$$

are either integers or irrational.


If b is an integer such that $b > 1$ , and a is a real number between 0 and 1 (inclusive), then a can be written uniquely in the form

$$a = \sum_{i=1}^\infty a_i\cdot \dfrac{1}{b^i}.$$

This is called the base b expansion of a. Rather than proving this fact, I'll merely recall the standard algorithm for computing such an expansion: Subtract from a as many $\dfrac{1}{b}$ 's as possible, subtract as many $\dfrac{1}{b^2}$ 's from what's left, and so on.

Here is a recursive procedure which generates base b expansions:

$$x_0 = a$$

$$a_i = \left[b\cdot x_{i-1}\right], \quad x_i = b\cdot x_{i-1} - \left[b\cdot x_{i-1}\right] \quad\hbox{for}\quad i \ge 1.$$

To see why this corresponds to the standard algorithm, note that at the first stage I'm trying to find $k
   \ge 0$ such that

$$a- \dfrac{k}{b} \ge 0 \quad\hbox{and}\quad a - \dfrac{k + 1}{b} < 0.$$

These equations are equivalent to

$$ba - k \ge 0 \quad\hbox{and}\quad ba - (k + 1) < 0, \quad\hbox{or}\quad$$

$$ba \ge k \quad\hbox{and}\quad ba < k + 1.$$

That is, $k = [ba]$ , and a corresponds to $x_i$ .

It's convenient to arrange the computations in a table, as shown below.


Example. Find 0.4 in base 7.

I fill in the rows from left to right. Starting with an x, multiply by $b = 7$ to fill in the third column. Take the greatest integer of the result to fill in the a-column of the next row. Subtract the a-value from the last $bx$ -value to get the next x, and continue. You can check that this is the algorithm described above.

$$\vbox{\offinterlineskip \halign{& \vrule # & \strut \hfil \quad # \quad \hfil \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & a & & x & & $bx$ & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & - & & 0.4 & & 2.8 & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & 2 & & 0.8 & & 5.6 & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & 5 & & 0.6 & & 4.2 & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & 4 & & 0.2 & & 1.4 & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} height2pt & \omit & & \omit & & \omit & \cr & 1 & & 0.4 & & 2.8 & \cr height2pt & \omit & & \omit & & \omit & \cr \noalign{\hrule} }} $$

The expansion clearly repeats after this, since I'm getting 0.4 for x again. Thus,

$$0.4 = (0.\overline{2541})_7.\quad\halmos$$


Definition. The decimal expansion $x = .a_1a_2\ldots$ terminates if there is a number $N > 0$ such that $a_n = 0$ for $n \ge N$ .

In this case,

$$x = \dfrac{a_1\cdot 10^{N-1} + a_2\cdot 10^{N-2} + \cdots + a_N}{10^N}.$$

Hence, x is rational.

A decimal expansion $x =
   .a_1a_2\ldots$ is periodic with period k if there is a positive integer N such that $a_n = a_{n+k}$ for all $n \ge N$ .

Periodic expansions also represent rational numbers. Again, I'll give an example rather than writing out the unenlightening proof.

The converse is also true: Rational numbers have decimal expansions which are either periodic or terminating.


Example. Express $0.\overline{473}$ as a rational number in lowest terms.

Since the number has period 3, I multiply both sides by $10^3$ :

$$x = 0.\overline{473} = 0.473473\ldots,$$

$$1000x = 473.473473\ldots.$$

Next, subtract the first equation from the second:

$$999x = 473,$$

$$x = \dfrac{473}{999}.\quad\halmos$$


Example. Express $(0.\overline{473})_8$ as a (decimal) rational number in lowest terms.

Since the number has period 3, I multiply both sides by $8^3 = 512$ :

$$x = (0.\overline{473})_8 = (0.473473\ldots)_8,$$

$$(512)_{10}\cdot x = (473.473473\ldots)_8.$$

Next, subtract the first equation from the second, being careful about the bases:

$$(511)_{10}x = (473)_8 = (315)_{10},$$

$$x = \dfrac{315}{511} = \dfrac{45}{73}.\quad\halmos$$


Example. Express $(0.24\overline{122})_{10}$ as a rational number in lowest terms.

Since the number has period 3, I multiply both sides by $10^3$ :

$$x = (0.24\overline{122})_{10} = 0.24122122\ldots,$$

$$1000x = 241.22122122\ldots.$$

Next, subtract the first equation from the second:

$$999x = 240.98,$$

$$x = \dfrac{240.98}{999} = \dfrac{24098}{99900} = \dfrac{12049}{49950}.\quad\halmos$$



Contact information

Bruce Ikenaga's Home Page

Copyright 2008 by Bruce Ikenaga