Chapter 4 · Rational and irrational numbers

Rational and Irrational Numbers

Learn what makes a number rational or irrational. Use fraction form and decimal behavior to tell the two kinds apart.

12 min read

Look at four numbers you already know: 34\frac{3}{4}, 0.60.6, 25% and −2-2. They look different, but they share one feature. You can write each of them as a fraction with an integer on top and a nonzero integer on the bottom. (An integer is a whole number or the opposite of a whole number: …,−2,−1,0,1,2,…\ldots, -2, -1, 0, 1, 2, \ldots)

Mathematicians call numbers like these rational, a name that comes from the word ratio. Here is the surprise: some numbers on the number line have no fraction like that at all. In this lesson, you'll learn what separates the two kinds and how to tell which kind a number is.

A rational number is a number that you can write as a fraction pq\frac{p}{q}, where pp and qq are integers and q≠0q \neq 0.

Why can't qq be 00? Dividing by 00 has no meaning. No number multiplied by 00 gives 55, so 50\frac{5}{0} doesn't name any number. The numerator pp has no such limit. It can be 00, and it can be negative.

Notice the words can write. A number doesn't have to look like a fraction to be rational. It only has to equal some integer over a nonzero integer. Here are the three numbers from above that didn't look like fractions, plus 00:

0.6=61025%=25100−2=−210=010.6 = \frac{6}{10} \qquad 25\% = \frac{25}{100} \qquad -2 = \frac{-2}{1} \qquad 0 = \frac{0}{1}

In each case, the numerator and the denominator are integers, and the denominator is not 00. So 0.60.6, 25%, −2-2 and 00 are all rational.

A number's decimal form gives you a second way to check. Every number on the number line has a decimal form, and that form does one of three things:

  • It terminates: the digits stop, as in 0.750.75.
  • It repeats: the digits never stop, but from some point on, one fixed block of digits repeats forever with nothing in between. A bar marks the block, so 0.3‾0.\overline{3} means 0.333…0.333\ldots with 3s forever, and 0.16‾0.1\overline{6} means 0.1666…0.1666\ldots with 6s forever.
  • It does neither: the digits never stop, and no fixed block repeats forever.

Rational numbers are exactly the numbers whose decimal form terminates or repeats. For example, 34=0.75\frac{3}{4} = 0.75 and 13=0.3‾\frac{1}{3} = 0.\overline{3}. A number whose decimal form does neither is an irrational number: no integer over a nonzero integer equals it.

Key concept

What makes a number rational or irrational

Every number on the number line is either rational or irrational, never both.

  • You can write a rational number as pq\frac{p}{q}, where pp and qq are integers and q≠0q \neq 0. Its decimal form terminates or repeats.
  • You cannot write an irrational number as pq\frac{p}{q} for any integers pp and qq with q≠0q \neq 0. Its decimal form neither terminates nor repeats.

So you can identify a rational number in two ways: find an integer over a nonzero integer that equals it, or see that its decimal form terminates or repeats. A number is irrational when its decimal form never terminates and never repeats.

pq,p and q integers,q≠0\dfrac{p}{q}, \quad p \text{ and } q \text{ integers}, \quad q \neq 0

Worked example

A decimal that stops

Is −2.75-2.75 rational or irrational?

  1. Read the decimal. Its digits stop at the hundredths place, so the decimal terminates. That lets you read the number as negative 275 hundredths.

    −2.75=−275100-2.75 = -\frac{275}{100}
  2. Move the negative sign into the numerator. A negative fraction has the same value as the fraction with a negative numerator and the same positive denominator, so only the way of writing it changes.

    −275100=−275100-\frac{275}{100} = \frac{-275}{100}
  3. Check both conditions of the definition. The numerator and the denominator are integers, and the denominator is not 0. You don't need to simplify, because any integer over a nonzero integer is enough.

    p=−275,q=100,q≠0p = -275, \quad q = 100, \quad q \neq 0

Answer

−2.75-2.75 is rational, because it equals −275100\frac{-275}{100}, which is an integer over a nonzero integer.

Worked example

Two decimals that never end

Both of these decimals go on forever: (a) 0.45‾0.\overline{45} and (b) 0.454554555…0.454554555\ldots, in which each 4 is followed by one more 5 than the 4 before it. Classify each one as rational or irrational.

  1. Decide what to check. Neither decimal terminates, so each number is rational only if one fixed block of digits repeats forever.

  2. Read the bar in (a). It covers 45, so the block 45 repeats forever with nothing in between. This decimal repeats.

    0.45‾=0.45 45 45 45…0.\overline{45} = 0.45\,45\,45\,45\ldots
  3. Classify (a). A repeating decimal is the decimal form of a rational number, so some integer over a nonzero integer equals it. Here that fraction has numerator 5 and denominator 11.

    0.45‾=5110.\overline{45} = \frac{5}{11}
  4. Look for a repeating block in (b). The digits follow a pattern, but the groups of 5s keep growing: one 5, then two, then three, and so on. A repeating block must stay exactly the same every time, so no fixed block repeats forever.

    0.45 455 4555 45555…0.45\,455\,4555\,45555\ldots
  5. Classify (b). Its decimal form never terminates and never repeats, so no integer over a nonzero integer equals it.

Answer

0.45‾0.\overline{45} is rational, because its decimal form repeats the block 45 forever. The number in (b) is irrational, because its decimal form neither terminates nor repeats.

Two famous irrational numbers are π\pi, which you use to measure circles, and 2\sqrt{2}. The square root of 2, written 2\sqrt{2}, is the positive number that gives 2 when you multiply it by itself. Mathematicians have proved that no integer over a nonzero integer equals π\pi or 2\sqrt{2}, so their decimal forms never terminate and never repeat.

You can't write all the digits of a number like that. You can only write an approximation: a value that is close to the number but not equal to it. The symbol ≈\approx means is approximately equal to, so you write π≈3.14159\pi \approx 3.14159 and 2≈1.41421\sqrt{2} \approx 1.41421. A calculator can't settle the question either. Its screen has room for only a few digits, so it can't show whether a decimal goes on to repeat.

A square root sign doesn't make a number irrational by itself. For example, 9=3\sqrt{9} = 3 because 3×3=93 \times 3 = 9, and 3=313 = \frac{3}{1} is rational.

Worked example

Exact value or approximation?

Classify each number as rational or irrational: 3.143.14, 227\frac{22}{7} and π\pi.

  1. Classify 3.14. Its digits stop at the hundredths place, so it equals 314 hundredths. That is an integer over a nonzero integer, so 3.14 is rational.

    3.14=3141003.14 = \frac{314}{100}
  2. Classify 22/7. It is already an integer over a nonzero integer, so it is rational. Its decimal form repeats the block 142857.

    227=3.142857‾\frac{22}{7} = 3.\overline{142857}
  3. Compare both numbers with π to five decimal places. All three agree in the first two decimal places and differ after that, so neither 3.14 nor 22/7 equals π. They are approximations of π.

    3.14=3.14000π≈3.14159227≈3.142863.14 = 3.14000 \qquad \pi \approx 3.14159 \qquad \frac{22}{7} \approx 3.14286
  4. Classify π itself. Mathematicians have proved that no integer over a nonzero integer equals π, so its decimal form neither terminates nor repeats.

Answer

3.143.14 and 227\frac{22}{7} are rational, and π\pi is irrational. The two rational numbers are approximations of π\pi, not equal to it: π≈3.14\pi \approx 3.14 and π≈227\pi \approx \frac{22}{7}.

Examples of rational and irrational numbers
NumberWhat its decimal form doesRational or irrational?How you know
−8-8
Terminates: −8.0-8.0
Rational
−8=−81-8 = \frac{-8}{1}, an integer over a nonzero integer
15%
Terminates: 0.150.15
Rational
15% means 15100\frac{15}{100}, an integer over a nonzero integer
29\frac{2}{9}
Repeats: 0.2‾0.\overline{2}
Rational
It is already an integer over a nonzero integer
0.83‾0.8\overline{3}
Repeats: the 3 repeats forever
Rational
A repeating decimal is rational; this one equals 56\frac{5}{6}
9\sqrt{9}
Terminates: 3.03.0
Rational
9=3=31\sqrt{9} = 3 = \frac{3}{1}, an integer over a nonzero integer
2\sqrt{2}
Neither: 2≈1.41421\sqrt{2} \approx 1.41421
Irrational
Proved: no integer over a nonzero integer equals it
π\pi
Neither: π≈3.14159\pi \approx 3.14159
Irrational
Proved: no integer over a nonzero integer equals it
0.121121112…0.121121112\ldots, where each group of 1s is one digit longer than the last
Neither: it never ends, and the groups of 1s keep growing
Irrational
No fixed block of digits repeats forever

The big idea: a number is rational when you can write it as pq\frac{p}{q}, where pp and qq are integers and q≠0q \neq 0. Its decimal form then terminates or repeats. A number on the number line with no such fraction is irrational, and its decimal form neither terminates nor repeats. Always classify the exact number, not an approximation of it.

Next, you'll use long division to write fractions as decimals, sort those decimals into terminating and repeating, and see why the decimal form of a rational number has to do one or the other.