In mathematics, a rational number is any number that can be expressed as the quotient or fraction of two , a numerator and a nonzero denominator .
Since may be equal to 1, every integer is a rational number. The set of all rational numbers, often referred to as "
the rationals", the
field of rationals or the
field of rational numbers is usually denoted by a boldface (or
blackboard bold $\backslash mathbb\{Q\}$, Unicode ℚ);
it was thus denoted in 1895 by
Giuseppe Peano after
, Italian for "
quotient".
The decimal expansion of a rational number always either terminates after a finite number of numerical digit or begins to repeat the same finite sequence of digits over and over. Moreover, any repeating or terminating decimal represents a rational number. These statements hold true not just for decimal, but also for any other integer radix (e.g. binary, hexadecimal).
A real number that is not rational is called irrational. Irrational numbers include , , , and Golden ratio. The decimal expansion of an irrational number continues without repeating. Since the set of rational numbers is countable set, and the set of real numbers is uncountable set, almost all real numbers are irrational.[
]
Rational numbers can be formally defined as equivalence classes of pairs of integers such that , for the equivalence relation defined by iff . With this formal definition, the fraction becomes the standard notation for the equivalence class of .
Rational numbers together with addition and multiplication form a field which contains the and is contained in any field containing the integers. In other words, the field of rational numbers is a prime field, and a field has characteristic zero if and only if it contains the rational numbers as a subfield. Finite field extension of are called algebraic number fields, and the algebraic closure of is the field of .
(2018). 053440264X, Thomson Brooks/Cole. 053440264X
In mathematical analysis, the rational numbers form a dense set of the real numbers. The real numbers can be constructed from the rational numbers by completion, using , , or infinite .
Terminology
The term
rational in reference to the set
Q refers to the fact that a rational number represents a
ratio of two integers. In mathematics, "rational" is often used as a noun abbreviating "rational number". The adjective
rational sometimes means that the
are rational numbers. For example, a
rational point is a point with rational
coordinates (that is a point whose coordinates are rational numbers; a
rational matrix is a matrix of rational numbers; a
rational polynomial may be a polynomial with rational coefficients, although the term "polynomial over the rationals" is generally preferred, for avoiding confusion with "rational expression" and "rational function" (a polynomial is a rational expression and defines a rational function, even if its coefficients are not rational numbers). However, a
rational curve is not a curve defined over the rationals, but a curve which can be parameterized by rational functions.
Arithmetic
Irreducible fraction
Every rational number may be expressed in a unique way as an irreducible fraction , where and are
coprime integers, and . This is often called the
canonical form.
Starting from a rational number , its canonical form may be obtained by dividing and by their greatest common divisor, and, if , changing the sign of the resulting numerator and denominator.
Embedding of integers
Any integer can be expressed as the rational number , which is its canonical form as a rational number.
Equality
 $\backslash frac\{a\}\{b\}\; =\; \backslash frac\{c\}\{d\}$ if and only if $ad\; =\; bc.$
If both fractions are in canonical form then
 $\backslash frac\{a\}\{b\}\; =\; \backslash frac\{c\}\{d\}$ if and only if $a\; =\; c$ and $b\; =\; d$
Ordering
If both denominators are positive, and, in particular, if both fractions are in canonical form,
 $\backslash frac\{a\}\{b\}\; <\; \backslash frac\{c\}\{d\}$ if and only if $ad\; <\; bc.$
If either denominator is negative, 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.
Addition
Two fractions are added as follows:
 $\backslash frac\{a\}\{b\}\; +\; \backslash frac\{c\}\{d\}\; =\; \backslash frac\{ad+bc\}\{bd\}.$
If both fractions are in canonical form, the result is in canonical form if and only if and are coprime integers.
Subtraction
 $\backslash frac\{a\}\{b\}\; \; \backslash frac\{c\}\{d\}\; =\; \backslash frac\{adbc\}\{bd\}.$
If both fractions are in canonical form, the result is in canonical form if and only if and are coprime integers.
Multiplication
The rule for multiplication is:
 $\backslash frac\{a\}\{b\}\; \backslash cdot\backslash frac\{c\}\{d\}\; =\; \backslash frac\{ac\}\{bd\}.$
Even if both fractions are in canonical form, the result may be a reducible fraction.
Inverse
Every rational number has an
additive inverse, often called its
opposite,
 $\; \backslash left(\; \backslash frac\{a\}\{b\}\; \backslash right)\; =\; \backslash frac\{a\}\{b\}.$
If is in canonical form, the same is true for its opposite.
A nonzero rational number has a multiplicative inverse, also called its reciprocal,
 $\backslash left(\backslash frac\{a\}\{b\}\backslash right)^\{1\}\; =\; \backslash frac\{b\}\{a\}.$
If is in canonical form, then the canonical form of its reciprocal is either or , depending on the sign of .
Division
If both and are nonzero, the division rule is
 $\backslash frac\{\backslash frac\{a\}\{b\}\}\; \{\backslash frac\{c\}\{d\}\}\; =\; \backslash frac\{ad\}\{bc\}.$
Thus, dividing by is equivalent to multiplying by the reciprocal of :
 $\backslash frac\{ad\}\{bc\}\; =\; \backslash frac\{a\}\{b\}\; \backslash cdot\; \backslash frac\{d\}\{c\}.$
Exponentiation to integer power
If is a nonnegative integer, then
 $\backslash left(\backslash frac\{a\}\{b\}\backslash right)^n\; =\; \backslash frac\{a^n\}\{b^n\}.$
The result is in canonical form if the same is true for .
In particular,
 $\backslash left(\backslash frac\{a\}\{b\}\backslash right)^0\; =\; 1.$
If , then
 $\backslash left(\backslash frac\{a\}\{b\}\backslash right)^\{n\}\; =\; \backslash frac\{b^n\}\{a^n\}.$
If is in canonical form, the canonical form of the result is
$\backslash frac\{b^n\}\{a^n\}$ if either or is even. Otherwise, the canonical form of the result is
$\backslash frac\{b^n\}\{a^n\}.$
Continued fraction representation
A
finite continued fraction is an expression such as
 $a\_0\; +\; \backslash cfrac\{1\}\{a\_1\; +\; \backslash cfrac\{1\}\{a\_2\; +\; \backslash cfrac\{1\}\{\; \backslash ddots\; +\; \backslash cfrac\{1\}\{a\_n\}\; \}\}\},$
where
a_{n} are integers. Every rational number
a/
b can be represented as a finite continued fraction, whose
a_{n} can be determined by applying the Euclidean algorithm to (
a,
b).
Other representations

common fraction: $\backslash frac\{8\}\{3\}$

mixed numeral: $2\backslash tfrac\{2\}\{3\}$

repeating decimal using a vinculum: $2.\backslash overline\{6\}$

repeating decimal using parentheses: $2.(6)$

continued fraction using traditional typography: $2\; +\; \backslash cfrac\{1\}\{1\; +\; \backslash cfrac\{1\}\{2\}\; \}$

continued fraction in abbreviated notation: 2;

egyptian fraction: $2\; +\; \backslash frac\{1\}\{2\}\; +\; \backslash frac\{1\}\{6\}$

prime power decomposition: $2^3\backslash times3^\{1\}$

quote notation: 3!6
are different ways to represent the same rational value.
Formal construction
Mathematically we may construct the rational numbers as equivalence classes of
of
(
m,
n), with . This space of equivalence classes is the quotient space where if, and only if, We can define addition and multiplication of these pairs with the following rules:
 $\backslash left(m\_1,\; n\_1\backslash right)\; +\; \backslash left(m\_2,\; n\_2\backslash right)\; \backslash equiv\; \backslash left(m\_1n\_2\; +\; n\_1m\_2,\; n\_1n\_2\backslash right)$
 $\backslash left(m\_1,\; n\_1\backslash right)\; \backslash times\; \backslash left(m\_2,\; n\_2\backslash right)\; \backslash equiv\; \backslash left(m\_1m\_2,\; n\_1n\_2\backslash right)$
and, if
m_{2} ≠ 0, division by
 $\backslash frac\{\backslash left(m\_1,\; n\_1\backslash right)\}\; \{\backslash left(m\_2,\; n\_2\backslash right)\}\; \backslash equiv\; \backslash left(m\_1n\_2,\; n\_1m\_2\backslash right).$
The equivalence relation ( m_{1}, n_{1}) ~ ( m_{2}, n_{2}) if, and only if, is a congruence relation, i.e. it is compatible with the addition and multiplication defined above, and we may define Q to be the quotient set i.e. we identify two pairs ( m_{1}, n_{1}) and ( m_{2}, n_{2}) if they are equivalent in the above sense. (This construction can be carried out in any integral domain: see field of fractions.) We denote by ( m_{1}, n_{1}) the equivalence class containing ( m_{1}, n_{1}). If ( m_{1}, n_{1}) ~ ( m_{2}, n_{2}) then, by definition, ( m_{1}, n_{1}) belongs to ( m_{2}, n_{2}) and ( m_{2}, n_{2}) belongs to ( m_{1}, n_{1}); in this case we can write . Given any equivalence class ( m, n) there are a countably infinite number of representation, since
 $\backslash cdots\; =\; (2m,2n)\; =\; (m,n)\; =\; (m,n)\; =\; (2m,2n)\; =\; \backslash cdots.$
The canonical choice for ( m, n) is chosen so that n is positive and , i.e. m and n share no common factors, i.e. m and n are coprime. For example, we would write (1,2) instead of (2,4) or (−12,−24), even though .
We can also define a total order on Q. Let ∧ be the andsymbol and ∨ be the orsymbol. We say that if:
 $(n\_1n\_2\; >\; 0\; \backslash \; \backslash and\; \backslash \; m\_1n\_2\; \backslash le\; n\_1m\_2)\; \backslash \; \backslash or\; \backslash \; (n\_1n\_2\; <\; 0\; \backslash \; \backslash and\; \backslash \; m\_1n\_2\; \backslash ge\; n\_1m\_2).$
The integers may be considered to be rational numbers by the embedding that maps m to ( m,1).
Properties
The set
Q, together with the addition and multiplication operations shown above, forms a field, the field of fractions of the
Z.
The rationals are the smallest field with characteristic zero: every other field of characteristic zero contains a copy of Q. The rational numbers are therefore the prime field for characteristic zero.
The algebraic closure of Q, i.e. the field of roots of rational polynomials, is the .
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, i.e. the set of rational numbers is a null set.
The rationals are a densely ordered set: between any two rationals, there sits another one, and, therefore, infinitely many other ones. For example, for any two fractions such that
 $\backslash frac\{a\}\{b\}\; <\; \backslash frac\{c\}\{d\}$
(where
$b,d$ are positive), we have
 $\backslash frac\{a\}\{b\}\; <\; \backslash frac\{ad\; +\; bc\}\{2bd\}\; <\; \backslash frac\{c\}\{d\}.$
Any totally ordered set which is countable, dense (in the above sense), and has no least or greatest element is order isomorphic to the rational numbers.
Real numbers and topological properties
The rationals are a
dense set 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 set expansions as regular continued fractions.
By virtue of their order, the rationals carry an order topology. The rational numbers, as a subspace of the real numbers, also carry a subspace topology. The rational numbers form a metric space by using the absolute difference metric and this yields a third topology on Q. 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 rationals are characterized topologically as the unique countable metrizable space without . The space is also totally disconnected. The rational numbers do not form a complete metric space; the real numbers are the completion of Q under the metric above.
padic 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 nonzero integer a, let , where p^{n} is the highest power of p divisor a.
In addition set For any rational number a/ b, we set
Then defines a metric space on Q.
The metric space ( Q, d_{p}) is not complete, and its completion is the padic number Q_{ p}. Ostrowski's theorem states that any nontrivial absolute value on the rational numbers Q is equivalent to either the usual real absolute value or a padic number absolute value.
See also
External links