Rational number

From TCS Wiki
Revision as of 01:36, 21 August 2017 by imported>RadiX (revert (vandalism))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In mathematics, a rational number is a number that can be written as a fraction. Rational numbers are all real numbers, and can be positive or negative. A number that is not rational is called irrational.

Most of the numbers that people use in everyday life are rational. These include fractions and integers. And also a number that can be written as a fraction while it is in its own form.

Writing rational numbers

Fraction form

All rational numbers can be written as a fraction. Take 1.5 as an example, this can be written as [math]\displaystyle{ 1 \frac{1}{2} }[/math], [math]\displaystyle{ \frac{3}{2} }[/math], or [math]\displaystyle{ 3/2 }[/math].

More examples of fractions that are rational numbers include [math]\displaystyle{ \frac{1}{7} }[/math], [math]\displaystyle{ \frac{-8}{9} }[/math], and [math]\displaystyle{ \frac{2}{5} }[/math].

Terminating decimals

A terminating decimal is a decimal with a certain number of digits to the right of the decimal point. Examples include 3.2, 4.075, and -300.12002. All of these are rational. Another good example would be 0.9582938472938498234.

Repeating decimals

A repeating decimal is a decimal where there are infinitely many digits to the right of the decimal point, but they follow a repeating pattern.

An example of this is [math]\displaystyle{ \frac{1}{3} }[/math]. As a decimal, it is written as 0.3333333333... The dots tell you that the number 3 repeats forever.

Sometimes, a group of digits repeats. An example is [math]\displaystyle{ \frac{1}{11} }[/math]. As a decimal, it is written as 0.09090909... In this example, the group of digits 09 repeats.

Also, sometimes the digits repeat after another group of digits. An example is [math]\displaystyle{ \frac{1}{6} }[/math]. It is written as 0.16666666... In this example, the digit 6 repeats, following the digit 1.

If you try this on your calculator, sometimes it may make a rounding error at the end. For instance, your calculator may say that [math]\displaystyle{ \frac{2}{3} = 0.6666667 }[/math], even though there is no 7. It rounds the 6 at the end up to 7.

Irrational numbers

The digits after the decimal point in an irrational number do not repeat in an infinite pattern. For instance, the first several digits of π (Pi) are 3.1415926535... A few of the digits repeat, but they never start repeating in an infinite pattern, no matter how far you go to the right of the decimal point.

Arithmetic

  • Whenever you add or subtract two rational numbers, you always get another rational number.
  • Whenever you multiply two rational numbers, you always get another rational number.
  • Whenever you divide two rational numbers, you always get another rational number, as long as you do not divide by zero.
  • Two rational numbers [math]\displaystyle{ \frac{a}{b} }[/math] and [math]\displaystyle{ \frac{c}{d} }[/math] are equal if [math]\displaystyle{ ad = bc }[/math].

Related pages