Skip to content
Mathematics

Number Systems

Learn how number sets fit together, locate values on a number line, and translate between inequalities and interval notation.

The families of numbers

A number can belong to several sets at once. Counting numbers are integers, and every integer is rational because it can be written as a fraction with denominator one.

N\mathbb{N}

Natural numbers

Positive counting numbers. In this lesson, zero is excluded.

1,2,3,…1,2,3,\ldots
W\mathbb{W}

Whole numbers

The natural numbers together with zero.

0,1,2,3,…0,1,2,3,\ldots
Z\mathbb{Z}

Integers

Whole numbers and their negatives. No fractional parts.

…,−2,−1,0,1,2,…\ldots,-2,-1,0,1,2,\ldots
Q\mathbb{Q}

Rational numbers

Numbers expressible as a ratio of integers with a nonzero denominator. Their decimals terminate or eventually repeat.

23,−54,0.125\frac23,\quad-\frac54,\quad0.125
R∖Q\mathbb{R}\setminus\mathbb{Q}

Irrational numbers

Real numbers that are not rational. Their decimals neither terminate nor eventually repeat.

2,π,e\sqrt2,\quad\pi,\quad e
R\mathbb{R}

Real numbers

All rational and irrational numbers. Every point on the number line represents one real number.

−3,0,12,2-3,\quad0,\quad\frac12,\quad\sqrt2

Conventions vary: some books include 00 in N\mathbb{N}. Here we start natural numbers at 11 and use W\mathbb{W} for whole numbers. The whole-number symbol is not universal; always check a text’s definitions.

N⊂W⊂Z⊂Q⊂R\mathbb{N}\subset\mathbb{W}\subset\mathbb{Z}\subset\mathbb{Q}\subset\mathbb{R}

The subset symbol ⊂\subset means every member of the set on the left also belongs to the set on the right. Irrational numbers sit outside the rational set but inside the real set.

Where does a number belong?

Choose a number. Blue outlines show all the sets it belongs to.

A nested Venn (Euler) diagram. Each inner set is contained in every set around it. Rational and irrational numbers are disjoint and together fill the real numbers. Regions are not drawn to scale.
Example numbers

55

A positive counting number belongs to every enclosing set.

Belongs to

  • R\mathbb{R} Real
  • Q\mathbb{Q} Rational
  • Z\mathbb{Z} Integer
  • W\mathbb{W} Whole
  • N\mathbb{N} Natural

Read the number line

Zero is the reference point. Negative numbers lie to its left and positive numbers to its right. Values increase as you move right, so −4<−1<0<2-4<-1<0<2. Equal steps on the line represent equal differences in value.

Fractions and irrational numbers occupy points too: 12\frac12 lies halfway between 00 and 11, while 2≈1.414\sqrt2\approx1.414 lies between 11 and 22. Its exact point exists even though its decimal expansion never ends.

An interval describes all real numbers between its bounds, including every fractional and irrational value there. It is not just a list of integers.

Brackets, parentheses, and infinity

A square bracket includes a finite endpoint; a parenthesis excludes it. Read the left bound first and the right bound second. In the table, assume a<ba<b.

Common interval forms and their equivalent inequalities
TypeIntervalInequalityIncluded endpoints
Open(a,b)(a,b)a<x<ba<x<bNeither endpoint
Closed[a,b][a,b]a≤x≤ba\le x\le bBoth endpoints
Half-open[a,b)[a,b)a≤x<ba\le x<bLeft endpoint only
Half-open(a,b](a,b]a<x≤ba<x\le bRight endpoint only
Right ray[a,∞)[a,\infty)x≥ax\ge aFinite endpoint included
Left ray(−∞,b)(-\infty,b)x<bx<bFinite endpoint excluded

Infinity describes an unbounded direction, not a number you can include. Always use parentheses at −∞-\infty and ∞\infty. The whole real line is (−∞,∞)=R(-\infty,\infty)=\mathbb{R}.

Build an interval

Move the endpoints and decide whether to include them. Unbounded sides extend to infinity.

Interval examples

Interval notation

[−2,3)[-2,3)

Equivalent condition

−2≤x<3-2\le x<3

Blue marks the included part of the real number line.

A filled marker includes an endpoint; a hollow marker excludes it. Arrows mean the interval continues beyond the displayed window.
Left endpoint
−2-2
Right endpoint
33

Infinity is not a real endpoint, so it always takes a parenthesis. Try equal endpoints or put the lower bound above the upper bound.

Combine intervals with sets

The union A∪BA\cup B includes numbers in either set or both. The intersection A∩BA\cap B includes only numbers in both. For these overlapping intervals:

A=[−2,1],B=(0,3)A=[-2,1],\qquad B=(0,3)
A∪B=[−2,3)A\cup B=[-2,3)
A∩B=(0,1]A\cap B=(0,1]

The union covers the combined stretch. For the intersection, 00 is excluded by the second interval, while 11 belongs to both. Disjoint intervals stay separate: (−∞,−1)∪(2,∞)(-\infty,-1)\cup(2,\infty) means x<−1x<-1 or x>2x>2.

Beyond the real line

Complex numbers have the form a+bia+bi, with real aa and bb and i2=−1i^2=-1. Real numbers are the cases where b=0b=0, so R⊂C\mathbb{R}\subset\mathbb{C}. A non-real number such as 2+i2+i needs a complex plane; it has no point on the real number line and is neither rational nor irrational.

Try it yourself

Decide your answer before revealing the explanation.

  1. 1. Classify a negative terminating decimal.

    −1.25-1.25
    Show explanation
    −1.25=−54∈Q⊂R-1.25=-\frac54\in\mathbb{Q}\subset\mathbb{R}

    It is rational and real, but not an integer, whole number, or natural number.

  2. 2. Write the inequality in interval notation.

    −1<x≤4-1<x\le4
    Show explanation
    (−1,4](-1,4]

    Use a parenthesis at the excluded left endpoint and a square bracket at the included right endpoint.

  3. 3. Can this interval contain a number?

    (2,2)(2,2)
    Show explanation
    {x∈R:2<x<2}=∅\{x\in\mathbb{R}:2<x<2\}=\varnothing

    No number is simultaneously greater than two and less than two. Including both equal endpoints would instead give a single point.