↓Skip to main content
  1. Data Science Blog/

Kinds of Numbers: A Map from Natural to Complex

·2034 words·10 mins· loading · ·
Mathematics Research & Academia Mathematics Mathematics for Machine Learning Mathematics for AI Applied Mathematics Number Theory

Kinds of Numbers: A Map from Natural to Complex

Kinds of Numbers
#

Nested sets from counting to the complex plane, plus bases and computer formats
#

Natural → integer → rational → real → complex is the main ladder. Each step adds numbers the previous step could not hold.

Rows marked ladder nest: each set keeps the ones above it and adds more. Irrational and imaginary are not another ring — they name parts inside $\mathbb{R}$ or $\mathbb{C}$.

KindSymbol (usual)Lives inOne-line ideaExample
Natural$\mathbb{N}$ladderCounting sizes$1, 2, 3, \ldots$
Whole$\mathbb{W}$ladderNatural plus zero$0, 1, 2, \ldots$
Integer$\mathbb{Z}$ladderWhole numbers and negatives$-3, 0, 7$
Rational$\mathbb{Q}$ladderRatio of two integers$\tfrac{3}{4}$, $-2$, $0.125$
Real$\mathbb{R}$ladderRationals plus irrationals (e.g. $\sqrt{2}$, $\pi$)$-1.5$, $\tfrac{2}{3}$, $\pi$
Irrational—$\mathbb{R}$, not $\mathbb{Q}$No exact fraction form$\sqrt{2}$, $\pi$
Imaginary—inside $\mathbb{C}$Real multiple of $i$; nonzero ones are not on the real line ($0 = 0i$ is both)$3i$, $-i$
Complex$\mathbb{C}$ladderReal part plus imaginary part$2 + 3i$

Two phrases sound alike but mean different things:

  • Kinds of numbers — which set a value belongs to ($\mathbb{Q}$, $\mathbb{R}$, …).
  • Positional number system — how you write a value in a base (decimal, binary, hex).

This article maps the sets first, then points at bases and floating-point formats data work uses every day.

For symbols and operators used with these numbers, see Grammar of Mathematics: Operators, Functions, Relations, and Symbols.

1. The nesting picture
#

Think of Russian dolls: each larger set keeps everything inside the smaller one and adds more.

                    ℂ  complex numbers
                   ╱ ╲
                  ╱   ╲  (real + imaginary parts)
                 ╱     ╲
                ℝ  real numbers  ·········  number line
               ╱ ╲
              ╱   ╲   irrationals live here too (not in ℚ)
             ╱     ╲
            ℚ  rational numbers
           ╱ ╲
          ╱   ╲
         ℤ  integers
        ╱ ╲
       ╱   ╲
      ℕ  natural numbers (counting)

Inclusion chain (most common teaching order):

\[ \mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R} \subset \mathbb{C} \]

Some authors put $0$ inside $\mathbb{N}$; others use $\mathbb{N}={1,2,3,\ldots}$ and write $\mathbb{W}={0,1,2,\ldots}$ for whole numbers. The math is the same; only the label on the smallest set changes. ($\mathbb{W}$ is common in school texts; $\mathbb{N}$, $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$, and $\mathbb{C}$ are the usual blackboard letters in college courses.)

%%{init: {"flowchart": {"rankSpacing": 18, "wrappingWidth": 480}}}%%
flowchart TB
    N["Natural N — counting 1 2 3"]
    Z["Integer Z — zero and negatives"]
    Q["Rational Q — fractions a/b"]
    R["Real R — adds √2, π, …"]
    C["Complex C — adds imaginary axis"]
    N --> Z
    Z --> Q
    Q --> R
    R --> C

The arrows mean “extend to include more values,” not “every number is bigger than the last.” $-1$ is an integer but not a natural number.

This chart lists only the nested ladder sets in $\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R} \subset \mathbb{C}$. Irrational is not a separate ring: $\sqrt{2}$, $\pi$, and similar values are the new numbers you get when you step from $\mathbb{Q}$ to $\mathbb{R}$ (see the $\mathbb{R}$ box above). Imaginary numbers such as $3i$ are not a separate ring either — they live inside $\mathbb{C}$, off the real axis. Whole numbers ($0,1,2,\ldots$) are left out of the chart because some books include $0$ in $\mathbb{N}$ and others do not; the opening table shows both labels.

One plane, many kinds (same examples)
#

The complex plane is the usual 2D picture: horizontal Re is the real part, vertical Im is the imaginary part. Every complex number is one point $(a,b)$ for $a + bi$. Real numbers use the horizontal axis ($b = 0$). Pure imaginary numbers use the vertical axis ($a = 0$, except $0$ itself).

Sample kinds of numbers on the complex plane

The figure marks one example per kind. $\tfrac{3}{2}$ appears in the table but not on the drawing — at this scale it would sit almost on $\sqrt{2}$.

PointCoordinatesKind (from this article)
$-3$$(-3, 0)$Integer ($\mathbb{Z}$), not natural in the usual count-from-$1$ convention
$-\tfrac{1}{2}$$(-\tfrac{1}{2}, 0)$Rational ($\mathbb{Q}$)
$0$$(0, 0)$Whole / integer
$1$$(1, 0)$Natural ($\mathbb{N}$)
$\tfrac{3}{2}$$(\tfrac{3}{2}, 0)$Rational ($\mathbb{Q}$)
$\sqrt{2}$$(\sqrt{2}, 0)$Irrational real (Irr)
$\pi$$(\pi, 0)$Irrational real (Irr)
$i$$(0, 1)$Imaginary (on the axis, not on Re except $0$)
$2 + 3i$$(2, 3)$Complex ($\mathbb{C}$) — off both axes

The ladder sets $\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R}$ all live on the real axis in this picture. Moving to $\mathbb{C}$ adds the vertical direction. Irr marks reals that are not rationals; Im marks points on the imaginary axis.


2. Core sets — short definitions
#

Natural numbers ($\mathbb{N}$)
#

Used to count discrete objects: $1, 2, 3, \ldots$.
Order matters; between two consecutive naturals there is no other natural.

Whole numbers ($\mathbb{W}$)
#

Natural numbers together with zero $0$.
Zero means “none” in counting contexts.

Integers ($\mathbb{Z}$)
#

Whole numbers, their negatives, and zero: $\ldots, -2, -1, 0, 1, 2, \ldots$.
Subtraction always stays inside $\mathbb{Z}$ (unlike naturals alone).

Rational numbers ($\mathbb{Q}$)
#

Any number equal to $\tfrac{p}{q}$ with integers $p$, $q$, and $q \neq 0$.
Includes integers (take $q=1$) and terminating or repeating decimals.

Irrational numbers
#

Real numbers that are not rational — no exact fraction form.
Examples: $\sqrt{2}$, $\pi$, $e$; decimal expansion never settles into a repeat block.

Real numbers ($\mathbb{R}$)
#

All points on the continuous number line: rationals and irrationals together.
Every decimal expansion (finite or infinite) describes a real number.

Imaginary numbers
#

Numbers of the form $bi$ where $b$ is real and $i^2 = -1$.
They measure “vertical” size on the complex plane, not on the real line.

Complex numbers ($\mathbb{C}$)
#

Sums $a + bi$ with real $a$ and real $b$.
The plane with horizontal real axis and vertical imaginary axis models $\mathbb{C}$.


3. Important subsets
#

NameLives inOne-line ideaExample
Prime$\mathbb{N}$ (usually $>1$)Only divisors are $1$ and itself$2, 3, 5, 7, 11$
Composite$\mathbb{N}$Natural greater than $1$, not prime$4, 6, 15$
Even / odd$\mathbb{Z}$Divisible by $2$ or not$-4$ even; $7$ odd
Perfect square$\mathbb{Z}_{\ge 0}$$n = k^2$ for some integer $k$$0, 1, 4, 9, 16$
Algebraic$\mathbb{C}$Root of a polynomial with integer coeffs$\sqrt{2}$, $i$, $\tfrac{1}{2}$
Transcendental$\mathbb{R}$Real, not algebraic$\pi$, $e$ (many others exist)
Unit complex$\mathbb{C}$Distance from origin is $1$ ($\lvert z\rvert = 1$)$1$, $i$, $-1$

Algebraic vs transcendental: a number is algebraic if it is a root of some polynomial with integer coefficients (examples: $\tfrac{1}{2}$, $\sqrt{2}$, $i$). A real number is transcendental if it is not algebraic — it cannot be captured that way.

Polynomial roots can be any kind on this map. “Algebraic” describes how the number is defined, not whether it is whole, fractional, irrational, or imaginary:

Equation (integer coefficients)RootsKind from §2
$2x - 1 = 0$$\tfrac{1}{2}$Rational ($\mathbb{Q}$)
$x^2 - 2 = 0$$\pm\sqrt{2}$Irrational real (Irr)
$x^2 + 1 = 0$$\pm i$Imaginary
$x^2 - 2x + 5 = 0$$1 \pm 2i$Complex ($\mathbb{C}$), not on either axis

So a quadratic can yield two rationals, two irrationals, two imaginaries, or a conjugate pair $a \pm bi$. All of those roots are still algebraic. Transcendental is different: $\pi$ is real, but no polynomial with integer coefficients has $\pi$ as a root.

Two ideas often get mixed up:

  1. What we name in class. Fractions, integers, and roots such as $\sqrt{2}$ are algebraic. $\pi$ and $e$ are stressed because they show up everywhere (circles, growth, calculus) yet they are not algebraic. They are the standard named transcendentals.
  2. How many exist on the line. There are only countably many algebraic numbers (you could, in principle, list them). There are uncountably many real numbers, so most reals on the line are transcendental — you just never write them as closed formulas. $\pi$ and $e$ are special because we know them by name, not because transcendentals are rare.

4. Where familiar symbols sit
#

   −3    −1/2    0    1    3/2    √2    π    2+3i
    |      |     |    |     |      |     |     |
    Z      Q     Z    N     Q     Irr   Irr    C

How to read the bottom row: Z, N, Q, and C are the usual ladder labels (integer, natural, rational, complex). Irr means irrational real — on the real line inside $\mathbb{R}$, but not in $\mathbb{Q}$. We do not write R here, because R in this article means the whole set of real numbers ($\mathbb{R}$), and that would not distinguish rationals from irrationals. $\tfrac{3}{2}$ is rational (Q); $\sqrt{2}$ and $\pi$ are irrational (Irr).

  • Negative counts and debts → need $\mathbb{Z}$.
  • Shares and ratios → $\mathbb{Q}$.
  • Lengths of diagonals (often) → Irr (still inside $\mathbb{R}$).
  • Phase and oscillation in physics and signal processing → $\mathbb{C}$.

5. Positional number systems (writing, not kind)
#

Base (radix) tells how place value scales: decimal is base $10$, binary base $2$, hexadecimal base $16$.

BaseUses digitsSame value written
10$0$–$9$$13$
2$0$, $1$$1101_2 = 13$
16$0$–$9$, A–F$\mathrm{D}_{16} = 13$

The kind of number (rational, integer, …) does not change when you rewrite it in another base — only the symbols on the page change.


6. How computers store numbers (data science angle)
#

FormatIdeaWatch out
Integer (int32, int64)Fixed-width whole numbersOverflow wraps or errors at the max
Floating-point (float32, float64)Sign, exponent, mantissa in binaryNot every decimal fraction is exact; compare with care
BooleanOne bit of truthNot a subset of $\mathbb{R}$; logic, not measurement

Machine floats are a finite set of rational-like values. They behave like reals in many formulas but fail exact equality tests such as 0.1 + 0.2 == 0.3 in common languages.


7. Number systems beyond $\mathbb{C}$
#

These are not on the main $\mathbb{N} \to \mathbb{C}$ ladder. They appear in 3D graphics, advanced math, or set theory.

SystemWhat it addsWhere you might see it
QuaternionsFour-part numbers ($1$, $i$, $j$, $k$) for rotations in 3D space; order of multiplication matters ($ij \neq ji$).Game engines, attitude control, some robotics
OctonionsEight-part extension of the quaternions; even stricter multiplication rules.Specialized physics and pure math
Cardinal numbersLabels for how many elements a set has, including infinite sizes (not “where on the number line”).Set theory, counting infinite collections
Ordinal numbersLabels for position in an ordered list ($1$st, $2$nd, …), extended to infinite orders.Set theory, proof ordinals

Writing cardinality: for a set $S$, cardinality is how many elements $S$ has. You will see any of these:

  • $\lvert S\rvert$ (most common)
  • #S in plain text (a hash before the set name; do not put # inside $...$ math)
  • $\operatorname{card}(S)$

Example: $S = {2, 4, 6}$ gives $\lvert S\rvert = 3$.

For an infinite set, $\lvert S\rvert$ still means “how many,” but the answer is a cardinal number, not an everyday integer. Example: $\lvert \mathbb{N}\rvert = \aleph_0$ (countably infinite — list $1, 2, 3, \ldots$). Bigger infinite sets use bigger cardinals ($\aleph_1$, and so on). Ordinals such as $\omega$ describe position in an order, not size — keep cardinals (size) and ordinals (position) separate.

First-year linear algebra and introductory quantum computing stay inside $\mathbb{R}$ and $\mathbb{C}$. The table above only shows that mathematicians built other number systems when the plane was not enough.


8. Quick self-check
#

  1. Is $-7$ natural? No — it is integer, not natural (in the usual $1,2,3,\ldots$ convention).
  2. Is $\tfrac{22}{7}$ rational? Yes — it is exactly $\tfrac{22}{7}$, a ratio of two integers. Its decimal expansion repeats ($3.\overline{142857}$). That is still rational. It is near $\pi$ in value, but $\pi$ itself is not rational; $\pi$’s decimals do not fall into a repeating block.
  3. Is $\pi$ rational? No — it is irrational (in fact transcendental).
  4. Is $3i$ real? No — imaginary; $0 + 3i$ is complex with zero real part.
  5. Does binary change whether a value is rational? No — base is notation.

Related reading#

Hashtags
#

#NumberSystems #NaturalNumbers #Integers #RationalNumbers #RealNumbers #ComplexNumbers #IrrationalNumbers #MathematicsForML #DataScienceFoundations #MathEducation

Related

Types of Equations: A Quick Map from Algebra to Calculus
·1136 words·6 mins· loading
Mathematics Research & Academia Mathematics Mathematics for Machine Learning Mathematics for AI Applied Mathematics Differential Equations
Types of Equations # What you are solving for, and how the unknown appears # An equation says two …
From Passwords to Passkeys: Authentication, App Security and the Coming Quantum Era
·4770 words·23 mins· loading
Cybersecurity Software Development Cybersecurity Authentication Passkeys Quantum Computing Cryptography
From Passwords to Passkeys: Authentication, App Security and the Coming Quantum Era # A password is …
What Is Error in Quantum Computing?
·3892 words·19 mins· loading
Interdisciplinary Topics Research & Academia Quantum Computing Quantum Information Quantum Hardware Quantum Mechanics Interdisciplinary Topics
What Is Error in Quantum Computing? # Why qubits fail, what that failure means, and how we protect …
Quantum Computing Careers: Where Should a Software Professional Enter — Hardware, Systems, Algorithms, or Applications?
·4198 words·20 mins· loading
Interdisciplinary Topics Research & Academia Quantum Computing Career Development Software Engineering Quantum Hardware Interdisciplinary Topics
Quantum Computing Careers: Where Should a Software Professional Enter — Hardware, Systems, …