Topic · Number Systems

Classification of Numbers

Mathematics doesn't have one number system — it has a tower of them, each built on the one below to do something the previous level couldn't. Naturals, integers, rationals, reals, complexes: $\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R} \subset \mathbb{C}$. Each step gains a capability and pays a price.

What you'll leave with

  • The five-step tower $\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R} \subset \mathbb{C}$ and what each extension was forced to solve.
  • What each level gains (zero, negatives, division, limits, square roots of negatives) and what it loses (closure, order, countability).
  • The split inside $\mathbb{R}$ between algebraic and transcendental numbers — and why $\pi$ and $e$ sit on the transcendental side.
  • An intuition for why $\mathbb{Q}$ is countable but $\mathbb{R}$ is not, gesturing at Cantor's diagonal argument.

1. The tower at a glance

Every number system you'll ever use day-to-day lives somewhere on this chain:

$$ \mathbb{N} \;\subset\; \mathbb{Z} \;\subset\; \mathbb{Q} \;\subset\; \mathbb{R} \;\subset\; \mathbb{C} $$

Each inclusion is strict — the next level is genuinely bigger. And each step was historically driven by the same kind of pressure: a perfectly reasonable equation that has no answer in the level below.

naturals + negatives + ratios + limits + √−1 3 −2 5/7 π √2 i 3+4i

Read the diagram from the inside out: every natural number is also an integer, every integer is also a rational, and so on. The dots are sample inhabitants — and notice that $i$ and $3 + 4i$ live in $\mathbb{C}$ but not in any of the inner rings. The picture is a Venn diagram of containment, not of overlap.

2. $\mathbb{N}$ — the naturals

Natural numbers $\mathbb{N}$

The counting numbers: $1, 2, 3, \ldots$ (or $0, 1, 2, \ldots$ — see the pitfall below). Closed under addition and multiplication: add or multiply two naturals and you get another natural.

What's new here: counting itself. The notion that "three apples" and "three days" share a common abstraction — the number $3$ — is the historical and conceptual seed of mathematics.

What's missing: subtraction doesn't always work. There's no natural $x$ with $x + 5 = 3$. Division almost never works: $3x = 2$ has no natural solution. The naturals can grow but they can't shrink.

Does $\mathbb{N}$ include 0?

Conventions split. Set theorists and most French textbooks include $0$ (so $\mathbb{N} = \{0, 1, 2, \ldots\}$); many number theorists start at $1$. Either is fine — just state which you mean when it matters. This page treats $\mathbb{N}$ as $\{1, 2, 3, \ldots\}$ where the distinction comes up.

3. $\mathbb{Z}$ — the integers

Integers $\mathbb{Z}$

The naturals together with their negatives and zero: $\{\ldots, -2, -1, 0, 1, 2, \ldots\}$. Closed under $+$, $-$, and $\times$. A commutative ring.

What's new: zero and negatives. Equations like $x + 5 = 3$ now have an answer ($x = -2$). Subtraction is always defined. The number line, finally, stretches both ways.

What's still missing: general division. $3x = 2$ still has no integer solution. You can subtract freely but you can't always divide.

Historically, negative numbers were resisted for centuries in Europe — they didn't represent anything you could count. Brahmagupta gave them coherent rules in 7th-century India; Western mathematicians fully accepted them only after Fibonacci popularised them in 1202, and arguably not even then.

4. $\mathbb{Q}$ — the rationals

Rational numbers $\mathbb{Q}$

Numbers expressible as $p/q$ where $p, q \in \mathbb{Z}$ and $q \neq 0$. Closed under every field operation: $+, -, \times, \div$ (except by zero). $\mathbb{Q}$ is a field.

What's new: division. The equation $3x = 2$ finally has an answer: $x = 2/3$. The rationals are the smallest world in which all four standard arithmetic operations work.

Two more striking properties: $\mathbb{Q}$ is dense in the number line — between any two rationals there is another rational (in fact, infinitely many). And $\mathbb{Q}$ is countable: despite there being "infinitely many rationals between any two integers", you can still list them all in a single sequence (Cantor's zigzag).

What's still missing: limits don't always land inside $\mathbb{Q}$. The Pythagoreans discovered, around 500 BCE, that $\sqrt{2}$ — the length of the diagonal of a unit square — cannot be written as $p/q$. The proof is short and devastating:

The classic proof that $\sqrt{2}$ is irrational

Suppose $\sqrt{2} = p/q$ in lowest terms (no common factor). Then $p^2 = 2q^2$, so $p^2$ is even, so $p$ is even. Write $p = 2k$. Substituting: $4k^2 = 2q^2$, i.e. $q^2 = 2k^2$, so $q$ is also even. But that contradicts "lowest terms" — both $p$ and $q$ share the factor $2$. So no such fraction can exist. $\sqrt{2}$ is irrational.

A rational sequence can converge to an irrational number — and when it does, the limit isn't in $\mathbb{Q}$. Calculus, which is built on limits, simply cannot run on the rationals. The next step is forced.

5. $\mathbb{R}$ — the reals

Real numbers $\mathbb{R}$

The completion of $\mathbb{Q}$: every Cauchy sequence of rationals is assigned a real limit. Equivalently, every non-empty set of reals bounded above has a least upper bound. The reals are the unique complete ordered field.

What's new: limits. Numbers like $\sqrt{2}$, $\pi$, $e$, and uncountably many others that have no name finally exist as actual mathematical objects, not just "things sequences approach". The real line is continuous — no gaps, no holes — and that is the structural property calculus needs.

Two standard constructions, both due to 1872:

  • Dedekind cuts. A real number is a way of slicing $\mathbb{Q}$ into a "below" set $L$ and "above" set $U$. $\sqrt{2}$ is the cut where $L = \{q \in \mathbb{Q} : q^2 < 2 \text{ or } q < 0\}$ — the cut itself, with no rational hiding at the boundary, is the number.
  • Cauchy sequences. A real is an equivalence class of Cauchy sequences in $\mathbb{Q}$, with two sequences identified if their difference tends to $0$. $\pi$ is the class containing $3, 3.1, 3.14, 3.141, \ldots$

What's lost: countability. The reals are uncountably many — there are strictly more of them than there are naturals. We'll see why in §8.

What's still missing: $\mathbb{R}$ doesn't solve every polynomial equation. $x^2 = -1$ has no real answer; the square of any real is non-negative.

Density without completeness

Both $\mathbb{Q}$ and $\mathbb{R} \setminus \mathbb{Q}$ (the irrationals) are dense in $\mathbb{R}$: any open interval contains infinitely many of each. Density is cheap; completeness is what's hard. $\mathbb{Q}$ has all the density it could want and still can't do calculus.

6. $\mathbb{C}$ — the complex numbers

Complex numbers $\mathbb{C}$

Numbers of the form $a + bi$ where $a, b \in \mathbb{R}$ and $i$ is a new symbol satisfying $i^2 = -1$. Closed under all field operations and under taking roots of polynomials.

What's new: $i = \sqrt{-1}$, and with it, a root for every non-constant polynomial. This is the fundamental theorem of algebra (proved by Gauss in 1799): over $\mathbb{C}$, every polynomial of degree $n$ has exactly $n$ roots (counted with multiplicity). No further extension is needed for polynomial equations.

The complex numbers were forced not by $x^2 = -1$ directly — mathematicians were happy to say "no solution" — but by Cardano's 1545 cubic formula, which sometimes produced square roots of negatives as intermediate steps even when the final answer was a real number. Bombelli (1572) realised you had to take these intermediates seriously. Two centuries later, Argand and Gauss made $\mathbb{C}$ geometric: the plane.

What's lost: order. You cannot say one complex number is "less than" another in a way that plays well with addition and multiplication.

$\mathbb{C}$ has no compatible total order

Any reasonable order $<$ on a field must satisfy: if $x > 0$ then $x^2 > 0$ (positives have positive squares). Try to order $\mathbb{C}$. Either $i > 0$ or $i < 0$. If $i > 0$ then $i^2 = -1 > 0$, contradicting $1 > 0$. If $i < 0$ then $-i > 0$ and $(-i)^2 = -1 > 0$, same contradiction. There is no consistent way to call one complex number "smaller" than another while preserving the algebra.

That's the deal at the top of the tower: you traded order for algebraic closure. Most of analysis and algebra is more than happy with the trade.

7. Algebraic vs transcendental

Inside $\mathbb{R}$ (and $\mathbb{C}$), there's a finer split that has nothing to do with rationals versus irrationals.

Algebraic number

A number that is a root of some non-zero polynomial with integer coefficients. Every rational is algebraic ($p/q$ is a root of $qx - p$); $\sqrt{2}$ is algebraic (root of $x^2 - 2$); $i$ is algebraic (root of $x^2 + 1$); $\sqrt[3]{2}$ is algebraic (root of $x^3 - 2$).

Transcendental number

A number that is not algebraic — no integer-coefficient polynomial has it as a root. $\pi$ and $e$ are the canonical examples.

Transcendence is a strong claim. To prove $\pi$ transcendental you have to rule out every polynomial of every degree with every possible integer coefficients. Lindemann pulled this off in 1882, building on Hermite's 1873 proof that $e$ is transcendental. The argument is not elementary.

Some numbers' status is still unknown. Is $e + \pi$ transcendental? Almost certainly yes, but no proof exists. Euler's constant $\gamma \approx 0.5772$ isn't even known to be irrational.

Examples on each side

Algebraic
  • $5/7$ — root of $7x - 5$
  • $\sqrt{2}$ — root of $x^2 - 2$
  • $\sqrt[3]{2}$ — root of $x^3 - 2$
  • $\sqrt{2} + \sqrt{3}$ — root of $x^4 - 10x^2 + 1$
  • $i$ — root of $x^2 + 1$
  • The golden ratio $\varphi$ — root of $x^2 - x - 1$
Transcendental
  • $\pi$ — Lindemann, 1882
  • $e$ — Hermite, 1873
  • $2^{\sqrt{2}}$ — Gelfond–Schneider, 1934
  • $e^{\pi}$ — Gelfond's constant
  • $\ln 2$ — by Lindemann–Weierstrass
  • Liouville's number $\sum 10^{-n!}$ — first proven transcendental, 1844
Irrational ≠ transcendental

Every transcendental is irrational, but the reverse fails badly. $\sqrt{2}$ is irrational and very much algebraic. "Irrational" just means "not a fraction"; "transcendental" means "not the root of any integer polynomial" — a much stronger condition.

Here is the punchline that ties this section to the next: algebraic numbers are countable. There are only countably many integer-coefficient polynomials, and each has finitely many roots. But the reals are uncountable. So almost every real number — in a precise sense — is transcendental. $\pi$ and $e$ are not exceptional; algebraic numbers are exceptional.

8. Countable vs uncountable

"Infinity" hides at least two different sizes. The naturals, integers, rationals, and algebraic numbers all have the same infinite size — they can be put in one-to-one correspondence with $\mathbb{N}$. The reals (and the complexes) are strictly larger.

Countable set

A set is countable if its elements can be listed in a sequence indexed by $\mathbb{N}$: a first element, a second, a third, and so on, with every element appearing eventually.

The rationals look like they shouldn't be countable — between any two of them there are infinitely many more. But Cantor's zigzag enumeration writes every positive rational $p/q$ at the grid point $(p, q)$ and snakes through the grid diagonally:

$$ \tfrac{1}{1},\; \tfrac{1}{2},\; \tfrac{2}{1},\; \tfrac{1}{3},\; \tfrac{2}{2},\; \tfrac{3}{1},\; \tfrac{1}{4},\; \tfrac{2}{3},\; \tfrac{3}{2},\; \tfrac{4}{1},\; \ldots $$

Skip duplicates ($2/2$ is the same as $1/1$), throw in zero and the negatives, and every rational appears somewhere on the list. So $|\mathbb{Q}| = |\mathbb{N}|$. Counting density is a poor guide to set size.

Why the reals are different

Suppose, for contradiction, that you could list every real number between 0 and 1:

$$ \begin{aligned} r_1 &= 0.d_{11} d_{12} d_{13} d_{14} \ldots \\ r_2 &= 0.d_{21} d_{22} d_{23} d_{24} \ldots \\ r_3 &= 0.d_{31} d_{32} d_{33} d_{34} \ldots \\ &\;\;\vdots \end{aligned} $$

Build a new number $r^* = 0.e_1 e_2 e_3 \ldots$ where each digit $e_n$ is chosen to differ from $d_{nn}$ (the $n$th digit of the $n$th number). Then $r^*$ disagrees with every $r_n$ in at least one digit, so it isn't on the list. But $r^*$ is a real number between 0 and 1. The supposed list missed something — and there's no way to patch it. Therefore no such list exists. The reals are uncountable.

This is Cantor's diagonal argument, published in 1891. It is short, decisive, and one of the most consequential proofs ever written.

What this buys you

Algebraic numbers are countable; reals are uncountable; so "most" reals — uncountably many of them — are transcendental. Cantor's argument proves the existence of transcendentals without exhibiting any specific one. (The first concrete transcendental, due to Liouville in 1844, predates Cantor's proof by half a century, but Cantor's argument is what made transcendence look generic rather than exotic.)

The size scoreboard

SetCardinalityOrderHeadline property
$\mathbb{N}$$\aleph_0$ (countable)Well-orderedDiscrete; you can count from a starting point
$\mathbb{Z}$$\aleph_0$Total, not well-orderedCommutative ring
$\mathbb{Q}$$\aleph_0$Total, denseDense field, not complete
$\mathbb{R}$$2^{\aleph_0}$ (uncountable)Total, completeUnique complete ordered field
$\mathbb{C}$$2^{\aleph_0}$No compatible orderAlgebraically closed

9. Common pitfalls

Confusing irrational with transcendental

$\sqrt{2}$ is irrational. So is $\sqrt[3]{7}$. Both are algebraic. "Transcendental" is a much stronger condition: no integer polynomial has the number as a root. All transcendentals are irrational; not all irrationals are transcendental.

Forgetting that $\mathbb{Q}$ is not complete

$\mathbb{Q}$ is a field — every nonzero element has a multiplicative inverse. But it's full of holes from the perspective of limits. The sequence $1, 1.4, 1.41, 1.414, \ldots$ is Cauchy and made entirely of rationals, but its limit is $\sqrt{2}$, which isn't rational. Calculus needs $\mathbb{R}$, not $\mathbb{Q}$.

Assuming $\mathbb{C}$ has a natural order

"Is $i$ bigger or smaller than $1$?" is not a well-posed question. No order on $\mathbb{C}$ is compatible with its field structure. When you need to compare complex numbers, you compare magnitudes $|z| = \sqrt{a^2 + b^2}$, which are real and therefore orderable — but $|z_1| < |z_2|$ is a statement about real magnitudes, not about the complexes themselves.

Believing every real has a "computable" decimal expansion

You can write down $\pi$ to a billion digits with an algorithm. But there are uncountably many reals, and only countably many algorithms — so uncountably many reals have no algorithm that produces their digits. Most reals can't be written down in any finite sense. They exist, but only mathematically.

Treating $\mathbb{R}^2$ and $\mathbb{C}$ as the same thing

Both are 2-dimensional real vector spaces — same set of points, same addition. But $\mathbb{C}$ has a multiplication with the property that $i^2 = -1$, and $\mathbb{R}^2$ as a vector space does not. The extra structure is what makes complex analysis a different subject from real two-variable analysis.

10. Classifying specific numbers

The procedure to classify a number, in order:

  1. Is it real (imaginary part zero)? If not, it's a non-real complex number — stop here.
  2. Can you write it as $p/q$ with $p, q \in \mathbb{Z}$? If yes, rational.
  3. If not, is it a root of some integer polynomial? If yes, irrational algebraic. If no, transcendental.

Try a few yourself before opening the answers.

Example 1 · Classify $-7$

Integer (it's $-7$). Therefore rational ($-7/1$), real, algebraic (root of $x + 7$), complex (with zero imaginary part). Not natural — naturals are positive.

Example 2 · Classify $\tfrac{22}{7}$

Rational by inspection. Therefore real, algebraic (root of $7x - 22$), complex. Not an integer. Famously not equal to $\pi$ — a common approximation, but $\pi$ is irrational and transcendental.

Example 3 · Classify $\sqrt{5}$

Real. Not rational (same irrationality proof structure as $\sqrt{2}$, with $5$ in place of $2$). Algebraic — root of $x^2 - 5$. Therefore irrational algebraic real.

Example 4 · Classify $\pi^2$

Real. If $\pi^2$ were algebraic, then by the Lindemann–Weierstrass theorem $\pi$ would also be algebraic — but it isn't. So $\pi^2$ is transcendental. In particular, irrational.

Example 5 · Classify $1 + 2i$

Imaginary part is $2 \neq 0$, so it's a non-real complex number. It is algebraic — root of $x^2 - 2x + 5$ (compute $(1+2i)^2 - 2(1+2i) + 5 = 1 + 4i - 4 - 2 - 4i + 5 = 0$). So: complex, algebraic, non-real.

Example 6 · Classify $\sqrt{2} + \sqrt{3}$

Real. To prove it's algebraic, exhibit a polynomial. Let $x = \sqrt{2} + \sqrt{3}$. Then $x^2 = 5 + 2\sqrt{6}$, so $(x^2 - 5)^2 = 24$, giving

$$ x^4 - 10x^2 + 1 = 0. $$

Integer coefficients — so $\sqrt{2} + \sqrt{3}$ is algebraic (and, since not rational, irrational algebraic).

Sources & further reading

The content above is synthesized from established mathematical references. If anything reads ambiguously here, these are the ground truth.

Test your understanding

A quiz that builds from easy to hard. Pick an answer to get instant feedback and a worked explanation. Your progress is saved in this browser — come back anytime to continue.

Question 1 of 22
0 correct