Currently there may be errors shown on top of a page, because of a missing Wiki update (PHP version and extension DPL3).
Navigation
Topics Help • Register • News • History • How to • Sequences statistics • Template prototypes

Difference between revisions of "Rational number"

From Prime-Wiki
Jump to: navigation, search
m
(Moving to new subcategory)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A '''rational number''' is a [[real number]] which can be written as ''a/b'' where ''a'' (the '''numerator''') is any [[integer]] and ''b'' (the '''denominator''') is an integer different from zero. The set of all rational numbers is named <math>\mathbb{Q}</math>.
+
A '''rational number''' is a [[real number]] which can be written as <math>\frac{a}{b}</math> or <math>a/b</math> where <math>a</math> (the '''numerator''') is any [[integer]] and <math>b</math> (the '''denominator''') is an integer different from zero. The set of all rational numbers is named <math>\mathbb{Q}</math>.
  
The notation ''a/b'' is called '''fraction'''. A fraction is irreducible when both numbers are [[coprime]], otherwise it can be reduced to an irreducible form by dividing both the numerator and the denominator by their [[greatest common divisor]]. This operation does not change the rational number represented by the fraction.
+
The notation <math>a/b</math> is called '''fraction'''. A fraction is irreducible when both numbers are [[coprime]], otherwise it can be reduced to an irreducible form by dividing both the numerator and the denominator by their [[greatest common divisor]]. This operation does not change the rational number represented by the fraction.
  
 
The following operations are defined:
 
The following operations are defined:
  
 
==Addition==
 
==Addition==
:<math>\large \frac AB\,+\,\frac CD = \frac{A\,D\,+\,B\,C}{B\,D}</math>
+
:<math>\large \frac{A}{B} + \frac{C}{D} = \frac{AD+BC}{BD}</math>
  
 
==Subtraction==
 
==Subtraction==
:<math>\large \frac AB\,-\,\frac CD = \frac{A\,D\,-\,B\,C}{B\,D}</math>
+
:<math>\large \frac{A}{B} - \frac{C}{D} = \frac{AD-BC}{BD}</math>
  
 
==Multiplication==
 
==Multiplication==
:<math>\large \frac AB\,\frac CD = \frac{A\,C}{B\,D}</math>
+
:<math>\large \frac{A}{B}\frac{C}{D} = \frac{AC}{BD}</math>
  
 
==Division==
 
==Division==
 
Valid only when the second rational number is not zero.
 
Valid only when the second rational number is not zero.
:<math>\large \frac AB\,/\,\frac CD = \frac{A\,D}{B\,C}</math>
+
:<math>\large \frac{A}{B}/\frac{C}{D} = \frac{AD}{BC}</math>
  
 
Between two rational numbers there are infinite other rational numbers. This is because between the numbers <math>a</math> and <math>b</math> we have the following <math>n</math> numbers:
 
Between two rational numbers there are infinite other rational numbers. This is because between the numbers <math>a</math> and <math>b</math> we have the following <math>n</math> numbers:
:<math>\large a +\frac {k(b-a)}{n+1}</math>
+
:<math>\large a + \frac{k(b-a)}{n+1}</math>
 
by varying the number <math>k</math> from 1 to <math>n</math>. Then we can make the value <math>n</math> as high as we please.
 
by varying the number <math>k</math> from 1 to <math>n</math>. Then we can make the value <math>n</math> as high as we please.
  
Line 27: Line 27:
  
 
==Decimal representation of rational numbers==
 
==Decimal representation of rational numbers==
A rational number can be represented exactly when the denominator of the irreducible fraction is a perfect power of 2 multiplied by a perfect power of 5, i.e. it has the form 2<sup>n</sup> &times; 5<sup>m</sup>.
+
A rational number can be represented exactly when the denominator of the irreducible fraction is a perfect power of 2 multiplied by a perfect power of 5, i.e. it has the form <math>2^n \times 5^m</math>.
  
 
Otherwise the number represented in decimal is periodic where the period is a divisor of the Euler totient function of the denominator. This function can be computed by [[Factorization|factoring]] the denominator. As a special case, when the denominator is a [[prime]] number, the period is a divisor of the denominator minus 1.
 
Otherwise the number represented in decimal is periodic where the period is a divisor of the Euler totient function of the denominator. This function can be computed by [[Factorization|factoring]] the denominator. As a special case, when the denominator is a [[prime]] number, the period is a divisor of the denominator minus 1.
Line 33: Line 33:
 
When we have the number represented in decimal form, to convert it to a fraction depends on whether the decimal expansion is exact or periodic.
 
When we have the number represented in decimal form, to convert it to a fraction depends on whether the decimal expansion is exact or periodic.
  
In the first case, when the number N in decimal has the form m.n where n has d digits at the right of the decimal point (d=0 for integers), the fraction is:
+
In the first case, when the number <math>N</math> in decimal has the form <math>m.n</math> where <math>n</math> has <math>d</math> digits at the right of the decimal point (<math>d=0</math> for integers), the fraction is:
:<math>\large N\,=\,\frac {m * 10^d + n}{10^d}</math>
+
:<math>\large N = \frac{m * 10^d + n}{10^d}</math>
  
In the second case, when the number N in decimal has the form m.npppp... where n has d digits and p has e digits, the fraction is:
+
In the second case, when the number <math>N</math> in decimal has the form <math>m.npppp\ldots</math> where <math>n</math> has <math>d</math> digits and <math>p</math> has <math>e</math> digits, the fraction is:
:<math>\large N\,=\,\frac {(m * 10^d + n)\,(10^e-1)+p}{10^d (10^e-1)}</math>
+
:<math>\large N = \frac{(m * 10^d + n)(10^e-1)+p}{10^d (10^e-1)}</math>
  
 
==External links==
 
==External links==
*[[Wikipedia:Rational number|Wikipedia]]
+
*[[Wikipedia:Rational number|Rational number]]
[[Category:Math]]
+
 
 +
{{Navbox NumberClasses}}
 +
 
 +
[[Category:Number systems]]

Latest revision as of 15:01, 26 March 2023

A rational number is a real number which can be written as [math]\displaystyle{ \frac{a}{b} }[/math] or [math]\displaystyle{ a/b }[/math] where [math]\displaystyle{ a }[/math] (the numerator) is any integer and [math]\displaystyle{ b }[/math] (the denominator) is an integer different from zero. The set of all rational numbers is named [math]\displaystyle{ \mathbb{Q} }[/math].

The notation [math]\displaystyle{ a/b }[/math] is called fraction. A fraction is irreducible when both numbers are coprime, otherwise it can be reduced to an irreducible form by dividing both the numerator and the denominator by their greatest common divisor. This operation does not change the rational number represented by the fraction.

The following operations are defined:

Addition

[math]\displaystyle{ \large \frac{A}{B} + \frac{C}{D} = \frac{AD+BC}{BD} }[/math]

Subtraction

[math]\displaystyle{ \large \frac{A}{B} - \frac{C}{D} = \frac{AD-BC}{BD} }[/math]

Multiplication

[math]\displaystyle{ \large \frac{A}{B}\frac{C}{D} = \frac{AC}{BD} }[/math]

Division

Valid only when the second rational number is not zero.

[math]\displaystyle{ \large \frac{A}{B}/\frac{C}{D} = \frac{AD}{BC} }[/math]

Between two rational numbers there are infinite other rational numbers. This is because between the numbers [math]\displaystyle{ a }[/math] and [math]\displaystyle{ b }[/math] we have the following [math]\displaystyle{ n }[/math] numbers:

[math]\displaystyle{ \large a + \frac{k(b-a)}{n+1} }[/math]

by varying the number [math]\displaystyle{ k }[/math] from 1 to [math]\displaystyle{ n }[/math]. Then we can make the value [math]\displaystyle{ n }[/math] as high as we please.

This means that the set of rational numbers is a dense subset of the real numbers.

From the above reasoning one can think that all real number are rational, but it can be shown that the set of irrational numbers (those real numbers that are not rational) is also dense and there are more irrational numbers than rationals (there are different types of infinites).

Decimal representation of rational numbers

A rational number can be represented exactly when the denominator of the irreducible fraction is a perfect power of 2 multiplied by a perfect power of 5, i.e. it has the form [math]\displaystyle{ 2^n \times 5^m }[/math].

Otherwise the number represented in decimal is periodic where the period is a divisor of the Euler totient function of the denominator. This function can be computed by factoring the denominator. As a special case, when the denominator is a prime number, the period is a divisor of the denominator minus 1.

When we have the number represented in decimal form, to convert it to a fraction depends on whether the decimal expansion is exact or periodic.

In the first case, when the number [math]\displaystyle{ N }[/math] in decimal has the form [math]\displaystyle{ m.n }[/math] where [math]\displaystyle{ n }[/math] has [math]\displaystyle{ d }[/math] digits at the right of the decimal point ([math]\displaystyle{ d=0 }[/math] for integers), the fraction is:

[math]\displaystyle{ \large N = \frac{m * 10^d + n}{10^d} }[/math]

In the second case, when the number [math]\displaystyle{ N }[/math] in decimal has the form [math]\displaystyle{ m.npppp\ldots }[/math] where [math]\displaystyle{ n }[/math] has [math]\displaystyle{ d }[/math] digits and [math]\displaystyle{ p }[/math] has [math]\displaystyle{ e }[/math] digits, the fraction is:

[math]\displaystyle{ \large N = \frac{(m * 10^d + n)(10^e-1)+p}{10^d (10^e-1)} }[/math]

External links

Number classes
General numbers
Special numbers
Prime numbers