A rational number is any number that can be written as a fraction p/q, where p and q are integers and q β 0. The set of rational numbers, denoted β, includes all integers, all terminating decimals, and all repeating decimals. Rational numbers form a field β the first number system in which every non-zero number has a multiplicative inverse.
A rational number is simply any number you can write as one whole number divided by another (as long as you don't divide by zero). Β½, ΒΎ, β7/3, and even 5 (which is 5/1) are all rational numbers.
Every rational number, written as a decimal, either terminates (like ΒΌ = 0.25) or repeats forever in a pattern (like β = 0.333... or 1/7 = 0.142857142857...). This is a defining feature: if a decimal doesn't terminate or repeat, the number is not rational.
The word "rational" here comes from "ratio" β a rational number is a ratio of two integers. It has nothing to do with being sensible or logical. Its opposite, "irrational," similarly just means "not expressible as a ratio" β not "illogical."
Not every number is rational. The diagonal of a unit square (β2) cannot be written as any fraction of integers β this was a shocking discovery to the ancient Greeks, who had believed all lengths could be expressed as ratios of whole numbers.
β = {p/q : p, q β β€, q β 0}, with the convention that p/q = r/s exactly when ps = qr (cross-multiplication), which correctly identifies fractions like 1/2 and 2/4 as the same rational number.
Unlike β€, every non-zero rational number p/q has a multiplicative inverse: q/p. This makes β the smallest field containing β€ β formally, β is called the field of fractions of β€. This construction (forming a field of fractions) generalises to any integral domain.
Between any two rational numbers, no matter how close, there is always another rational number (in fact, infinitely many). This property is called density. For example, between 1/3 and 1/2, you can find 5/12, and between 1/3 and 5/12 you can find another, forever.
Despite being dense, β is countable β it can be placed in one-to-one correspondence with the natural numbers β. Cantor's diagonal argument (via a zigzag enumeration of all fractions p/q) proves this. This is one of the most surprising early results in set theory: β is "the same size" as β, even though β looks vastly denser on the number line.
A rational number p/q (in lowest terms) has a terminating decimal expansion exactly when q's only prime factors are 2 and/or 5 (since these are the prime factors of 10). Otherwise, the decimal expansion is eventually periodic (repeating).
Egyptian mathematics (Rhind Papyrus, c. 1650 BCE) worked almost exclusively with unit fractions (1/n), expressing other fractions as sums of distinct unit fractions β a system that persisted for over a millennium despite its computational awkwardness. Babylonian mathematicians used sexagesimal (base-60) fractions, which is why 60 minutes and 60 seconds persist in time and angle measurement today. Indian mathematicians (Brahmagupta, 628 CE, and later BhΔskara II) developed general rules for fraction arithmetic essentially equivalent to modern rules.
Rigorously, β is constructed as the set of equivalence classes of pairs (p,q) β β€ Γ (β€\{0}), where (p,q) ~ (r,s) iff ps = qr. Addition and multiplication are defined by the usual fraction rules: (p,q) + (r,s) = (ps+qr, qs), and (p,q)Β·(r,s) = (pr,qs). This construction β forming a field of fractions from an integral domain β is a standard technique in abstract algebra, generalising far beyond β€.
Suppose β2 = p/q in lowest terms (gcd(p,q)=1). Then 2qΒ² = pΒ², so pΒ² is even, so p is even (p=2k). Then 2qΒ² = 4kΒ², so qΒ² = 2kΒ², so q is also even. But then p and q share a factor of 2, contradicting gcd(p,q)=1. This proof, using infinite descent, is attributed to the Pythagorean school (c. 500 BCE) and appears in Euclid's Elements (Book X, Proposition 9, though possibly a later interpolation).
β can be "completed" in different ways to fill its gaps. The usual completion gives β (using the ordinary absolute value). But for each prime p, there is a different completion using the p-adic absolute value, giving the field ββ of p-adic numbers. Ostrowski's theorem (1916) proves these are the only ways to complete β (up to equivalence) β the real numbers and the p-adic number fields for each prime, and nothing else.