freeCodeCamp/guide/english/mathematics/rational-numbers/index.md

789 B

title
Rational Numbers

Rational Numbers

A rational number is any number that can be written as a fraction of two integers. 10/5 is a fraction, and is equal to 2. 8/3 is a fraction, and is equal to 2.66666 (where 6 repeats infinetly many times). Since any integer can be used to express a fraction, all integers are also rational. As we saw, 2 could be written as 10/5, but it can also be written as 2/1. As any integer n can be written as n/1, all integers are rational. Because a rational number has to be written as a fraction of 2 integers, pi and e are not rational, as they cannot be expressed as fractions with whole numbers.

More Information: