### Theory:

A rational number is a number that can be expressed as ($$p / q$$ ) of two integers, a numerator $$p$$ and a non-zero denominator $$q$$. Since $$q$$ may be equal to $$1$$, every integer is a rational number.
Example:
$\begin{array}{l}15/13\phantom{\rule{0.147em}{0ex}},\mathit{where}\phantom{\rule{0.147em}{0ex}}p=15\phantom{\rule{0.147em}{0ex}}\mathit{and}\phantom{\rule{0.147em}{0ex}}q=13;\phantom{\rule{0.147em}{0ex}}q\ne 0.\\ 12/20,\mathit{where}\phantom{\rule{0.147em}{0ex}}p=12\phantom{\rule{0.147em}{0ex}}\mathit{and}\phantom{\rule{0.147em}{0ex}}q=20;\phantom{\rule{0.147em}{0ex}}q\ne 0.\\ 2/1,\mathit{where}\phantom{\rule{0.147em}{0ex}}p=2\phantom{\rule{0.147em}{0ex}}\mathit{and}\phantom{\rule{0.147em}{0ex}}q=1;\phantom{\rule{0.147em}{0ex}}q\ne 0.\end{array}$
Difference between a fraction and a rational number:
A number in the rational form $\frac{p}{q}$ where $$p$$ and $$q$$ are whole numbers and $$q ≠ 0$$ is known as a fraction, whereas a number in the form $\frac{p}{q}$ where $$p$$ and $$q$$ are integers and $$q ≠ 0$$ is known as a rational number.
Example:
1. $\frac{3}{2}$ is a fraction as well as the whole number.

2. $\frac{-3}{2}$ is a rational number but not a fraction because $$-3$$ is not a whole number.
There are different types of fractions:

i) Proper fractions

ii) Improper fractions

iii) Mixed fraction

iv) Unit fraction