Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 39 ยท Getting Started

Kinds of Numbers and the Number Line

Learn the families of numbers: natural, whole, integers, fractions and decimals, and see how the number line orders them and shows distance and size.

Not all numbers are the same kind. Counting apples uses one kind; measuring a temperature below freezing uses another; sharing a pizza uses a third. Knowing the families helps you pick the right tool and speak clearly about math.

The number line is the picture that ties them all together. It is a straight line on which every number has its own position, with smaller numbers to the left and larger numbers to the right.

The main families

Name What it includes Examples
Natural (counting) numbers Numbers used to count 1, 2, 3, 4, ...
Whole numbers Natural numbers and zero 0, 1, 2, 3, ...
Integers Whole numbers and their negatives ..., -2, -1, 0, 1, 2, ...
Rational numbers Anything that can be written as a fraction of two integers 1/2, -3/4, 0.25, 7
Irrational numbers Numbers that cannot be written as such a fraction โˆš2, ฯ€

Some books start the natural numbers at 0. This course starts them at 1 and says "whole numbers" when 0 is included. Both conventions are common, so check which one a textbook uses.

Every integer is also a rational number, because 7 can be written as 7/1. A decimal such as 0.25 is rational too, because it equals 1/4.

In this course you will mostly use integers, fractions and decimals. Irrational numbers such as โˆš2 appear later, in the chapter on roots.

Reading the number line

On a number line, equal steps mean equal differences. Zero sits in the middle, positive numbers go right, negative numbers go left.

Text
 -4  -3  -2  -1   0   1   2   3   4
 |---|---|---|---|---|---|---|---|

Two useful facts follow:

  1. Order. If a number is to the right of another, it is greater. So -1 > -3, even though 3 looks "bigger" than 1. A debt of $1 is smaller than a debt of $3.
  2. Distance. The distance between two numbers is how many steps separate them, always positive. The distance between -3 and 2 is 5.

The distance of a number from zero is called its absolute value, written |x|. So |-3| = 3 and |3| = 3.

Comparing and ordering

To compare numbers, imagine where they sit on the line. Use the symbols < (less than), > (greater than) and = (equal). The open side of the symbol faces the larger number.

Let's check some comparisons and sort a mixed list. Python's sorted works on a mix of integers and decimals, and Python's abs finds the distance from zero.

Python Order and distance

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Number lines for fractions and decimals

Between any two integers there are many more numbers. Halfway between 0 and 1 sits 1/2, which is also 0.5. Cut the gap into tenths and you get 0.1, 0.2, ... 0.9.

You can draw a number line with matplotlib to see these positions. The code marks a few numbers and prints the order. (It uses a labelled stand-in for hand-drawing: it only plots points at the values you give it.)

Python Plot numbers on a line

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice that 7/4 sits at 1.75, between 1 and 2. Any fraction larger than 1 lies to the right of 1.

Even, odd and other labels

Whole numbers can also be sorted by how they behave.

  • Even numbers divide by 2 with no remainder: 0, 2, 4, 6, ...
  • Odd numbers leave remainder 1: 1, 3, 5, ...
  • Positive numbers are greater than zero; negative numbers are less than zero; zero is neither.

Zero is even. You can check: 0 รท 2 = 0 with remainder 0.

Common mistakes

  • Thinking -5 is greater than -2 because 5 is greater than 2. On the line, -2 is further right, so -2 > -5.
  • Forgetting that distance is never negative.
  • Treating 0.5 and 1/2 as different numbers. They are two names for one position.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which number is the greatest?

    On the number line -1 is furthest to the right, so it is the greatest.
  2. 2. What is the distance between -4 and 3 on the number line?

    Distance is |3 - (-4)| = 7, and distance is never negative.
  3. 3. Which statement is true?

    Any integer n can be written as n/1, so it is rational. Natural numbers here start at 1.
  4. 4. What is |-8|?

    Absolute value is the distance from zero, which is 8.

Summary

  • Natural numbers count; whole numbers add zero; integers add negatives.
  • Rational numbers are fractions of integers; irrational numbers such as ฯ€ are not.
  • The number line shows order (right means greater) and distance.
  • Absolute value is distance from zero and is never negative.
  • Different forms such as 1/2 and 0.5 can name the same point.

Next: The Four Operations