real analysis25 min

Real Number Axioms

The axiomatic foundation of the real numbers — completeness, the Archimedean property, and why the rationals are not enough

0/9Not Started

Why This Matters

The real numbers are the foundation of all of calculus and analysis. But what exactly are they? You have used them since childhood, yet the rationals have gaps — there is no rational number whose square is 2. The reals fill those gaps, and the completeness axiom is the precise statement of how they do it.

Without completeness, you cannot prove the intermediate value theorem, the extreme value theorem, or that limits behave as expected. The Archimedean property guarantees that no real number is infinitely large or infinitely small compared to another. Together, these axioms give the real numbers their power: a complete ordered field where every bounded set has a least upper bound. Understanding these axioms is the first step toward rigorous analysis.

Define Terms

Visual Model

Rationals QOrdered field with gaps
Gaps in Qsqrt(2) is missing
Completeness AxiomEvery bounded set has a sup
Real Numbers RComplete ordered field
Archimedean PropertyNo infinitely large elements
Density of Q in RRationals are everywhere dense

The full process at a glance. Click Start tour to walk through each step.

The real numbers arise from filling the gaps in the rationals via the completeness axiom.

Code Example

Code
// Demonstrating gaps in the rationals
// sqrt(2) is irrational — no fraction p/q equals it exactly
const target = Math.sqrt(2);
console.log("sqrt(2) =", target);

// Rational approximations get close but never exact
const approx = [
  [1, 1], [3, 2], [7, 5], [17, 12], [41, 29], [99, 70], [239, 169]
];
for (const [p, q] of approx) {
  const ratio = p / q;
  const error = Math.abs(ratio - target);
  console.log(`${p}/${q} = ${ratio.toFixed(10)}, error = ${error.toExponential(3)}`);
}

// Archimedean property: for any epsilon > 0, find n with 1/n < epsilon
function archimedean(epsilon) {
  let n = 1;
  while (1 / n >= epsilon) {
    n++;
  }
  return n;
}
console.log("n for 1/n < 0.01:", archimedean(0.01));   // 101
console.log("n for 1/n < 0.001:", archimedean(0.001)); // 1001

// Density of rationals: find a rational between two reals
function findRationalBetween(a, b) {
  // Find n such that 1/n < b - a
  const n = Math.ceil(1 / (b - a)) + 1;
  // Find m such that a < m/n < b
  const m = Math.ceil(a * n);
  if (m / n > a && m / n < b) {
    return [m, n];
  }
  return [m + 1, n];
}
const [m, n] = findRationalBetween(Math.sqrt(2), Math.sqrt(2) + 0.001);
console.log(`Rational between sqrt(2) and sqrt(2)+0.001: ${m}/${n} = ${(m/n).toFixed(6)}`);
console.log(`sqrt(2) = ${Math.sqrt(2).toFixed(6)}`);

Interactive Experiment

Try these exercises:

  • Compute successive rational approximations to sqrt(2) using the recurrence p/q -> (p + 2q)/(p + q). How quickly does the error shrink?
  • For epsilon = 0.0001, find the smallest n with 1/n below epsilon. Then find a rational m/n between 3.14159 and pi.
  • Take the set S of all x where x^2 is below 3. Compute upper bounds for S and try to find the least upper bound. Why must it be sqrt(3)?
  • Verify the Archimedean property: pick a very large number like 10^15 and confirm that some natural number exceeds it (trivially, but the point is that this is an axiom, not obvious in all ordered fields).
  • Show that between any two rationals there is an irrational. Hint: multiply by sqrt(2) and adjust.

Quick Quiz

Coding Challenge

Density of Rationals

Write a function called `rationalBetween` that takes two numbers `a` and `b` (where a is less than b) and returns an array [numerator, denominator] representing a rational number strictly between a and b. Use the Archimedean property: find the smallest positive integer n such that 1/n is less than b - a, then find an integer m such that m/n falls strictly between a and b.

Loading editor...

Real-World Usage

The axioms of the real numbers underpin all of modern analysis and its applications:

  • Numerical analysis: Convergence guarantees for iterative methods (Newton-Raphson, gradient descent) rely on completeness — the limit must exist in R.
  • Signal processing: The Fourier transform works on L^2(R), whose completeness (as a Hilbert space) is built upon the completeness of R.
  • Optimization: Proving that a continuous function on a closed bounded interval attains its maximum requires completeness (extreme value theorem).
  • Computer arithmetic: Floating-point numbers are a finite subset of the rationals — they have gaps. Understanding where R is complete and floats are not prevents subtle numerical bugs.
  • Probability theory: Measure theory, which formalizes probability, depends on the completeness of R for defining integrals and expectations.

Connections