Rational and irrational numbers
 Definition 1: Rational number
A rational number (ℚ) is any number which can be written as:
$$\frac{a}{b}$$(1)where a and b are integers and $b\ne 0$.
The following numbers are all rational numbers:
We see that all numerators and all denominators are integers.
This means that all integers are rational numbers, because they can be written with a denominator of 1.
 Definition 2: Irrational numbers
Irrational numbers (ℚ') are numbers that cannot be written as a fraction with the numerator and denominator as integers.
Examples of irrational numbers:
These are not rational numbers, because either the numerator or the denominator is not an integer.
Decimal numbers
All integers and fractions with integer numerators and denominators are rational numbers.
You can write any rational number as a decimal number but not all decimal numbers are rational numbers. These types of decimal numbers are rational numbers:

Decimal numbers that end (or terminate). For example, the fraction $\frac{4}{10}$ can be written as 0,4.

Decimal numbers that have a repeating single digit. For example, the fraction $\frac{1}{3}$ can be written as $0,\dot{3}$ or as $0,\overline{3}$. The dot and bar notations are equivalent and both represent recurring 3's, i.e. $0,\dot{3}=0,\overline{3}=\mathrm{0,333}...$.

Decimal numbers that have a recurring pattern of multiple digits. For example, the fraction $\frac{2}{11}$ can also be written as $0,\overline{18}$. The bar represents a recurring pattern of 1 and 8's i.e. $0,\overline{18}=\mathrm{0,181818}...$.
Notation: You can use a dot or a bar over the repeated numbers to indicate that the decimal is a recurring decimal. If the bar covers more than one number, then all numbers beneath the bar are recurring.
If you are asked to identify whether a number is rational or irrational, first write the number in decimal form. If the number terminates then it is rational. If it goes on forever, then look for a repeated pattern of digits. If there is no repeated pattern, then the number is irrational.
When you write irrational numbers in decimal form, you may continue writing them for many, many decimal places. However, this is not convenient and it is often necessary to round off.
Example 1: Rational and irrational numbers
Question
Which of the following are not rational numbers?

$\pi =\mathrm{3,14159265358979323846264338327950288419716939937510}...$

1,4

$\mathrm{1,618033989}...$

100

$\mathrm{1,7373737373}...$

$0,\overline{02}$
Answer

Irrational, decimal does not terminate and has no repeated pattern.

Rational, decimal terminates.

Irrational, decimal does not terminate and has no repeated pattern.

Rational, all integers are rational.

Rational, decimal has repeated pattern.

Rational, decimal has repeated pattern.
Converting terminating decimals into rational numbers
A decimal number has an integer part and a fractional part. For example, 10,589 has an integer part of 10 and a fractional part of 0,589 because $10+\mathrm{0,589}=\mathrm{10,589}$. The fractional part can be written as a rational number, i.e. with a numerator and denominator that are integers.
Each digit after the decimal point is a fraction with a denominator in increasing powers of 10.
For example,

0,1 is $\frac{1}{10}$

0,01 is $\frac{1}{100}$

0,001 is $\frac{1}{1\phantom{\rule{3.33333pt}{0ex}}000}$
This means that
Converting recurring decimals into rational numbers
When the decimal is a recurring decimal, a bit more work is needed to write the fractional part of the decimal number as a fraction.
Example 2: Converting decimal numbers to fractions
Question
Write $0,\dot{3}$ in the form $\frac{a}{b}$ (where a and b are integers).
Answer
Define an equation
Multiply by 10 on both sides
Subtract the first equation from the second equation
Simplify
Example 3: Converting decimal numbers to fractions
Question
Write $5,\dot{4}\dot{3}\dot{2}$ as a rational fraction.
Answer
Define an equation
Multiply by 1000 on both sides
Subtract the first equation from the second equation
Simplify
In the first example, the decimal was multiplied by 10 and in the second example, the decimal was multiplied by 1000. This is because there was only one digit recurring (i.e. 3) in the first example, while there were three digits recurring (i.e. 432) in the second example.
In general, if you have one digit recurring, then multiply by 10. If you have two digits recurring, then multiply by 100. If you have three digits recurring, then multiply by 1000 and so on.
Not all decimal numbers can be written as rational numbers. Why? Irrational decimal numbers like $\sqrt{2}=\mathrm{1,4142135}...$ cannot be written with an integer numerator and denominator, because they do not have a pattern of recurring digits and they do not terminate. However, when possible, you should try to use rational numbers or fractions instead of decimals.
Exercise 1
State whether the following numbers are rational or irrational. If the number is rational, state whether it is a natural number, whole number or an integer:

${\displaystyle \frac{1}{3}}$

$\mathrm{0,651268962154862}...$

$\frac{\sqrt{9}}{3}$

${\pi}^{2}$
If a is an integer, b is an integer and c is irrational, which of the following are rational numbers?

$\frac{5}{6}$

$\frac{a}{3}$

$\frac{2}{b}$

$\frac{1}{c}$
For which of the following values of a is $\frac{a}{14}$ rational or irrational?

1

−10

$\sqrt{2}$

2,1
Write the following as fractions:

0,1

0,12

0,58

0,2589
Write the following using the recurring decimal notation:

$\mathrm{0,11111111}...$

$\mathrm{0,1212121212}...$

$\mathrm{0,123123123123}...$

$\mathrm{0,11414541454145}...$
Write the following in decimal form, using the recurring decimal notation:

$\frac{2}{3}$

$1{\displaystyle \frac{3}{11}}$

$4{\displaystyle \frac{5}{6}}$

$2{\displaystyle \frac{1}{9}}$
Write the following decimals in fractional form:

$0,\dot{5}$

$\mathrm{0,6}\dot{3}$

$5,\overline{31}$
(a) Rational, integer
(b) Irrational
(c) rational, natural
(d) Irrational
(a) rational
(b) rational
(c) rational
(d) irrational
(a) rational
(b) rational
(c) irrational
(d) rational
(a) $0,1=\frac{1}{10}$
(b)$0,12=\frac{12}{100}=\frac{3}{25}$
(c)$0,58=\frac{58}{100}=\frac{29}{50}$
(d)$0,2589=\frac{2589}{10000}$
(a) $0,11111111...=0,\stackrel{.}{1}$
(b) $0,1212121212...=0,\overline{12}$
(c) $0,123123123123...=0,\overline{123}$
(d) $0,11414541454145...=0,11\overline{4145}$
(a) $\frac{2}{3}=2\left(\frac{1}{3}\right)=2(0,3333333...)=0,666666...=0,\stackrel{.}{6}$
(b)$1\frac{3}{11}=1+3\left(\frac{1}{11}\right)=1+3(0,090909...)=1+0,27272727...=1,\overline{27}$
(c)$4\frac{5}{6}=4+5\left(\frac{1}{6}\right)=4+5(0,166666...)=4+0,833333...=4,8\stackrel{.}{3}$
(d)$2\frac{1}{9}=2+0,1111111...=2,\stackrel{.}{1}$
a)
$$$x$  $$$=$  $$$0,5555\stackrel{.}{5}$  ...1 
$$$10x$  $$$=$  $$$5,555\stackrel{.}{5}$  ...2 
Subtracting 2 from 1:
$$$9x$  $$$=$  $$$5$ 
$x$  $$$=$  $$$\frac{5}{9}$ 
(b)
$$$10x$  $$$=$  $$$6,333\stackrel{.}{3}$  $$$...1$ 
$$$100x$  $$$=$  $$$63,333\stackrel{.}{3}$  $$$...2$ 
subtracting 1 from 2 gives:
$$$90x$  $$$=$  $$$57$ 
$$$x$  $$$=$  $$$\frac{57}{90}$ 
(c)
$$$x$  $$$=$  $$$5,3131\overline{31}$  $$$...1$ 
$$$100x$  $$$=$  $$$531,3131\overline{31}$  $$$...2$ 
subtracting 1 from 2 gives:
$$$99x$  $$$=$  $$$526$ 
$$$x$  $$$=$  $$$\frac{526}{99}$ 