Your textbook says a decimal is irrational if it is non-terminating and non-repeating. You read that as one condition, not two. A lot of students do. And then they run into 0.333\dots and think "well, this one never ends, so it must be irrational." It is not. It equals 1/3.

This article separates the two conditions, shows you the three possible types of decimal, and pins down exactly which combinations correspond to which kinds of number.

Three kinds of decimal, not two

When you convert a number to decimal (by long division or by any other method), one of three things happens. Exactly one.

Type 1. The decimal terminates.

The digits run out. Examples:

\tfrac{1}{4} = 0.25 \qquad \tfrac{3}{8} = 0.375 \qquad \tfrac{7}{20} = 0.35

Terminating decimals are always rational. You can prove it in one line: 0.25 = 25/100, 0.375 = 375/1000, 0.35 = 35/100. Any terminating decimal is a fraction with a denominator that is a power of 10.

Type 2. The decimal is non-terminating but repeats.

The digits never stop, but they fall into a repeating cycle. Examples:

\tfrac{1}{3} = 0.333\,333\dots \qquad \tfrac{1}{7} = 0.142857\,142857\,\dots \qquad \tfrac{5}{11} = 0.4545\,4545\dots

Non-terminating repeating decimals are also rational. The proof is the "multiply and subtract" trick: if x = 0.\overline{27} (that is, 0.272727\dots), then 100x - x = 27, so x = 27/99 = 3/11.

Type 3. The decimal is non-terminating AND non-repeating.

The digits never stop and they never fall into any repeating cycle. Examples:

\sqrt{2} = 1.414213562\dots \qquad \pi = 3.141592653\dots \qquad e = 2.718281828\dots

These are irrational. By definition, they cannot be written as p/q with integer p and nonzero integer q.

Three mutually exclusive types of decimal expansion Three rows, each showing one type of decimal. The top row is "terminating" with the example one quarter equals zero point two five and a note that this is rational. The middle row is "non-terminating but repeating" with the example one third equals zero point three repeating and a note that this is also rational. The bottom row is "non-terminating and non-repeating" with the example root two equals one point four one four two one three five six and so on, and a note that only this type is irrational. Type 1. Terminates 1/4 = 0.25 rational ✓ (terminating ⇒ always rational) Type 2. Non-terminating, but repeats 1/3 = 0.3333… rational ✓ (repeating block ⇒ rational; see 0.2727… = 3/11) Type 3. Non-terminating AND non-repeating √2 = 1.41421356… irrational ✗
Three types of decimal. Both "terminates" and "non-terminating but repeats" are rational. Only the third combination — non-terminating *and* non-repeating — produces an irrational number. Reading the textbook phrase "non-terminating and non-repeating" as a single phrase, not a single condition, is the whole fix.

The textbook phrase, parsed carefully

Read the phrase non-terminating and non-repeating as two independent conditions joined by "and". A decimal is irrational if and only if both hold.

So 0.333\dots is non-terminating but repeating, which puts it in Type 2 — still rational. The second condition fails, so the decimal is not irrational.

Students who read "non-terminating and non-repeating" as a single condition usually collapse both words into "just never ends." With that collapsed reading, 0.333\dots looks like it qualifies, and they conclude 1/3 is irrational. The fix is to separate the two words and check each one.

Why repeating decimals are rational

The deeper question is: why does every rational decimal fall into Type 1 or Type 2, never Type 3?

Here is the argument. Suppose you are dividing p \div q by long division, with q some positive integer. At each step, you write down a digit of the answer and carry a remainder. The possible remainders are 0, 1, 2, \dots, q - 1 — a finite set of q possibilities.

Now run the long division. At each step the remainder is one of those q values. After at most q steps, you have either:

There is no third option. The remainder at every step is an integer in \{0, 1, \dots, q-1\}, so by the pigeonhole principle, at most q distinct remainders can occur before one has to repeat. The decimal cannot "wander forever without repeating" — that is what Type 3 looks like, and it cannot arise from long division of integers.

Hence: every rational has a decimal expansion that either terminates or eventually repeats. Equivalently, every Type 3 decimal is not rational — it is irrational.

$1/7$ — watch the remainders cycle

Divide 1 by 7 step by step. At each step, the "remainder" is what is left over after the current digit is chosen.

step digit remainder
0 1
1 1 3
2 4 2
3 2 6
4 8 4
5 5 5
6 7 1
7 1 3

Look at step 6: the remainder is 1, the same as the starting remainder. From step 7 onward, the pattern of digits and remainders repeats identically. The decimal is 0.\overline{142857} — a repeating block of length 6.

Note that the possible nonzero remainders for dividing by 7 are \{1, 2, 3, 4, 5, 6\}, and the computation visited each of them exactly once before returning to 1. The maximum possible period for 1/q (when q is prime) is q - 1 — and 7 hits this maximum.

When does a decimal terminate?

Useful rule of thumb. A fraction p/q (in lowest terms) has a terminating decimal expansion if and only if the denominator q has no prime factors other than 2 and 5.

Why this rule works: a decimal terminates at n places exactly when p/q = N/10^n for some integer N. Rearranging, q divides 10^n, so q's prime factors are among those of 10^n = 2^n \cdot 5^n — which are exactly 2 and 5.

The cleanest reformulation of the textbook phrase

Replace the textbook's

a decimal is irrational if it is non-terminating and non-repeating

with this version, which is harder to misread:

a decimal is rational if it terminates OR eventually repeats. A decimal is irrational if it does neither.

Three types of decimal. Two of them are rational (Type 1 and Type 2). Only the third is irrational. Any decimal you ever write has to belong to exactly one of these three types — there is no fourth category.

Now 0.333\dots slots unambiguously into Type 2 (non-terminating but repeats), which makes it rational. \sqrt{2} slots into Type 3. 0.25 slots into Type 1. Each decimal you meet goes into exactly one box, and you can tell which box by running long division and watching for either termination or a repeated remainder.

Sanity check: 0.010010001\dots with more zeros each time

Try this one. 0.010010001000010000010000001\dots, with the number of zeros between consecutive 1s growing by one each time. Is this decimal rational or irrational?

Non-terminating? Yes — the digits never end.

Non-repeating? Yes — any proposed repeating block of length n would have to match the gap-growing structure, but the gaps grow without bound, so no fixed block can repeat forever.

Therefore Type 3. Therefore irrational. You have just constructed a specific irrational number by hand, without ever invoking \sqrt{\cdot}, \pi, or e. The digits are perfectly well-defined, the number is perfectly definite, and no ratio of integers will ever equal it.

That's what "non-terminating and non-repeating" really means — and why the two words are doing separate jobs.

This satellite sits inside Number Systems.