Uni-Sine
MathematicsNumber

The number line

A number line is a straight line with numbers placed at equal distances along it. Zero sits in the middle, positive numbers go to the right, negative numbers go to the left, and the arrows at each end show that it goes on forever. Numbers get bigger as you move right, so a number line makes it easy to compare numbers, add and subtract, and show inequalities.

What is a number line?

Here is a number line from −5 to 5. Each mark is called a tick, and the gap between ticks is always the same. That equal spacing is what makes a number line work: the distance between 1 and 2 is the same as the distance between −4 and −3.

−6−5−4−3−2−10123456
Equal steps either side of zero
  • Zero is the starting point, called the origin.
  • Positive numbers are to the right of zero.
  • Negative numbers are to the left of zero, as mirror images of the positives.
  • The arrows mean the line keeps going in both directions without end.

A number line can also stand up vertically, like a thermometer or the y-axis on a graph. Then up is positive and down is negative.

Number line with negatives

Negative numbers are the opposites of positive numbers: −3 is the same distance from zero as 3, but on the other side. Two numbers like this are called opposites, and zero is its own opposite.

The key idea is that numbers increase from left to right. So −1 is greater than −4, even though 4 is bigger than 1, because −1 is further right. Think of temperature: −1°F is warmer than −4°F.

How to draw a number line

  1. Draw a straight line with an arrow at each end.
  2. Choose a scale that fits your numbers: count by 1s, 2s, 5s, 10s, or by fractions.
  3. Mark zero, then make evenly spaced ticks on both sides.
  4. Label the ticks, with positives to the right and negatives to the left.
  5. Plot each number with a dot.

Fractions and decimals on a number line

Fractions and decimals sit between the whole numbers. To place a fraction, split the space between two whole numbers into as many equal parts as the denominator, then count along by the numerator. For 3/4, split 0 to 1 into 4 equal parts and count 3 of them:

−0.500.511.522.53/4
3/4 sits halfway between 1/2 and 1

For a fraction bigger than 1, change it to a mixed number first. 7/3 is 2⅓, so it sits one third of the way from 2 to 3. Decimals work the same way: 2.5 is halfway between 2 and 3, and −1.25 is a quarter of the way from −1 to −2.

Comparing and ordering numbers on a number line

The number further right is always the greater one. That gives you a quick way to check inequality signs: −2 > −9 because −2 is to the right of −9.

Example 1: put numbers in order

Order −1.5, 2, −3, 0.5 and −0.25 from least to greatest.

Place each on a number line, then read from left to right: −3, −1.5, −0.25, 0.5, 2. A common slip is to put −0.25 before −1.5 because 0.25 is smaller than 1.5. On the number line you can see that −0.25 is closer to zero, so it is greater.

Adding and subtracting on a number line

Think of each sum as a starting point and a move. Start at the first number. Adding a positive moves you right. Subtracting a positive moves you left.

Example 2: −3 + 5

Start at −3 and move 5 to the right. You land on 2.

−6−5−4−3−2−10123456startend+5
Start at −3, move 5 right, land on 2

Example 3: 4 − 7

Start at 4 and move 7 to the left. You pass zero and land on −3.

−6−5−4−3−2−10123456startend−7
Start at 4, move 7 left, land on −3

Adding and subtracting negative numbers

A negative flips the direction of the move:

OperationDirectionExample
Add a positiveRight−3 + 5 = 2
Subtract a positiveLeft4 − 7 = −3
Add a negativeLeft2 + (−6) = −4
Subtract a negativeRight−1 − (−4) = 3

Subtracting a negative is the same as adding a positive, which is why −1 − (−4) is −1 + 4 = 3. A real example: if the temperature is −4°F in the morning and rises 15 degrees, start at −4 and move 15 right to reach 11°F.

Absolute value on a number line

The absolute value of a number is its distance from zero on the number line, written with bars: |−6| = 6 and |6| = 6. Distance is never negative, so absolute value is never negative either.

y = \left| x\right|
-6-5-4-3-2-1123456-11234567|−4| = 40|3| = 3
Drag to pan, scroll to zoom. x from -6 to 6, y from -1.2 to 7.2.

Here x is a number on the number line and y is its distance from zero. The graph is a V because numbers the same distance either side of zero, like −4 and 4, have the same absolute value.

The distance between any two numbers is the absolute value of their difference. The distance between −5 and 3 is |3 − (−5)| = |8| = 8. Count the gaps on the number line and you get the same answer.

−6−5−4−3−2−101234568
From −5 to 3 is 8 steps

Inequalities on a number line

An inequality such as x > 2 has infinitely many solutions, so you show them on a number line instead of listing them. Draw a circle at the boundary number, then shade the side where the solutions are.

InequalityCircleShade
x > a (greater than)Open circle at aTo the right
x ≥ a (greater than or equal to)Closed (filled) circle at aTo the right
x < a (less than)Open circle at aTo the left
x ≤ a (less than or equal to)Closed (filled) circle at aTo the left

An open circle means the boundary number is not included. A closed circle means it is. In the number lines below, the shaded part is the solution.

x > 2

−6−5−4−3−2−10123456
Open circle at 2, shaded to the right

x ≤ −1

−6−5−4−3−2−10123456
Closed circle at −1, shaded to the left

−2 < x ≤ 4

A compound inequality shades the part between two boundaries. Here −2 is not included, but 4 is.

−6−5−4−3−2−10123456
Open at −2, closed at 4

Example 4: solve, then graph

Solve 3x − 4 ≥ 5 and show the solution on a number line.

3x \geq 9,\ \ x \geq 3

Draw a closed circle at 3, because 3 is included, and shade to the right.

−6−5−4−3−2−10123456
x ≥ 3

Example 5: watch for the sign flip

Solve −2x + 1 > 7.

-2x > 6

Now divide both sides by −2. Because −2 is negative, the inequality sign flips:

x < -3
−6−5−4−3−2−10123456
x < −3

Draw an open circle at −3 and shade to the left. Test a value to check: x = −4 gives −2(−4) + 1 = 9, and 9 > 7 is true. The Inequality Solver solves any inequality and draws the number line for you.

Now solve one yourself. Remember to flip the sign if you divide by a negative.

Solve a linear inequality; see the solution on a number line.

Press Mark to have your answer marked in the Algebra course.

Common mistakes

  • Thinking −8 is bigger than −2. Further left is smaller, so −8 < −2.
  • Uneven spacing. Every tick must be the same distance apart, or the number line gives wrong answers.
  • Moving the wrong way with negatives. Adding a negative moves left. Subtracting a negative moves right.
  • Mixing up open and closed circles. Open for < and >, closed for ≤ and ≥.
  • Forgetting to flip the sign when you multiply or divide an inequality by a negative number.
  • Counting ticks instead of gaps. From −2 to 3 is 5 gaps, so the distance is 5, even though you pass 6 ticks.

Where number lines show up in school

Under the Common Core standards used in many US states, fractions go on number line diagrams in grade 3. In grade 6, students place integers and other rational numbers on horizontal and vertical number lines and learn absolute value as distance from 0. In grade 7, they use number lines to add and subtract positive and negative numbers. Number lines then return in algebra for inequalities, and as the axes of every graph.

For mixed practice, the daily Pre-Algebra & Algebra 1 paper is a short timed practice test of 8 questions, with a new one every day. To go further with inequalities, the Algebra course has an interactive inequality explorer.

Common questions

What is a number line?
A straight line with numbers placed at equal intervals. Zero is in the middle, positive numbers are to the right, negative numbers are to the left, and the arrows show it goes on forever.
Which way do negative numbers go on a number line?
To the left of zero on a horizontal number line, or below zero on a vertical one.
How do you subtract on a number line?
Start at the first number and move left by the second number. If you subtract a negative, move right instead.
What does an open circle mean on a number line?
That the boundary number is not part of the solution, as in x > 2 or x < 2. A closed circle means it is included, as in x ≥ 2.
How do you put a fraction on a number line?
Split the gap between two whole numbers into as many equal parts as the denominator, then count along by the numerator.
Is zero positive or negative?
Neither. Zero is the point that separates the positive and negative numbers.
What is absolute value on a number line?
The distance of a number from zero. |−7| and |7| are both 7, because both numbers are 7 steps from zero.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Inequality Solver

    Solve inequalities and show the answer on a number line

    Open the tool
  • Learn it

    Algebra

    Master equations, inequalities and the language of abstract mathematics

    Start the course
  • Test it

    Pre-Algebra & Algebra 1

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · StatisticsLine graph: what it is, how to read and make oneWhat a line graph is, its parts, how to read trends and values from one, how to draw your own, and how it compares with bar graphs, with examples.