A number that can be written in the form a/b, where a and b are integers, with b ≠ 0. The set of all rational numbers is usually denoted by ℚ. A real number is rational if and only if, when expressed as a decimal, it has a finite or recurring expansion (see decimal representation). For example,
A famous proof, attributed to Pythagoras, shows that is not rational, and e and π are also known to be irrational.
The same rational number can be expressed as a/b in different ways; for example, In fact, a/b = c/d if and only if ad = bc. But a rational number can be expressed uniquely as a/b if it is insisted that a and b are coprime and that b>0. The field ℚ is the field of fractions of the ring of integers ℤ.