Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Rational and irrational numbers

~9 min

\mathbb{Q} and \mathbb{R} look close in the nested-boxes picture from §2, but the gap between them is enormous — most real numbers are irrational, not rational, even though every rational number you'll ever write down by hand looks perfectly ordinary. This section sharpens exactly what separates the two.

A rational number is a fraction wearing a decimal costume. No matter how it's dressed, \frac13 is secretly still a clean ratio of two whole numbers. Its decimal gives it away by settling into an exact repeating pattern forever. An irrational number's decimal never settles down that way. Take \pi, pronounced "pie": the number you get by dividing any circle's distance around by the distance across. Compute a million more of its digits and you will never spot a repeating block. There genuinely isn't one to find. Nobody has simply failed to look hard enough. It's a proven fact about what \pi is.

A real number x is rational if x = \frac{a}{b} for some integers a, b with b \neq 0; otherwise x is irrational. Every rational number's decimal expansion either terminates (\frac{1}{4}=0.25) or eventually repeats forever (\frac{1}{3}=0.\overline{3}) — this is a theorem, not a coincidence, though proving it isn't this section's job. An irrational number's decimal expansion never terminates and never settles into a repeating block, no matter how far out you compute it. \sqrt{2}, \pi, and e are all irrational; none of these facts are obvious from the definition alone, and \sqrt{2}'s irrationality gets a full proof once Chapter 4 has proof by contradiction in hand. The two classes don't behave symmetrically under arithmetic, either: two irrationals can add to a rational (\sqrt{2} + (-\sqrt{2}) = 0), so "irrational" is a property of a single number, never something you can predict just by knowing an expression involves an irrational piece.

Rational or irrational

Sort each number by whether it can be written as a ratio of two integers.

Loading interactive…

Rationals and irrationals, side by side

Drag the probe -- every point it can land on is real, but only some of those points are rational; the marked ones below are rational approximations of famous irrationals.

Loading interactive…

Worked example

Classify a number given as a decimal

  1. 1

    Is 0.121212\ldots (repeating forever) rational or irrational?

  2. 2

    The pattern "12" repeats forever without ever breaking — that's exactly the signature of a rational number's decimal expansion.

  3. 3

    Every repeating decimal equals some fraction; here 0.\overline{12} = \frac{12}{99} = \frac{4}{33}, so \boxed{0.121212\ldots \text{ is rational}}

Loading interactive…

Worked example

Classify a sum of a rational and an irrational

  1. 1

    Is 3 + \sqrt{2} rational or irrational?

  2. 2

    A common trap: "3 is rational and \sqrt2 is irrational, so their sum is some blend" — but rational and irrational aren't a spectrum; every real number is one or the other, with nothing in between.

  3. 3

    Suppose, toward a contradiction, 3+\sqrt2 = \frac{a}{b} were rational. Then \sqrt2 = \frac{a}{b} - 3 = \frac{a-3b}{b}, a ratio of two integers — making \sqrt2 rational too, which it isn't (Chapter 4 proves this directly; taken as known here).

  4. 4

    The assumption forced a false conclusion, so \boxed{3+\sqrt2 \text{ is irrational}} A rational number plus an irrational one is always irrational — only two irrationals can sometimes cancel back to something rational, e.g. \sqrt2 + (-\sqrt2) = 0.

Where this goes next

Chapter 4 (Methods of proof)

"\sqrt2 is irrational" is the single most common first proof students write, because Chapter 4's proof by contradiction technique fits it so exactly: assume \sqrt2 = \frac{a}{b} in lowest terms, square both sides, and show a and b must both be even — contradicting "lowest terms" outright. Every fact about rational and irrational numbers this section just asked you to trust gets proved from scratch there, using nothing more than the definitions you already have here.

Check your understanding (counts toward your progress)

Which of these is irrational?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

\sqrt2 cannot be written as a ratio of two integers -- proved in Chapter 4.

Which number is rational?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

0.75 = \frac{3}{4}, a ratio of two integers -- rational by definition.

A student argues 5+\pi must be rational because 5 is rational. What is the flaw?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Adding a rational number never changes irrationality -- if 5+\pi were rational, then \pi=(5+\pi)-5 would be a difference of two rationals, forcing pi to be rational too, which is false.

Which decimal pattern signals a rational number?

Correct! 🎉 Not quite.

Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.

Why

Terminating or eventually-repeating decimals are exactly the rationals; never-terminating, never-repeating decimals are irrational.

Feeling good about this section?

Take the section quiz

Every answer gets a full explanation at the end.

Graph settings

Calculator

Sign in to save highlights

Insert an equation

  • No matches.