# Rational number

In mathematics, a**rational number**(or informally

**fraction**) is a ratio of two integers, usually written as the vulgar fraction

*a*/

*b*, where

*b*is not zero. The set of all rational numbers is denoted by

**Q**, or in blackboard bold .

Each rational number can be written in many forms, for example 3/6 = 2/4 = 1/2. The simplest form is when *a* and *b* have no common factors, and every rational number has a simplest form of this type. The decimal expansion of a rational number is eventually periodic, and this property characterises rational numbers. (A finite expansion is considered to be periodic by adding zeroes indefinitely to the finite expansion. Also, there is nothing special about the choice of base 10 here; any other integral base above 1 will work just as well.) A real number that is not rational is called an irrational number.

In mathematics, the term "rational *something*" means that the underlying field considered is the field **Q** of rational numbers. For example, rational polynomials or rational prime ideals.

Table of contents |

2 History 3 Formal Construction 4 Properties 5 Real numbers 6 p-adic numbers |

## Arithmetic

Addition and multiplication of rational numbers are as follows:

Two rational numbers*a*/

*b*and

*c*/

*d*are equal if and only if

*ad*=

*bc*.

Additive and multiplicative inverses exist in the rational numbers.

## History

### Egyptian fractions

Any positive rational number can be expressed as a sum of distinct reciprocals of positive integers. For instance, 5/7 = 1/2 + 1/6 + 1/21. For any positive rational number, there are infinitely many different such representations. These representations are called *Egyptian fractions*, because the ancient Egyptians used them. The hieroglyph used for this is the letter that looks like a mouth, which is transliterated R, so the above fraction would be written as R2R6R21. The Egyptians also had a different notation for dyadic fractions.

## Formal Construction

Mathematically we may define them as an ordered pair of integers (*a*, *b*), with *b* not equal to zero. We can define addition and multiplication of these pairs with the following rules:

- (
*a*,*b*) + (*c*,*d*) = (*ad*+*bc*,*bd*) - (
*a*,*b*) * (*c*,*d*) = (*ac*,*bd*)

- (
*a*,*b*) ~ (*c*,*d*) if, and only if,*ad*=*bc*.

**Q**to be the quotient set of ~, i.e. we identify two pairs (

*a*,

*b*) and (

*c*,

*d*) if they are equivalent in the above sense. (This construction can be carried out in any integral domain, see quotient field.)

We can also define a total order on **Q** by writing

- (
*a*,*b*) ≤ (*c*,*d*) if, and only if,*ad*≤*bc*.

## Properties

The set **Q**, together with the addition and multiplication operations shown above, forms a field, the quotient field of the integers **Z**.

The rationals are the smallest field with characteristic 0: every other field of characteristic 0 contains a copy of **Q**.

The algebraic closure of **Q**, i.e. the field of roots of rational polynomials, is the algebraic numbers.

The set of all rational numbers is countable. Since the set of all real numbers is uncountable, we say that almost all real numbers are irrational, in the sense of Lebesgue measure.

The rationals are a densely ordered set: between any two rationals, there sits another one, in fact infinitely many other ones.

## Real numbers

The rationals are a dense subset of the real numbers: every real number has rational numbers arbitrarily close to it. A related property is that rational numbers are the only numbers with finite expressions of continued fraction.

By virtue of their order, the rationals carry an order topology. The rational numbers are a (dense) subset of the real numbers, and as such they also carry a subspace topology. The rational numbers form a metric space by using the metric *d*(*x*, *y*) = |*x* − *y*|, and this yields a third topology on **Q**. Fortunately, all three topologies coincide and turn the rationals into a topological field. The rational numbers are an important example of a space which is not locally compact. The space is also totally disconnected. The rational numbers do not form a complete metric space; the real numbers are the completion of **Q**.

*p*-adic numbers

In addition to the absolute value metric mentioned above, there are other metrics which turn **Q** into a topological field: let *p* be a prime number and for any non-zero integer *a* let |*a*|_{p} = *p*^{−n}, where *p*^{n} is the highest power of *p* dividing *a*; in addition write |0|_{p} = 0. For any rational number *a*/*b*, we set |*a*/*b*|_{p} = |*a*|_{p} / |*b*|_{p}. Then *d*_{p}(*x*, *y*) = |*x* − *y*|_{p} defines a metric on **Q**. The metric space (**Q**, *d*_{p}) is not complete, and its completion is the *p*-adic number field **Q**_{p}.

See also: integer -- irrational number -- real number -- division ---

Topics in mathematics related to quantity
| Edit |

Numbers | Natural numbers | Integers | Rational numbers | Real numbers | Complex numbers | Hypercomplex numbers | Quaternions | Octonions | Sedenions | Hyperreal numbers |
Surreal numbers | Ordinal numbers | Cardinal numbers | p-adic numberss | Integer sequences | Mathematical constants | Infinity
| |