Inmathematics, arational number is anumber that can be expressed as thequotient orfraction of twointegers, anumeratorp and a non-zerodenominatorq.[1] For example, is a rational number, as is every integer (for example,). Theset of all rational numbers is often referred to as "the rationals",[2] and isclosed underaddition,subtraction,multiplication, anddivision by a nonzero rational number. It is afield under these operations and therefore also calledthefield of rationals[3] or thefield of rational numbers. It is usually denoted by boldfaceQ, orblackboard bold
In mathematics, "rational" is often used as a noun abbreviating "rational number". The adjectiverational sometimes means that thecoefficients are rational numbers. For example, arational point is a point with rationalcoordinates (i.e., a point whose coordinates are rational numbers); arational matrix is amatrix of rational numbers, though it sometimes also refers to a matrix whose entries are rational functions; arational polynomial may be a polynomial with rational coefficients, although the term "polynomial over the rationals" is generally preferred, to avoid confusion between "rational expression" and "rational function" (apolynomial is a rational expression and defines a rational function, even if its coefficients are not rational numbers). However, arational curveis not a curve defined over the rationals, but a curve which can be parameterized by rational functions.
Although nowadaysrational numbers are defined in terms ofratios, the termrational is not aderivation ofratio. On the contrary, it isratio that is derived fromrational: the first use ofratio with its modern meaning was attested in English about 1660,[7] while the use ofrational for qualifying numbers appeared almost a century earlier, in 1570.[8] This meaning ofrational came from the mathematical meaning ofirrational, which was first used in 1551, and it was used in "translations of Euclid (following his peculiar use ofἄλογος)".[9][10]
This unusual history originated in the fact thatancient Greeks "avoided heresy by forbidding themselves from thinking of those [irrational] lengths as numbers".[11] So such lengths wereirrational, in the sense ofillogical, that is "not to be spoken about" (ἄλογος in Greek).[12]
Starting from a rational number its canonical form may be obtained by dividing botha andb by theirgreatest common divisor, and, ifb < 0, changing the sign of the resulting numerator and denominator.
If both denominators are positive (particularly if both fractions are in canonical form):
if and only if
On the other hand, if either denominator is negative, then each fraction with a negative denominator must first be converted into an equivalent form with a positive denominator—by changing the signs of both its numerator and denominator.[13]
Afinite continued fraction is an expression such as
wherean are integers. Every rational number can be represented as a finite continued fraction, whosecoefficientsan can be determined by applying theEuclidean algorithm to(a, b).
This equivalence relation is acongruence relation, which means that it is compatible with the addition and multiplication defined above; the set of rational numbers is the defined as thequotient set by this equivalence relation, equipped with the addition and the multiplication induced by the above operations. (This construction can be carried out with anyintegral domain and produces itsfield of fractions.)[13]
The equivalence class of a pair(m, n) is denoted Two pairs(m1,n1) and(m2,n2) belong to the same equivalence class (that is are equivalent) if and only if
The set of all rational numbers, together with the addition and multiplication operations shown above, forms afield.[13]
has nofield automorphism other than the identity. (A field automorphism must fix 0 and 1; as it must fix the sum and the difference of two fixed elements, it must fix every integer; as it must fix the quotient of two fixed elements, it must fix every rational number, and is thus the identity.)
is aprime field, which is a field that has no subfield other than itself.[15] The rationals are the smallest field withcharacteristic zero. Every field of characteristic zero contains a unique subfield isomorphic to
With the order defined above, is anordered field[14] that has no subfield other than itself, and is the smallest ordered field, in the sense that every ordered field contains a unique subfieldisomorphic to
The rationals are adensely ordered set: between any two rationals, there sits another one, and, therefore, infinitely many other ones.[13] For example, for any two fractions such that
(where are positive), we have
Anytotally ordered set which is countable, dense (in the above sense), and has no least or greatest element isorder isomorphic to the rational numbers.[17]
Illustration of the countability of the positive rationals
The set of positive rational numbers iscountable, as is illustrated in the figure.
More precisely, one can sort the fractions by increasing values of the sum of the numerator and the denominator, and, for equal sums, by increasing numerator or denominator. This produces asequence of fractions from which one can remove the reducible fractions (in red on the figure), obtaining a sequence that contains each rational number exactly once. This establishes a bijection between the rational numbers and the natural numbers, which maps each rational number to its rank in the sequence.
A similar method can be used for numbering all rational numbers (positive and negative).
As the set of all rational numbers is countable, and the set of all real numbers (as well as the set of irrational numbers) is uncountable, the set of rational numbers is anull set, that is,almost all real numbers are irrational, in the sense ofLebesgue measure.[18]
The metric space is not complete, and its completion is thep-adic number fieldOstrowski's theorem states that any non-trivialabsolute value on the rational numbers is equivalent to either the usual real absolute value or ap-adic absolute value.