Numbers & Arithmetic

Classifying Real Numbers

Classifying real numbers means simplifying a number to its true value, then naming every set it belongs to: natural, whole, integer, rational or irrational. The sets are nested, so 55 belongs to the first four at once, while 5\sqrt{5} belongs only to the irrational numbers.

natural⊂whole⊂integers⊂rational⊂real\text{natural} \subset \text{whole} \subset \text{integers} \subset \text{rational} \subset \text{real}

Try it with your numbers

Show every step

The label depends on the value, never on how the number is written. The numbers 124\frac{12}{4}, 9\sqrt{9} and 2.9‾2.\overline{9} look different and all equal the integer 33. This guide shows how to see through the disguise, and it fits into the bigger picture on The Real Number System page.

How does classifying real numbers work?

There are five labels. Natural numbers are the counting numbers 1,2,3,…1, 2, 3, \dots. Whole numbers add 00. Integers add the negatives, giving …,−2,−1,0,1,2,…\dots, -2, -1, 0, 1, 2, \dots. Rational numbers are every number that can be written as ab\frac{a}{b} with aa and bb integers and b≠0b \neq 0. Irrational numbers are the real numbers that cannot be written that way. Rational and irrational numbers together fill the whole number line, and that complete set is written R\mathbb{R}.

The first four sets nest like boxes, each inside the next:

natural⊂whole⊂integers⊂rational⊂real\text{natural} \subset \text{whole} \subset \text{integers} \subset \text{rational} \subset \text{real}

Irrational numbers are the other piece of R\mathbb{R}. Because irrational means “real but not rational”, the two groups never overlap, and every real number lands in exactly one of them. For a closer look at that split, see Rational vs Irrational Numbers.

Integers count as rational because n=n1n = \frac{n}{1}. That single idea explains why the chain runs upward without gaps: a number with the label “natural” automatically earns all the labels to its right.

Number Natural Whole Integer Rational Irrational
77 yes yes yes yes no
00 no yes yes yes no
−3-3 no no yes yes no
34\frac{3}{4} no no no yes no
2\sqrt{2} no no no no yes

Quick check

What is the smallest set in the chain (natural, whole, integers, rational) that contains −5-5?

Is zero a natural number?

It depends on the convention, and this is the one place where textbooks disagree. Most US algebra courses start the natural numbers at 11 and create the whole numbers specifically to add 00. Many college and computer science texts start N\mathbb{N} at 00. Use the definition your course uses, because zero is the only thing separating those two sets.

Everything else about zero is settled: it is whole, an integer, rational (as 01\frac{0}{1}) and real. It is neither positive nor negative.

Classify the value, not the notation

The expressions 5.05.0, 102\frac{10}{2} and 25\sqrt{25} are all just 55, so each one is natural, whole, an integer and rational.

The classic trap is calling every integer whole. Whole numbers stop at zero, so −4-4 is an integer but not whole. Taking the absolute value of any integer does land you in the whole numbers, since ∣−4∣=4|-4| = 4, which is a handy way to remember that whole means “no negatives”.

How to classify decimals as rational or irrational

Comparison of 7/40 terminating and 1/12 repeating by prime factors of the denominator
The denominator 40 uses only 2s and 5s so 7/40 ends, but the 3 in 12 makes 1/12 repeat.

Every real number has a decimal form, and that form sorts it into one of three types:

  • The decimal terminates, like 0.3750.375: rational.
  • The decimal repeats in a fixed block forever, like 0.27‾0.\overline{27}: rational.
  • The decimal never ends and never settles into a repeating block, like π\pi: irrational.

The reasoning is short. A terminating decimal is a fraction over a power of ten, so 0.375=37510000.375 = \frac{375}{1000}. A repeating decimal can be shifted and subtracted to produce a fraction, as shown in Converting Repeating Decimals to Fractions.

Two traps cost points here. A long, messy-looking decimal is not automatically irrational: 0.1234567890120.123456789012 stops, so it is rational. And a calculator cannot prove irrationality, because it only shows a finite window of digits. A number like 0.101001000100001…0.101001000100001\ldots is irrational because its pattern keeps changing (one more zero each time) instead of repeating.

A faster test works on fractions. In lowest terms, ab\frac{a}{b} terminates exactly when bb has no prime factors except 22 and 55, because only those primes divide a power of 1010. So 740\frac{7}{40} terminates (40=23⋅540 = 2^3 \cdot 5, and the decimal is 0.1750.175), while 112\frac{1}{12} repeats (12=22⋅312 = 2^2 \cdot 3, and the decimal is 0.083‾0.08\overline{3}).

Example 1. Classify 2.9‾2.\overline{9}.

Let x=2.999…x = 2.999\ldots. Multiply by 1010 to shift the decimal point one place:

10x=29.999…10x = 29.999\ldots

Subtract the original equation to cancel the repeating tail:

10x−x=29.999…−2.999…⇒9x=27⇒x=310x - x = 29.999\ldots - 2.999\ldots \quad\Rightarrow\quad 9x = 27 \quad\Rightarrow\quad x = 3

So 2.9‾=32.\overline{9} = 3 exactly. It is natural, whole, an integer, rational and real.

Are square roots rational or irrational?

Number line of square roots from 1 to 30 with only five perfect squares rational
Only 1, 4, 9, 16 and 25 have rational roots, and the gaps between them grow by 2 each time.

The square root of a positive integer is either a whole number or irrational, with nothing in between. If the number under the root is a perfect square, simplify to an integer. If not, the root is irrational. Memorizing the perfect squares list makes this nearly instant, and the mechanics of simplifying live on the Square Roots page.

Here is why there is no middle case. In a perfect square, every prime factor appears an even number of times. Suppose n=pq\sqrt{n} = \frac{p}{q} in lowest terms. Then nq2=p2n q^2 = p^2, and comparing prime exponents shows every prime in nn must appear an even number of times, so nn is a perfect square. You can test this with prime factorization: 72=23⋅3272 = 2^3 \cdot 3^2 has an odd exponent on 22, so 72\sqrt{72} is irrational.

Try this: List 1\sqrt{1} through 30\sqrt{30} and mark which values are rational. Exactly 5 appear, and the gaps between them keep growing.

Fractions and cube roots follow the same logic. A root of a fraction is rational when both parts are perfect squares, so 916=34\sqrt{\frac{9}{16}} = \frac{3}{4}, but 29=23\sqrt{\frac{2}{9}} = \frac{\sqrt{2}}{3} is irrational. Odd roots of negatives are real: −273=−3\sqrt[3]{-27} = -3, and 103\sqrt[3]{10} is irrational because 1010 is not a perfect cube (see Cube Roots).

Example 2. Classify each number.

(a) −81-\sqrt{81}. Since 81=9\sqrt{81} = 9, the value is −9-9. It is an integer and rational, but not natural or whole.

(b) 50\sqrt{50}. Factor 50=2⋅5250 = 2 \cdot 5^2. The prime 22 appears once, an odd count, so 5050 is not a perfect square. The root simplifies to 525\sqrt{2} and is irrational.

(c) 4925\sqrt{\dfrac{49}{25}}. Both 4949 and 2525 are perfect squares, so the value is 75\dfrac{7}{5}. It is rational but not an integer.

Quick check

Classify −1253\sqrt[3]{-125}.

Why the square root of a negative number is not real

Squaring a real number never gives a negative result. A positive times a positive is positive, a negative times a negative is positive, and 02=00^2 = 0. So no real number squared equals −4-4, which means −4\sqrt{-4} is not a real number. It equals 2i2i, an imaginary number, and real and imaginary numbers together form the complex numbers.

The same logic covers every even root: −164\sqrt[4]{-16} is not real, but odd roots such as −83=−2\sqrt[3]{-8} = -2 are perfectly real. A classification question that includes −9\sqrt{-9} is often checking whether you notice it has no place in any of the five sets.

Other things that are not real numbers: 50\frac{5}{0} is undefined, and the symbol ∞\infty describes unbounded growth rather than a number. The same restriction appears in the Logarithm Rules, where log⁡(−3)\log(-3) has no real value.

Is a rational plus an irrational number irrational?

Yes, and the proof takes two lines. Suppose r+s=qr + s = q where rr and qq are rational and ss is irrational. Then s=q−rs = q - r, a difference of two fractions, which is rational. That contradicts ss being irrational, so the sum must be irrational. So 3+53 + \sqrt{5} and 5−35 - \sqrt{3} are irrational.

Products work the same way, with one exception. A nonzero rational times an irrational is irrational, so 323\sqrt{2} and π2\frac{\pi}{2} are irrational. But 0⋅2=00 \cdot \sqrt{2} = 0, which is rational, so the word “nonzero” matters.

Irrational plus irrational: no guarantee

2+(−2)=0\sqrt{2} + (-\sqrt{2}) = 0 and 2⋅8=4\sqrt{2} \cdot \sqrt{8} = 4 are rational, yet 2+3\sqrt{2} + \sqrt{3} is irrational.

When both numbers are irrational, calculate instead of guessing. A useful pattern is the conjugate pair: (2+3)(2−3)=4−3=1\left(2+\sqrt{3}\right)\left(2-\sqrt{3}\right) = 4 - 3 = 1. Two irrational numbers produce a rational one, which is exactly why multiplying by a conjugate removes roots from a denominator.

Classifying real numbers in expressions and fractions

Evaluate first, classify second. When an expression has several operations, follow the Order of Operations to reach a single value, then run the checks from the earlier sections.

Fractions need one extra step. A fraction ab\frac{a}{b} with integers aa and bb and b≠0b \neq 0 is always rational, but it is an integer only when bb divides aa. Reduce it with the steps in Simplifying Fractions: 124=3\frac{12}{4} = 3 is natural, 05=0\frac{0}{5} = 0 is whole, and 50\frac{5}{0} is undefined. The trap runs the other way too: 22\frac{\sqrt{2}}{2} and π2\frac{\pi}{2} are written like fractions but are irrational, because the top is not an integer.

Example 3. Classify (a) 2⋅184\dfrac{\sqrt{2}\cdot\sqrt{18}}{4} and (b) (3+2)−2\left(3+\sqrt{2}\right)-\sqrt{2}.

(a) Combine the roots: 2⋅18=36=6\sqrt{2}\cdot\sqrt{18} = \sqrt{36} = 6. Then divide:

64=32\frac{6}{4} = \frac{3}{2}

The result is rational, not an integer, and real.

(b) Remove the parentheses: 3+2−2=33 + \sqrt{2} - \sqrt{2} = 3. The irrational parts cancel, leaving a number that is natural, whole, an integer, rational and real.

Quick check

Is 09\dfrac{0}{9} a natural number, a whole number, or neither?

How to check your classification

Four steps catch nearly every error:

  1. Simplify to a single value: evaluate roots, reduce fractions, finish all operations.
  2. Rule out non-real values: even roots of negatives and division by zero.
  3. Decide rational or irrational: a terminating or repeating decimal, or a ratio of integers, means rational.
  4. If rational, test the chain from the inside out: positive integer (natural), then zero or positive integer (whole), then integer.

Two quick sanity checks help. First, the labels must have no gaps: if you tick “whole”, you must also tick “integer” and “rational”. Second, bracket roots between perfect squares. Since 49<50<6449 < 50 < 64, you know 7<50<87 < \sqrt{50} < 8, so it cannot be an integer, which agrees with the factoring result.

Where classifying real numbers is used in real life

Programming depends on it. Integer types store counting-style values exactly, while decimal (floating point) types store only finite approximations, so a computer holds a rational stand-in for π\pi or 2\sqrt{2}. That is why many languages report 0.1+0.20.1 + 0.2 as 0.300000000000000040.30000000000000004.

Measuring and counting also use different sets. People count with natural numbers and measure with real numbers. Every recorded measurement is a terminating decimal, so it is rational, even if the true quantity is irrational: the diagonal of a unit square is exactly 2\sqrt{2}, but a ruler reads about 1.411.41. Writing very large or small measurements in Scientific Notation keeps those approximations compact.

In algebra, classification tells you where an answer can live. The equation x2=2x^2 = 2 has no rational solution, which is why irrational numbers were needed, and x2=−4x^2 = -4 has no real solution, which is why complex numbers exist.

Practice problems

0 of 5 solved

  1. Classify −12-12 as natural, whole, integer, rational or irrational.

  2. Classify 121\sqrt{121}.

  3. Classify 0.45‾0.\overline{45}.

  4. Classify 72\sqrt{72}.

  5. Classify (2+3)(2−3)\left(2+\sqrt{3}\right)\left(2-\sqrt{3}\right).

Common questions

What are the types of real numbers?

Real numbers split into rational and irrational numbers. Inside the rational numbers sit the integers, inside those the whole numbers, and inside those the natural numbers.

Is zero a real number, an integer and a whole number?

Yes to all three, and it is rational too because 0=010 = \dfrac{0}{1}. Whether zero is also natural depends on your textbook: most US algebra courses start natural numbers at 11.

Is a repeating decimal rational or irrational?

Rational. Any decimal that repeats in a fixed block can be written as a fraction of two integers, for example 0.3‾=130.\overline{3} = \dfrac{1}{3}.

Can a number be both rational and irrational?

No. Irrational means not rational, so the two sets share no numbers. A number that looks irrational, such as 49\sqrt{49}, may simplify to a rational value like 77.

Is pi rational or irrational?

Pi is irrational. Its decimal form never ends and never repeats. The common stand-ins 3.143.14 and 227\dfrac{22}{7} are rational approximations, not pi itself.

Is the square root of a negative number a real number?

No. No real number squared gives a negative result, so −4\sqrt{-4} is not real. It equals 2i2i, an imaginary number.

Up next