Rational Number

Arithmetic

A rational number is any number that can be expressed as a fraction p/q where p and q are integers and q is not zero.

Formula

\frac{p}{q}, \text{ where } p, q \text{ are integers and } q \neq 0

Definition

A rational number is any number you can write as a fraction, one whole number divided by another (not zero), formally any real number expressible as $p/q$ where $p$ and $q$ are integers and $q \neq 0$. This includes regular fractions, all integers ($n = n/1$), and all decimals that terminate or repeat: a decimal is rational if and only if it terminates or eventually repeats. Algebraically, the rationals $\mathbb{Q}$ form the unique field of fractions of the integers $\mathbb{Z}$, a dense, totally ordered field that is not complete, since Cauchy sequences of rationals need not converge in $\mathbb{Q}$.

Example

$3/4$, $-2$, $0.5$, and $0.333\ldots$ are all rational: $3/4$ is already a fraction, $-2 = -2/1$, $0.5 = 1/2$, and $0.333\ldots = 1/3$. By contrast $\pi = 3.14159\ldots$ never terminates or repeats, so $\pi$ is irrational. The sequence $1, 1.4, 1.41, 1.414, 1.4142, \ldots$ is a Cauchy sequence in $\mathbb{Q}$ whose limit is $\sqrt{2}$, which does not exist in $\mathbb{Q}$, demonstrating $\mathbb{Q}$'s incompleteness.

Key Insight

The word "rational" comes from "ratio": if you can write a number as a ratio of two whole numbers, it is rational. Between any two rational numbers there is another rational number (the average of the two), a property called density, and yet $\mathbb{Q}$ is countable (there is a bijection between $\mathbb{Q}$ and $\mathbb{N}$) even though it is dense in $\mathbb{R}$. Despite this density, most real numbers are irrational; the rationals, though countable, leave no "gaps" that can be detected from within $\mathbb{Q}$ alone.