Welcome back to The Real Number System and Irrationality! We are now on Lesson 4 of 5, so the finish line for this course is within reach. Over the previous three lessons, we built up a solid toolkit piece by piece: the definition of irrational numbers in Lesson 1, the famous constants π and e in Lesson 2, and the perfect-square test for square roots in Lesson 3.
Each of those lessons focused on one category of number at a time. In this lesson, we bring all of that knowledge together. Numbers can show up in many forms — fractions, terminating decimals, repeating decimals, square roots, or named constants — and our goal is to classify any of them as rational or irrational, quickly and with a clear justification. Think of this as the moment every individual skill combines into a single, confident decision.
Seeing the Whole Picture
A Unified Classification Checklist
Classifying Numbers: Worked Examples
Watch Out: Common Traps
Writing Brief Justifications
Conclusion and Next Steps
In this lesson, we combined all of the classification skills developed throughout the course into one unified decision process. Whether a number appears as a fraction, a decimal (terminating or repeating), a square root, or a named constant, the fundamental question remains the same: can it be expressed as a ratio of two integers? We also identified common traps — long repeating blocks, decimal approximations, and radicals hiding perfect squares — that can mislead hasty judgments.
Up next are practice exercises that will challenge you to classify a variety of numbers on the fly, match each one to the structural reason behind its classification, and even debunk a popular misconception with a well-chosen counterexample. Let's see how sharp your number sense has become!
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
Up to this point, we have learned separate rules: fractions of integers are rational, terminating decimals are rational, repeating decimals are rational, perfect-square roots are rational, and non-perfect-square roots along with constants like π and e are irrational. But in practice, numbers rarely arrive with a helpful label. We might encounter 115, 0.75, 20, and 3.14 side by side and need to sort each one on the spot.
The good news is that every classification comes down to one core question: Can this number be written as ba, where a and b are integers and b=0? If yes, it is rational. If no, it is irrational. Each form simply requires a different way of answering that same question, and we already know all of those ways.
To make our decision process efficient, here is a single reference table that captures everything we have learned in this course so far:
Form of the Number
Classification
Reason
Integer (e.g., −3, 0, 7)
Rational
Can be written as 1n
Fraction of integers (e.g., 115)
Rational
Already in ba form
Terminating decimal (e.g., 0.75)
Rational
Equals a fraction (e.g., 43)
Repeating decimal (e.g., 0.3)
Rational
Converts to a fraction (e.g., 31)
n, n is a perfect square (e.g., 49)
Rational
Equals a whole number (7)
n, n is not a perfect square (e.g., 5)
Irrational
No integer squares to n
Named constant (π, e)
Irrational
Proven non-terminating, non-repeating
When you see a number, the first step is to identify its form in the left column. The classification and reasoning then follow directly. Let's put this into action.
Below is a mixed collection of numbers, just as you might encounter them on a worksheet or in the real world. We will classify each one and note the reasoning.
Example 1 — 87:
This is already a fraction of two integers with a nonzero denominator. It is rational. We could also confirm that it equals 0.875, a terminating decimal.
Example 2 — 0.142857:
The bar notation tells us this decimal repeats. As you may recall from the earlier course on repeating decimals, every repeating decimal can be converted to a fraction. In fact, 0.142857=71. Despite the six-digit repeating block, this number is rational.
Example 3 — 16:
Since 42=16, we know 16=4, which is an integer. This is rational.
Example 4 — 20:
The nearest perfect squares are 16=42 and 25=52. Because 20 is not a perfect square, 20 is irrational.
Example 5 — 3.14:
This might look like π, but 3.14 is a terminating decimal. It equals 100314=50157, so it is rational.
Example 6 — π:
As we explored in Lesson 2, π has been proven irrational. Its decimal expansion (3.14159265…) neither terminates nor repeats. It is irrational.
Example 7 — 0.9:
This one can feel surprising. The repeating decimal 0.9 equals exactly 1 — a fact that can be proven algebraically. Since 1 is an integer, 0.9 is rational.
Certain numbers are practically designed to trip us up. Let's spotlight the three most common traps so they do not catch you off guard.
Trap 1 — Long repeating blocks look "random."
A decimal like 0.142857 has six repeating digits, and at first glance the digits might seem patternless. But length does not determine irrationality. What matters is whether the digits eventually settle into a cycle. If they do, the number is rational — no matter how long that cycle is.
Trap 2 — Decimal approximations resemble irrational numbers (and vice versa).
The value 3.14 is rational because it terminates, but π is irrational. Likewise, 1.41 is rational, but 2 is irrational. Always distinguish between the exact value of a number and a rounded approximation of it.
Trap 3 — A radical sign does not guarantee irrationality.
Seeing the 0 symbol does not automatically make a number irrational. As we practiced in Lesson 3, 49=7 and 100=10 are both perfectly rational. This even applies to fractions; for example, 94 is rational because (32)2=94. Always check whether the value under the radical has a rational square root before deciding.
Classifying a number is only half the job — being able to explain why is equally important. In Lesson 3, we practiced justifying square-root classifications specifically. Now we widen that skill to cover every number form on our checklist. A strong justification follows a simple recipe: name the form of the number, then connect it to the definition of rational or irrational. Here are two models:
"0.3 is rational because it is a repeating decimal, and every repeating decimal can be expressed as a ratio of integers. Specifically, 0.3=31."
"45 is irrational because 45 is not a perfect square — 62=36 and 72=49, so no integer squared equals 45."
Notice that neither justification is long. Each one names the type of number, states the relevant rule, and optionally provides a specific calculation. Avoid vague statements like "the decimal is very long" or "it looks random" — these observations are not proofs. Always tie your reasoning back to whether the number can or cannot be written as ba with a and b integers.