2 The number line
A number line is a spatial representation of numbers. It allows us to map numbers to geometric insights and geometric insights to numbers. We will soon learn how to add and subtract quantities and how to easily determine if one number is greater than or less than another.
You can think of the number line as a straight railway. It extends in both directions, but remains one-dimensional.
2.1 Representing numbers on the number line
We can represent numbers on the number line as points, by marking the position of the number on the line. For instance, in the following figure, we have marked the positions of the numbers \(\color{red}{3}\) and \(\color{blue}{7}\).
We are going to use walking and traveling as a metaphor for moving on and adding in the number line, therefore we are taking some poetic liberties and are going to represent points and operations in a more playful way. For instance, the following figure represents number \(\color{red}{2}\). You can think of it as the train is a position \(\color{red}{2}\).
2.2 Addition and subtraction on the number line
Adding up and subtracting quantities on the number line is very intuitive. Adding up means moving in the direction of increasing numbers, and subtracting means moving in the direction of decreasing numbers. I avoid using the words “right” and “left” or “east” and “west” because the line can be oriented or rotated in different ways.
For instance, imagine we want to do the following operation: \(2+4\). We start \(2\):
Then we move from there \(4\) units in the direction of the increasing numbers.
The position we end up at is the result, in this case \(2+4=6\).
We will be representing the whole operation like this:
Subtracting is similar, only that we move in the direction of decreasing numbers. For instance, to compute \(9 - 3\), we start at \(9\) and move \(3\) positions in the direction of decreasing numbers, and we end up at \(6\).
Time to practice. In the following exercises, use the number line to compute the result of the following operations. You have to start by coloring the train at the position of the first operand, and then move in the direction indicated by the operation, and finally write down the result in the box.
For instance, to compute \(3+3\), we start at \(3\) and move \(3\) positions in the direction of increasing numbers, and we end up at \(6\).
Old maps often labeled unexplored territories as “terra incognita,” which is Latin for “unknown land.” To signal the dangers of these areas, they were often illustrated with sea monsters and dragons. Hic sunt dracones: Here be dragons.
Did you notice anything unusual about the last operation? We started at \(3\) and had to move \(7\) positions in the direction of decreasing numbers. However, after \(3\) positions, we ended up at \(0\). Does that mean we can’t move any further? What is beyond \(0\) in that direction? Suntne hic dracones? Not really. There are numbers in that direction that are pretty much like the ones you were familiar with on the positive side. These numbers are called negative numbers, and you can think of them as reflections of the positive numbers on the other side of zero. Each negative number is the reflection or opposite of the corresponding positive number. In the example above, after \(0\), you find the reflection of \(1\), which is \(-1\) and is read as “negative one” or “minus one”; then, the reflection of \(2\), which is \(-2\); and so on.
You have likely encountered negative numbers when discussing cold temperatures (if you live in a place where the temperature can drop below 0 degrees) or riding an elevator. In elevators, positive numbers usually represent floors above ground level. Floors below ground level are usually labeled with negative numbers. This is convenient because it eliminates the need for a different display for floors below zero, like the basement.
Negative numbers provide a convenient bookkeeping mechanism. You can use the same placeholder to represent quantities on two sides of a reference. They can represent deficits, losses, debts, or positions relative to an arbitrary reference. For example, you could represent a year prior to an event, an altitude below sea level, or a floor below the ground floor.
Exercises
Use the following number lines as templates for additional exercises. Even better, have the kids create their own exercises by choosing the numbers and operations they want to practice.
2.3 Negative numbers
We learned that negative numbers are reflections of positive numbers on the opposite side of zero. They are similar to positive numbers, but represent different quantities. In the examples above, there is not a clear difference between positive and negative numbers on the number line other than their position relative to zero.
An important difference is that negative numbers, unlike their positive counterparts, are not used to represent the amount of an object. You don’t usually say, “I have minus two apples.” Perhaps because of this, negative numbers have been called “absurd” or “false” throughout history and were not widely accepted in the West until the Renaissance.
I just wanted to mention one last thing about how to perform operations with negative numbers.
Adding a negative number is the same as subtracting the corresponding positive number. For example, \(2 + (-3) = 2 - 3 = -1\). This is more clearly seen on a number line. In both cases, the resulting operation involves moving \(3\) positions in the direction of decreasing numbers, starting from \(2\) and ending at \(-1\).
In the general case we have:
\[ a + (-b) = a - b \]
Subtracting a negative number is the same as adding the corresponding positive number. For example, \(2 - (-3) = 2 + 3 = 5\). In both cases, the resulting operation involves moving \(3\) positions in the direction of increasing numbers, starting from \(2\) and ending at \(5\).
In the general case we have:
\[ a - (-b) = a + b \]
This last result may be less intuitive. One way to understand it is that each minus sign changes the direction. For example, when you have \(a {\color{red}{-}} ({\color{blue}{-}}b)\), the first minus sign, \(\color{red}{-}\), tells us to change direction and move in the direction of the decreasing numbers. However, the second minus sign, \(\color{blue}{-}\) , tells us to change direction again and move in the direction of the increasing numbers. That’s why we end up moving \(b\) positions in the direction of increasing numbers.
Still confused? No worries—we’ll revisit this topic later.
2.4 How far apart are the tortoise
and the hare
?
Tortoises and turtles are recurrent characters in philosophy and mathematics. In many traditions, a giant world turtle supports the earth. One of Zeno’s paradoxes is called “The Tortoise and Achilles” and intended to illustrate the impossibility of motion. There is also Aesop’s fable “The Hare and the Tortoise.” Though not mathematical in nature, we will use the characters from this fable to illustrate the concept of distance.
Measuring distance on a number line is simple. It boils down to counting the number of units or segments of lenght \(1\) between two numbers. These units are the space between two consecutive numbers; for example, between \(-2\) and \(-1\), or between \(3\) and \(4\).
A distance is a numerical measurement of how far apart two points or objects are. Examples include the distance from your house to school, the distance from Earth to the sun, the number of days until Christmas, and how many moves your Rubik’s Cube is from being solved.
Distances are nonnegative numbers and are symmetric, meaning the distance between your house and the playground is the same as the distance between the playground and your house.
\[ \text{distance}\left(\text{\style{font-size:2em}{🏠}}, \text{\style{font-size:2em}{🛝}}\right) = \text{distance}\left(\text{\style{font-size:2em}{🛝}}, \text{\style{font-size:2em}{🏠}}\right) \]
\[ \text{distance}\left(\text{\style{font-size:2em}{🌎}}, \text{\style{font-size:2em}{🌞}}\right) = \text{distance}\left(\text{\style{font-size:2em}{🌞}}, \text{\style{font-size:2em}{🌎}}\right) \]
The distance between an object and itself is always zero. For instance, the distance between your house and your house is zero, and the distance between the sun and the sun is zero.
\[ \text{distance}\left(\text{\style{font-size:2em}{🏠}}, \text{\style{font-size:2em}{🏠}}\right) = 0 \]
For example, in the following figure, we want to find the distance between the hare and the tortoise
. This is how it is done:
- First, we identify the position of the hare, which is \(1\).
- We identify the position of the tortoise, which is \(5\).
- We count the number of segments between the two numbers (colored \({\color[RGB]{255,20,147}{\text{fuchsia}}}\) in the figure), which is \(4\).
- An equivalent way to find the distance is to subtract one number from the other, i.e., \(5- 1 = 4\).
Measuring distance on the number line.
If the hare moves to position \(-3\), that’s fine; the same logic applies. You just need to remember how to subtract negative numbers. Remember that \(5 - (-3) = 5 + 3 = 8\)
Measuring distance on the number line.
Exercises
Find the distance between the hare and the tortoise:
2.5 Comparing quantities on the number line
Once we have established the direction in which the numbers increase, comparing quantities on the number line is trivial.
Thus far, we have drawn horizontal number lines and agreed that numbers increase as we move towards the right.
Therefore, given two numbers, the one on the right is always larger than the one on the left.
Comparing quantities on the number line. \({\color{red}{-5}} < {\color{blue}{3}} < {\color{olive}{6}}\).
2.6 Playing Battleship

Mathematical objects can exist in any number of dimensions. You can think of a dimension as one of the directions in which you can move. Because we live in a three-dimensional world, we can move left or right, forward and backward, and up and down.
Let’s imagine how it would be to live in a world with different number of dimensions \(N\).
| \(N\) | Object | Symbol | How can we move? |
|---|---|---|---|
| 0 | Point | \(\color{red}{\bullet}\) | We cannot move. |
| 1 | Line | \(\color{red}{\rule{2cm}{0.8pt}}\) | We can move only forward and backward. |
| 2 | Plane | We can move forward and backward, and also left and right. | |
| 3 | Volume | We can move left, right, forward, backward, and jump up and down. |
More than \(3\) dimensions are hard to imagine and visualize.
So far, we have been operating and counting in one dimension. This means that we can only move in one of the two directions in which the arrows of the number line extends: for instance right and left.
We can use two perpendicular number lines to create a two-dimensional plane. Perpendicular lines look like this: \(\perp\).
The resulting \(2\)-dimensional plane is called the Cartesian plane. It is named after the French philosopher and mathematician René Descartes, whose latinized name was Renatus Cartesius.
Cartesian plane built with two perpendicular number lines.
In the number line, we could move only in two directions, and specifying the position of a point was easy: we needed just one number.
For instance, we could say the kangaroo is at position \(3\) on the number line.
Now, in two dimensions, we can move not only left and right, but also in the perpendicular direction. Let’s call it for convenience “up and down”.
Now to specify the position of the kangaroo, we need two numbers: one for the horizontal direction and one for the vertical direction. We can say that the kangaroo is at position \((3, 4)\), where \(3\) is the horizontal coordinate and \(4\) is the vertical coordinate. The order is important.
Coordinates can also be negative. In the following figure, the coordinates are shown close to each animal. For instance, the penguin is at \((-4, 3)\), the monkey is at \((-4, 0)\), etc.
Exercises
Locate the following points one the Cartesian plane: \(\color{lightgray}{(2, 3)}\), \(\color{lightgray}{(0, 0)}\), \(\color{lightgray}{(-3, 4)}\), \((-2, 5)\), \((1, -3)\), \((0, -7)\), \((-9, 0)\), \((-9, -9)\), \((-9, 1)\), \((0, 7)\), and \((1, 1)\).
Print two copies of the figure below and play Battleship with a friend.
2.7 The integers
The counting numbers we introduced in Chapter 1 and have used so far form a set: the set of natural numbers.
\[ \color{red}{\mathbb{N} = \{0, 1, 2, 3, 4 \cdots\}} \]
A set is a collection of objects. For instance, this a set of animals:
\[ A=\left\{\text{\style{font-size:2em}{🐨}}, \text{\style{font-size:2em}{🐶}}, \text{\style{font-size:2em}{🐸}}, \text{\style{font-size:2em}{🐼}}, \text{\style{font-size:2em}{🐔}}\right\}\]
A set can be a subset of another set, meaning that it is contained in that set. For instance, the set of mammals, which are hairy, warm-blooded vertebrates that drink milk, give birth to live young:
\[ M=\left\{\text{\style{font-size:2em}{🐨}}, \text{\style{font-size:2em}{🐶}}, \text{\style{font-size:2em}{🐼}}\right\} \]
is a subset of the previous set of animals, \(A\). We denote it using the symbol \(\subset\), that is \(M \subset A\).
Some sets contain only \(1\) element, like the set of moons of planet Earth \(S = \left\{\text{\style{font-size:2em}{🌕}}\right\}\). Some sets contain no elements, like the set of moons of planet Mercury or the set of sharks that can fly \(S' = \{\}\). This set is called the empty set and is denoted with \(\emptyset\).
The set that results from extending the natural numbers with the negative reflections of the positive numbers is called the integers and is denoted with \({\color{blue}{\mathbb{Z}}}\).1
\[ \color{blue}{\mathbb{Z} = \{\dots, -3, -2, -1, 0, 1, 2, 3, \dots\}} \]
This new set contains all the numbers we have learned so far, including the natural numbers and the negative numbers.
\[ {\color{red}{\mathbb{N}}} \subset {\color{blue}{\mathbb{Z}}} \]
The negative integers are also a set denoted with \(\color{green}{\mathbb{Z}^-}\).
\[ {\color{green}{\mathbb{Z}^-}} \subset {\color{blue}{\mathbb{Z}}} \]
These relationships are shown in the following figure.
\(\color{red}{\mathbb{N}}\) and \(\color{blue}{\mathbb{Z}}\) are very important sets in mathematics, you will find them over and over again in different contexts.
\(\color{blue}{\mathbb{Z}}\) and the operation of addition on this set has some important properties:
Closure and associativity: Combining two elements in the set yields another element in the set. If we add two integers, the result is another integer. For example, \(2 + 3 = 5\) and \(-1 + (-7) = -8\).
Existence of an identity element: There is a neutral number \(e\), such that \(e + a = a + e = a\). In the case of addition, this do-nothing number is \(0\). For example, \(2 + 0 = 0 + 2 = 2\) and \(-3 + 0 = 0 + (-3) = -3\). Adding (or subtracting) \(0\) is like doing nothing.
Existence of an inverse: For every integer \(a\), there is another integer that, when added to the first, yields the identity element \(0\). For example, the additive inverse of \(2\) is \(-2\) because \(2 + (-2) = 0\), and the additive inverse of \(-3\) is \(3\) because \(-3 + 3 = 0\). You can think of the additive inverse as the evil twin of a number, the reflection of the number across zero.
These properties make the set of integers with the operation of addition a mathematical structure called a group.
It’s important to establish that the integers form a group under addition because all future group concepts will apply to the integers under addition.
Here is a loose analogy: You know that mammals are warm-blooded vertebrates that drink milk, give birth to live young, and have hair.
Then I ask you about okapis and saolas. You might not know what they are, as I didn’t until recently. But if I tell you that okapis and saolas are mammals, suddenly you know a lot about them.
2.8 Number lines that eat their own tails 
Dad doesn’t like people who talk in circles, but he loves people who count in circles.
I told you before that we can orient the number line in any way we want. It turns out, we can also bend it in a circle.
Have you seen those depictions of snakes or dragons eating their own tails? They are called “ouroboros” and they represent the idea of something that is cyclic. “οὐροβόρος” is ancient Greek for “tail eater”. Now, let’s see what we can do with a number line that eats its own tail.
We can take a number line and bend it in a circle. Isn’t that cool?
The kind of arithmetic we can do on a circular number line is called modulo arithmetic or clock arithmetic, because it is the kind of arithmetic we use when we read a clock.
Let’s consider how to make an addition in this circular number line. Imagine we want to calculate \(1+3\). We start at \(1\) and move \(3\) steps in the clockwise direction.
That’s pretty normal. Expected.
Now consider we want to do this addition \(3+3\). We start at \(3\) and move \(3\) steps.
\(3+3=0\). That’s new ah?
This number system is called \(\mathbb{Z}_6\). Here is the table of operations for addition in \(\mathbb{Z}_6\):
If you want to calculate a sum in \(\mathbb{Z}_6\), for instance \(4 + 3\), you can find the row for \(4\) and the column for \(3\) and see where they intersect.
Same as \(\color{blue}{\mathbb{Z}}\), \(\mathbb{Z}_6\) is also a group.
Why?
Same checklist we used before for \(\mathbb{Z}\):
Closure and associativity: If you add two integers in \(\mathbb{Z}_6\), you get another integer in \(\mathbb{Z}_6\). For example, \(2 + 3 = 5\) and \(4 + 3 = 1\). The operations are associative, for example, \((2 + 3) + 4 = 2 + (3 + 4) = 5 + 4 = 2 + 1 = 3\).
Existence of an identity element: There is a number, \(0\), such that adding it to any number doesn’t change that number. For example, \(2 + 0 = 2\).
Existence of an inverse: For every integer, there is another integer such that when you add them together, you get the identity element \(0\). For example, for \(2\), the inverse is \(4\) because \(2 + 4 = 0\), and for \(3\) it is \(3\) because \(3 + 3 = 0\).
Exercises
Now consider the group \(\mathbb{Z}_{4}\) with elements \(\{0, 1, 2, 3\}\) and addition modulo \(4\).
Complete the group table for addition in \(\mathbb{Z}_{4}\):
\(\mathbb{Z}\) stands for “Zahlen”, the German word for “numbers”.↩︎