📘 CodingMarble Learn

Rational Numbers: Number Line, Density and Decimals

A rational number is any number that can be written as p/q, where p and q are integers and q is not 0. Examples: 3/4, −5/3, 7 (= 7/1), 0.25 (= 1/4). To place p/q on the number line, cut each unit into q equal parts and hop p parts from 0. Between any two rational numbers there is always another one (their average), so there are endlessly many between them. The decimal of a rational number either ends (terminating) or repeats a block for ever (non-terminating repeating).

🎬 Step-by-step story

  1. To show 3/4, cut the piece from 0 to 1 into 4 equal parts. Then hop 3 parts to the right. The red dot is 3/4.
  2. For −5/3, cut each unit into 3 parts. Now hop 5 parts to the left of 0. You land at −1 2/3.
  3. Take two rationals, 1/2 and 3/4. Their average, 5/8, sits between them. Zoom in and do it again: 9/16, then 17/32. It never stops.
  4. A faster way: write 1/2 as 10/20 and 3/4 as 15/20. Now 11/20, 12/20, 13/20 and 14/20 are all in between.
  5. Divide 1 by 7. The remainder can only be 1 to 6. When the remainder comes back to 1, the digits start again: 0.142857142857…
  6. Your turn: pick any p and q. Watch the dot land on the line and read its decimal below.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Is 0 a rational number?

Yes. 0 = 0/1 (or 0/5). Only the bottom number must not be 0; the top can be 0.

How do I place a negative fraction like −5/3?

Cut each unit into 3 and hop 5 parts to the LEFT of 0. You pass −1 after 3 hops and stop 2 parts later.

If rationals are so crowded, why can we not list the next one after 1/2?

Because between 1/2 and any number you pick there is always their average. So there is no 'next' one.

Why do we multiply by n + 1 to get n numbers?

Multiplying by n + 1 makes the gap between the two tops n + 1, which leaves exactly n whole numbers in between.

How can we be sure a fraction's decimal repeats and does not go on randomly?

Dividing by q gives only q − 1 possible non-zero remainders. A remainder must come back, and after it the same digits follow.

Does 1/7 have a repeating block longer than 6?

No. Only 6 remainders (1–6) exist, so the block has at most 6 digits. Try q = 7 in free play.

What is a rational number?

A rational number is a number you can write as p/q. Here p and q are integers (whole numbers, with their negatives). And q is not 0.

The word comes from ratio. A ratio compares two numbers, just like p/q does.

One rational number has many names: 1/2 = 2/4 = 50/100. The simplest name is the one where p and q have no common factor.

Rational numbers on the number line

Follow two moves: Cut and Hop.

  1. Cut: split every unit (0 to 1, 1 to 2, …) into q equal parts.
  2. Hop: start at 0. Move p parts. Go right if the number is positive, left if it is negative.

Example: 7/3. Cut into thirds. Hop 7 thirds right. You land at 2 1/3 (just after 2).

For a mixed number like 2 1/3, you can also jump to 2 first, then cut only the piece from 2 to 3 into 3 parts and take 1.

Density: a rational between any two rationals

Claim: between any two different rational numbers a and b there is another rational number.

Proof: Say a < b. Look at m = (a + b)/2, the average.

So m lies between a and b. Now use a and m, and find a new average. We can do this again and again, so there are infinitely many rational numbers between any two. This is called the density of rational numbers. It means: there are no gaps you can find by only using fractions.

Finding many rationals at once

To find 5 rationals between 3/5 and 4/5, make the denominators bigger. Multiply top and bottom by 6 (one more than 5): 3/5 = 18/30 and 4/5 = 24/30. Now 19/30, 20/30, 21/30, 22/30, 23/30 are five rationals in between.

Rule of thumb: if you need n numbers, multiply by n + 1.

With decimals it is also easy: between 0.3 and 0.4 lie 0.31, 0.32, 0.35, 0.399 and so on.

Decimal expansions: terminating or repeating

Divide p by q with long division. Only two things can happen.

Quick test: write the fraction in lowest terms. If the denominator has only 2s and 5s as prime factors (like 8 = 2×2×2, 20 = 2×2×5), the decimal ends. Otherwise it repeats.

The reverse is true too: every terminating or repeating decimal is a rational number (see the next lesson for 0.4747… = 47/99).

Try it: build your own number line

Take a strip of paper and a ruler. Mark 0 and 1 exactly 12 cm apart. Fold to find 1/2. Fold again for 1/4 and 3/4. Now use the ruler: every 4 cm is 1/3. Where do 1/3 and 1/4 sit? Which is bigger? Then check in the 3D free-play step with p = 1, q = 3 and p = 1, q = 4.

Predict, then check: before moving the sliders, guess whether 5/12 ends or repeats. (12 = 2×2×3, so it repeats.)

Key formulas and definitions

Worked examples

1. Show 5/4 on the number line.

Step 1 (Cut): split each unit into 4 parts. Step 2 (Hop): from 0, hop 5 quarters to the right. 4 quarters reach 1, one more quarter goes past it. So 5/4 = 1 1/4, a quarter of the way from 1 to 2.

2. Show −2/3 on the number line.

Cut each unit into 3 parts. From 0 hop 2 parts to the left. The point is two-thirds of the way from 0 to −1.

3. Find one rational number between 1/3 and 1/2.

Average: (1/3 + 1/2) ÷ 2 = (2/6 + 3/6) ÷ 2 = (5/6) ÷ 2 = 5/12. Check: 1/3 = 4/12 and 1/2 = 6/12, and 5/12 is between them.

4. Find five rational numbers between 3/5 and 4/5.

We need 5, so multiply top and bottom by 6. 3/5 = 18/30, 4/5 = 24/30. Five rationals: 19/30, 20/30 (= 2/3), 21/30, 22/30, 23/30.

5. Write 7/8 as a decimal. Does it end?

70 ÷ 8 = 8 remainder 6. 60 ÷ 8 = 7 remainder 4. 40 ÷ 8 = 5 remainder 0. Stop. 7/8 = 0.875. It ends, because 8 = 2×2×2 has only 2s.

6. Write 10/3 and 1/7 as decimals.

10/3: 10 ÷ 3 = 3 remainder 1, then 10 ÷ 3 = 3 remainder 1 again and again, so 10/3 = 3.333… = 3.3̄. 1/7: remainders go 3, 2, 6, 4, 5, 1 and then repeat, so 1/7 = 0.142857142857… with block 142857.

7. Without dividing, say which end: 13/40, 7/12, 21/35.

13/40: 40 = 2×2×2×5, ends (0.325). 7/12: 12 = 2×2×3 has a 3, repeats (0.58333…). 21/35: first reduce to 3/5; 5 only, ends (0.6). Always reduce first!

8. Find three rationals between 0.1 and 0.11.

Write 0.1 = 0.100 and 0.11 = 0.110. In between: 0.101, 0.105, 0.109 (and many more). As fractions: 101/1000, 105/1000, 109/1000.

Common mistakes

Practice quiz

1. Which of these is NOT a rational number?
2. To mark 5/6 on the number line you cut each unit into…
3. Which number lies between 1/4 and 1/2?
4. 1/6 as a decimal is…
5. How many rational numbers lie between 2 and 3?

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is a rational number in simple words?

A number that can be written as a fraction p/q of two integers with q not 0, like 3/4, −2 or 0.5.

How do you find rational numbers between two rational numbers?

Take the average, or write both with a bigger common denominator and pick the fractions in between. For n numbers multiply top and bottom by n + 1.

Which fractions give terminating decimals?

In lowest terms, those whose denominator has only 2 and 5 as prime factors, like 1/8, 3/20 or 7/25. All others repeat.

Where this is taught

Canada (Ontario)Grade 9B. Number
ItalyScuola secondaria di primo grado – classe 3ªNumbers
ItalySecondaria di secondo grado – classe 1ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 1ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 1ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 2ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 2ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 2ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 3ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 3ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 3ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 4ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 4ªArithmetic and algebra
ItalySecondaria di secondo grado – classe 4ªArithmetic and algebra
RomaniaClasa a IX-aAlgebra: Real numbers
Spain3º ESONumber sense
Spain4º ESONumber sense
Spain4º ESONumber sense
CBSE (India)Class 9Number System
South Korea중학교 2학년Rational numbers and decimals
South Korea중학교 3학년Real numbers
FranceQuatrièmeNumbers and calculations
FranceSecondeNumbers, calculations and algebra
Russia7 классNumbers and calculations
Russia7 классNumbers and calculations
Russia10 классNumbers and calculations
Russia10 классNumbers and calculations

Learn next

Related lessons

All Maths lessons