# Rational number

960pages on
this wiki

A rational number is any real number which may be represented by the quotient $\tfrac{p}{q}$ such that $p$ and $q$ are integers and $q \ne 0$. When represented as a decimal, a rational number has a repeating decimal representation (as opposed to irrational numbers, which have a nonrepeating nonterminating decimal representation) (for example, $\tfrac{1}{3} = 0.\bar{3}$ and $\tfrac{1}{6} = 0.1\bar{6}$, where the overbar indicates the portion of the decimal which repeats) which may include a repeating zero (e.g., $\tfrac{1}{2} = 0.5\bar{0}$) that results in a terminating decimal (e.g., 0.5). Thus, a terminating decimal is in fact a repeating decimal in which the repeating portion is zero.

Every rational number of the form $\tfrac{p}{q}$ has an equivalent repeating decimal representation as described above. This is due to the finite number of whole-number remainders possible for any divisor $q$. The divisor $q$ has a set of exactly $q$ possible remainders, $\left\{0..q-1\right\}$. When computing a decimal using long division, a given remainder multiplied by 10 real and divided by $q$ will result in the same or another remainder of $q$. As there are only a finite number of remainders, the process of long division is guaranteed to come back to a previously used remainder, which causes the sequence of remainders to cycle from that remainder.

Definition
Set of all real numbers

The set of all rational numbers, $\mathbb{Q}$, is defined as:

$\mathbb{Q} = \left\{\tfrac{p}{q} : p \in \mathbb{Z}, q \in \mathbb{Z}, q \ne 0\right\}$

The set of rational numbers (represented as $\mathbb{Q}$) is closed for the four fundamental arithmetic operations: addition, subtraction, multiplication and division. Because the set of integers is closed for addition, subtraction, and multiplication, operations involving rational numbers may be represented as the quotient of two sets of closed integer operations. For example, given two rational numbers $a$ and $b$ with quotient forms $a = \tfrac{p}{q}$ and $b = \tfrac{r}{s}$,

• Addition: $a + b = \tfrac{ps + rq}{qs}$
• Subtraction: $a - b = \tfrac{ps - rq}{qs}$
• Multiplication: $a \cdot b = \tfrac{p \cdot r}{q \cdot s}$
• Division: $a \div b = \tfrac{p \cdot s}{q \cdot r}$

Real numbers which are not rational are defined to be irrational numbers