Introduction

Welcome to The Real Number System and Irrationality, the third course in our learning path! In the first two courses, we built a thorough understanding of rational numbers: what they are, how their decimal expansions behave, and how to convert between fractions and decimals. That foundation is about to pay off in a big way.

In this first lesson, we introduce a completely new family of numbers called irrational numbers. We will define them precisely, connect that definition to a specific kind of decimal expansion, and see why they are essential for completing the number line. Let's get started.

A Quick Refresher on Rational Numbers

As you may recall from our previous courses, a rational number is any number that can be written in the form ab\frac{a}{b}, where aa and bb are both integers and b0b \neq 0. This single requirement captures a wide variety of numbers: whole numbers like (since ), negative fractions like , and familiar decimals like (which equals ).

Defining Irrational Numbers

If rational numbers are those that can be written as ab\frac{a}{b} with integers aa and b0b \neq 0, then the definition of an irrational number is refreshingly straightforward:

The Decimal Signature of Irrationals

Because every rational decimal either terminates or eventually repeats, an irrational number must do something different. Its decimal expansion goes on forever without ever settling into a repeating cycle. This gives us a powerful equivalent way to characterize irrationals:

A number is irrational if and only if its decimal expansion neither terminates nor eventually repeats.

Let's look at a few examples side by side to make this concrete:

NumberDecimal FormBehaviorClassification
34\frac{3}{4}0.750.75TerminatesRational
Filling the Gaps on the Number Line

Imagine plotting every rational number on the number line. You might expect the line to be completely filled, since between any two rationals there is always another rational. Surprisingly, even though rationals are packed that densely, they still leave gaps.

To visualize this, think of it like this: if you only used rational numbers, your number line would look like a solid fence that, under a microscope, is actually made of disconnected dots. Adding irrational numbers "welds" those dots together into a solid, continuous line.

Here is one way to see a gap. Consider the point on the number line that sits at a distance of exactly 2\sqrt{2} from the origin. We know 2\sqrt{2} is somewhere between and because and . A more precise decimal approximation is , and those digits continue forever without repeating. No rational number occupies that exact spot, so there is genuinely a "hole" in the rationals at that location.

Conclusion and Next Steps

In this lesson you learned that an irrational number is one that cannot be written as ab\frac{a}{b} with integers aa and b0b \neq 0, and equivalently, its decimal expansion neither terminates nor eventually repeats. We also saw that infinitely many decimal digits alone do make a number irrational — the digits must lack any repeating cycle. Finally, we explored how irrational numbers fill the gaps that rationals leave on the number line, and how rationals and irrationals together form the complete set of .

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal