Rational and irrational numbers

Every number you have ever written down — a page number, a cricket score, π\pi in a circle formula, the diagonal of a unit square — belongs somewhere inside one giant nested system of number sets. Class 9 arithmetic draws the first sharp line inside that system: numbers that can be written exactly as a fraction of integers, called rational, versus numbers whose decimal expansion runs forever without ever settling into a repeating block, called irrational. The split sounds abstract, but it is entirely decidable from a number's decimal expansion, and it decides real exam questions: is 16\sqrt{16} rational, is 2.7‾2.\overline{7} rational, can you always squeeze a rational and an irrational number between 22 and 33? This section builds the classification rule, proves that recurring decimals are always fractions in disguise, and drills the traps examiners love — perfect-square roots, "non-terminating means irrational," and the surprising fact that two irrationals can add up to something perfectly rational.

The core insight

A number is rational exactly when it can be written as pq\dfrac{p}{q} with integers p,qp, q and q≠0q \neq 0 — equivalently, when its decimal expansion terminates or repeats — and irrational otherwise.

The core idea

The nested number system. Every number set a Class 9 student meets sits inside the next:

N⊂W⊂Z⊂Q⊂RN \subset W \subset Z \subset Q \subset R

where: N=1,2,3,…N = 1, 2, 3, \dots are the Natural numbers, W=0,1,2,…W = 0, 1, 2, \dots are the Whole numbers, Z=…,−2,−1,0,1,2,…Z = \dots, -2, -1, 0, 1, 2, \dots are the Integers, QQ is the set of Rational numbers, and RR is the set of Real numbers. Irrational numbers are exactly the leftovers, R∖QR \setminus Q — real numbers that are not rational.

The rational test. A number is rational if it can be written as pq\dfrac{p}{q} where pp and qq are integers and q≠0q \neq 0. Every integer is automatically rational, since n=n1n = \dfrac{n}{1}. Equivalently — and this is the test you actually use on a decimal — a number is rational exactly when its decimal expansion terminates (like 0.750.75) or repeats in a fixed block forever (like 0.333…0.333\ldots or 0.145‾0.1\overline{45}).

The irrational test. A number is irrational if it cannot be written as a ratio of two integers at all. Its decimal expansion goes on forever without ever locking into a repeating pattern — non-terminating and non-recurring. Famous examples are 2\sqrt2, 3\sqrt3, 5\sqrt5, and π\pi.

Density and arithmetic behaviour. Between any two rational numbers there lie infinitely many rational numbers, and infinitely many irrational numbers too — both types pack the real line densely, with no "next" number after any given one. For arithmetic: rational ±\pm, ×\times, ÷\div (non-zero divisor) rational stays rational; rational ±\pm non-zero irrational is always irrational; but irrational ++ irrational can land back on a rational number, e.g. 2+(−2)=0\sqrt2 + (-\sqrt2) = 0.

Figure
A branching diagram showing natural numbers inside whole numbers inside integers inside rational numbers inside real numbers with irrational numbers as the leftover region of real numbers
The nested number system Real numbers R Rational numbers Q Integers Z Whole W Natural N 1, 2, 3 ... 0 joins here negatives join here p/q fractions join here Irrational numbers R minus Q — the leftover region non-terminating, non-recurring decimals e.g. sqrt2, sqrt3, sqrt5, pi
Derivation AConverting a recurring decimal to p/q

The main grounded technique of this topic is showing that every recurring decimal genuinely is a rational number, by producing its exact pq\dfrac{p}{q} form through a subtraction trick that cancels the infinite repeating tail; the same three-step method works whether the repeating block starts right after the decimal point or after some non-repeating digits, and mastering it is what lets you settle any "is this decimal rational" question with certainty rather than a guess.

Step 1. Let xx equal the recurring decimal, and identify the length of the repeating block. For x=0.6‾=0.6666…x = 0.\overline{6} = 0.6666\ldots, the repeating block is a single digit, "6".

Step 2. Multiply xx by 10k10^k, where kk is the block length, so the decimal point shifts exactly one block to the right and the repeating tails of 10kx10^k x and xx line up perfectly. Here k=1k = 1, so 10x=6.6666…10x = 6.6666\ldots

Step 3. Subtract xx from 10kx10^k x. The infinite repeating tails cancel exactly, leaving a finite equation: 10x−x=6.6666…−0.6666…10x - x = 6.6666\ldots - 0.6666\ldots, so 9x=69x = 6.

Step 4. Solve for xx as a ratio of integers and simplify. x=69=23x = \dfrac{6}{9} = \dfrac{2}{3}. Since 22 and 33 are integers with 3≠03 \neq 0, this confirms xx is rational by definition — no recurring decimal can escape this reduction, which is why "repeats forever" is just as rational as "terminates." Verified: 10x−x=9x=6⇒x=6/9=2/310x - x = 9x = 6 \Rightarrow x = 6/9 = 2/3; checking, 2÷3=0.6666…2 \div 3 = 0.6666\ldots matches the original decimal.

Worked example

Classify each number as rational or irrational, with a reason, and if rational express it as pq\dfrac{p}{q}: (a) 16\sqrt{16} (b) 2.7‾2.\overline{7} (c) 0.101001000100001…0.101001000100001\ldots

Step 1. Evaluate (a). 16=4\sqrt{16} = 4 because 42=164^2 = 16; 1616 is a perfect square, so its square root is a whole number, 4=414 = \dfrac{4}{1}. This is rational.

Step 2. Convert (b) using the subtraction method. Let x=2.7‾=2.7777…x = 2.\overline{7} = 2.7777\ldots; the repeating block has length k=1k = 1, so 10x=27.7777…10x = 27.7777\ldots. Subtracting, 10x−x=27.7777…−2.7777…10x - x = 27.7777\ldots - 2.7777\ldots, giving 9x=259x = 25, so x=259x = \dfrac{25}{9}. This is rational.

Step 3. Examine (c). The digits follow a pattern of "one more zero each time between the 1s," but the block of zeros keeps growing — it never locks into a fixed repeating group. This decimal is non-terminating and non-recurring, so it is irrational.

Final answer: (a) rational, 4=414 = \dfrac{4}{1}; (b) rational, 259\dfrac{25}{9}; (c) irrational.

Competitive stretch

Find a rational and an irrational number strictly between 22 and 33. A rational choice is the average, 2+32=52=2.5\dfrac{2+3}{2} = \dfrac{5}{2} = 2.5, a clean ratio of integers with 2<2.5<32 < 2.5 < 3. An irrational choice can be built directly as 2.020020002…2.020020002\ldots, a decimal between 22 and 33 whose growing block of zeros never repeats; alternatively 5≈2.236\sqrt5 \approx 2.236 works too, since 4<5<94 < 5 < 9 gives 2<5<32 < \sqrt5 < 3.

Common traps

  • Assuming n\sqrt{n} is always irrational — it is irrational only when nn is not a perfect square; 25=5\sqrt{25} = 5 is rational.
  • Believing every non-terminating decimal is irrational — a decimal that repeats forever, even in a long block, is still rational, as the subtraction method proves.
  • Thinking "irrational" means "cannot be written down or does not really exist" — irrational numbers are exact, well-defined real numbers; they simply have no exact fraction form.
  • Forgetting q≠0q \neq 0 in pq\dfrac{p}{q} — division by zero is undefined and plays no role in deciding rationality.
  • Assuming that because two numbers both involve a square root they must both be irrational — always check whether the number under the root is a perfect square first.

Ask the tutor: Want to practise classifying trickier decimals or converting longer repeating blocks to pq\dfrac{p}{q} — ask your AI tutor for a fresh set of examples.

Why does the subtraction trick always work, even for very long repeating blocks

Multiplying xx by 10k10^k, where kk is the length of the repeating block, shifts the decimal point exactly one full block to the right. Because the block repeats forever, the digits after the new decimal point in 10kx10^k x are identical to the digits after the decimal point in xx. Subtracting xx from 10kx10^k x cancels that infinite tail completely, leaving a finite whole number on the right and (10k−1)x(10^k - 1)x on the left — always solvable for a ratio of integers.

Is 0.999999 repeating forever actually equal to 1

Yes, exactly, not approximately. Let x=0.9‾x = 0.\overline{9}. Then 10x=9.9‾10x = 9.\overline{9}, so 10x−x=9.9‾−0.9‾=910x - x = 9.\overline{9} - 0.\overline{9} = 9, giving 9x=99x = 9, so x=1x = 1. The subtraction method that classifies recurring decimals as rational also proves this identity — it is not a rounding convention but an equality.

How can pi be irrational when we use 22/7 or 3.14 for it in problems

Both 227\dfrac{22}{7} and 3.143.14 are only close rational approximations of π\pi, used because π\pi's true decimal expansion never terminates and never repeats, so it cannot be written exactly as any ratio of integers. Check: 227=3.142857…\dfrac{22}{7} = 3.142857\ldots, which already differs from π=3.14159265…\pi = 3.14159265\ldots after two decimal places. For everyday classroom accuracy the approximation is fine, but π\pi itself stays irrational.

Before this

Where this leads