Concept Number Theory βœ“ Live

Rational Number

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.

Any number you can write as a fraction

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.

πŸ”’ The symbol: Mathematicians write the set of rational numbers as β„š β€” for "quotient," since a rational number is a quotient (division) of two integers.

Rational numbers as decimals

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.

Why "rational" doesn't mean "reasonable"

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."

Where rationals fall short

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.

Field structure and construction

Formal definition

β„š = {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.

β„š is a field

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.

Density

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.

Countability

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.

Terminating vs repeating decimals

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).

Historical development and generalisations

Ancient treatment of fractions

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.

Formal construction of β„š from β„€

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 β„€.

Why √2 is irrational β€” the classical proof

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).

p-adic numbers β€” a different completion

β„š 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.

πŸ“š Sources

Tier 1 Rudin, W. (1976). Principles of Mathematical Analysis. 3rd ed. McGraw-Hill. β€” Rigorous construction of β„š and its properties.
Tier 1 Hardy, G.H. and Wright, E.M. (2008). An Introduction to the Theory of Numbers. 6th ed. Oxford University Press.
Tier 2 Plofker, K. (2009). Mathematics in India. Princeton University Press. β€” Historical fraction arithmetic.

πŸ”— Related entries

ExtendsInteger
Contrasts withIrrational Number
Historical rules fromBrahmagupta
Entry v1.0 Β· Added 2026-05-27 Β· Number Theory Β· Concept JSON Markdown Status