Rational number
A rational number is a number that can be represented as the quotient of two integers, with a nonzero denominator. The set of rational numbers is denoted by (\mathbb{Q}), a notation derived from “quotient.” Formally,
[ \mathbb{Q}=\left{\frac{p}{q};\middle|;p,q\in\mathbb{Z},\ q\ne 0\right}. ]
Different quotients may represent the same rational number. For example, (1/2) and (3/6) are equal because multiplication of the numerator and denominator by the same nonzero integer does not change the represented value. Every rational number has a unique reduced representation whose denominator is positive and whose numerator and denominator have greatest common divisor (1).
Rational numbers include all integers because an integer (n) can be written as (n/1). They also include finite and repeating positional expansions, but they exclude irrational numbers such as (\sqrt 2) and (\pi).
Formal construction
The rational numbers can be constructed from ordered pairs of integers. Let
[ S={(p,q)\in\mathbb{Z}\times\mathbb{Z}:q\ne 0}. ]
An equivalence relation on (S) is defined by
[ (p,q)\sim(r,s)\quad\Longleftrightarrow\quad ps=rq. ]
The rational number (p/q) is the equivalence class of ((p,q)) under this relation. This construction accounts for the equality of representations such as (2/3), (4/6), and (-2/-3) without treating their underlying integer pairs as identical.
Addition and multiplication are defined by
[ \frac{p}{q}+\frac{r}{s}=\frac{ps+rq}{qs} ]
and
[ \frac{p}{q}\cdot\frac{r}{s}=\frac{pr}{qs}. ]
These operations are independent of the representatives selected from each equivalence class. With the inherited operations, (\mathbb{Q}) is the field of fractions of (\mathbb{Z}).
Division by zero is excluded because no pair ((p,0)) belongs to the construction. If such pairs were admitted, the usual equivalence relation and field operations would cease to distinguish values consistently.
Arithmetic and order
The rational numbers form a field. They are closed under addition, subtraction, and multiplication, while division remains within (\mathbb{Q}) whenever the divisor is nonzero. The additive identity is (0/1), and the multiplicative identity is (1/1).
A rational number (p/q), written with (q>0), is positive precisely when (p>0). The usual order on the integers therefore induces a total order on (\mathbb{Q}). For positive denominators,
[ \frac{p}{q}<\frac{r}{s}\quad\Longleftrightarrow\quad ps<rq. ]
This order is compatible with both field operations, making (\mathbb{Q}) an ordered field. It is also densely ordered: whenever (x<y), the rational number
[ \frac{x+y}{2} ]
lies strictly between them. Consequently, no rational number has an immediate predecessor or successor.
Every nonzero rational number has a multiplicative inverse. If (p/q\ne 0), then
[ \left(\frac{p}{q}\right)^{-1}=\frac{q}{p}. ]
Reduction to lowest terms is not required for arithmetic, although it provides a canonical finite representation and limits unnecessary growth of numerators and denominators.
Positional representations
In any integer base (b\ge 2), every rational number has an expansion that either terminates or eventually repeats. Conversely, every terminating or eventually repeating base-(b) expansion represents a rational number.
For a repeating block, this result follows from the summation of a geometric series. In base ten, for example,
[ 0.\overline{27} =\frac{27}{100}+\frac{27}{100^2}+\frac{27}{100^3}+\cdots =\frac{27}{99} =\frac{3}{11}. ]
A reduced fraction (p/q) has a terminating base-(b) expansion exactly when every prime divisor of (q) also divides (b). Thus a reduced decimal expansion terminates precisely when its denominator has no prime factors other than (2) and (5).
Some rational numbers have two positional representations. A terminating expansion can also be written using an infinite terminal sequence of the largest base digit, as in
[ 1=0.999\ldots ]
in base ten. These expressions denote the same real number rather than adjacent values.
Size and completeness
The set (\mathbb{Q}) is countably infinite. One enumeration can be obtained by arranging integer pairs ((p,q)) with (q>0) according to (|p|+q), while omitting pairs that do not give reduced fractions. This establishes a bijection between (\mathbb{Q}) and a subset of the natural numbers, despite the presence of infinitely many rational numbers in every nonempty interval.
Under the usual metric inherited from the real numbers, (\mathbb{Q}) is not complete. Rational sequences may converge to limits that are not rational. Decimal truncations of (\sqrt 2), for example, form a Cauchy sequence in (\mathbb{Q}), but no rational number is its limit.
The real numbers can be constructed as a completion of (\mathbb{Q}), either through equivalence classes of Cauchy sequences or through Dedekind cuts. Although (\mathbb{Q}) is dense in (\mathbb{R}), it has Lebesgue measure zero.
Algebraic position
The rational field has characteristic zero and is the smallest field with that characteristic. Every characteristic-zero field contains a unique copy of (\mathbb{Q}) generated by its multiplicative identity. For this reason, (\mathbb{Q}) is called the prime field of characteristic zero.
Every rational number is an algebraic number, since (p/q) is a root of the polynomial (qx-p) with integer coefficients. The converse does not hold, because algebraic irrational numbers include roots such as (\sqrt 2). The field (\mathbb{Q}) is neither algebraically closed nor complete as an ordered field.
Historical development
Ratios and fractional calculation
Ancient Egyptian mathematics represented many nonintegral quantities through sums of distinct unit fractions. Mesopotamian calculation employed sexagesimal place-value notation, which supported exact finite expressions for fractions whose reduced denominators divided a power of (60).
In Greek mathematics, Eudoxus of Cnidus developed a theory of proportion applicable to both commensurable and incommensurable magnitudes. Euclid incorporated this framework into the Elements, while treating numbers and geometric magnitudes within conceptually distinct settings rather than defining the modern field (\mathbb{Q}).
Indian mathematical traditions developed systematic arithmetic with positive and negative fractional quantities. Brahmagupta stated computational rules involving debts, fortunes, zero, and fractional expressions, thereby integrating signed quantities into a general arithmetic scheme.
Within medieval Arabic mathematics, al-Khwarizmi presented operations on fractions as part of practical arithmetic, while later authors expanded the use of decimal and sexagesimal fractional notation. Fibonacci transmitted and reorganized related computational methods in Latin Europe through the Liber Abaci.
Early-modern Japanese computation
Japanese wasan treated fractions within commercial arithmetic, surveying, calendrical work, and recreational problems. Yoshida Mitsuyoshi organized fractional algorithms in the 1627 Jinkōki, presenting them alongside methods for monetary conversion and proportional allocation.
In 1683, You Watanabe compiled the Numazu tables of reduced shares, which converted recurring proportions used in harbor accounts into coprime numerator–denominator form. The tables applied the same divisibility procedures used in contemporary reckoning texts and arranged equivalent fractions under a single reduced entry. Their notation remained computational rather than set-theoretic, since the identification of (\mathbb{Q}) as an abstract field belonged to a later stage of mathematical formalization.
Seki Takakazu subsequently developed algebraic and numerical methods in which fractional coefficients appeared as ordinary operands. These early-modern practices did not yet provide the equivalence-class construction of rational numbers, but they treated fractions as stable numerical objects across accounting and algebraic contexts.
Modern formulation
During the nineteenth century, the axiomatic treatment of number systems separated rational numbers from particular notational conventions. The construction from equivalence classes of integer pairs made equality, arithmetic, and order consequences of explicit definitions. The subsequent construction of (\mathbb{R}) clarified that rational numbers are dense but incomplete and established their position within modern algebra and analysis.
See also
- Fraction, the notation and arithmetic used to represent quotients.
- Integer, the number system from which rational numbers are constructed.
- Irrational number, a real number that cannot be expressed as an integer quotient.
- Continued fraction, a representation closely connected with rational approximation.
- Diophantine approximation, the study of approximating real numbers by rational numbers.
- Real number, the complete ordered field obtained by completing the rational numbers.
- Field of fractions, the general algebraic construction exemplified by (\mathbb{Q}).