What is a rational number
by Avi Pal on January 28, 2024
A rational number is a number that can be expressed as the quotient or fraction of two integers, where the numerator is an integer and the denominator is a non-zero integer. The set of rational numbers includes all fractions as well as all integers (since any integer z can be expressed as z/1=z).
Formally, a rational number can be written as a/b, where:
- a and b are integers,
- b≠0
The set of all rational numbers is often denoted by the symbol QQ, which stands for "quotient." Rational numbers can be positive, negative, or zero, and they can be proper fractions, improper fractions, or whole numbers.
Examples of rational numbers include:
- 1/2 (a proper fraction)
- 5/1=5 (an integer)
- −8/3 (a negative fraction)
- 0 (which can be represented as 0/1, 0/2, etc.)
Rational numbers contrast with irrational numbers, which cannot be expressed as the quotient of two integers. Examples of irrational numbers include SQRT(2), π, and e, none of which can be exactly represented as a fraction of two integers