Numbers & Arithmetic

Rational vs Irrational Numbers: How to Tell Them Apart

A number is rational if it can be written as pq\frac{p}{q} with integers pp and qq and q≠0q\neq 0, and irrational if no such fraction exists. As decimals, rational numbers end or repeat a block forever, while irrational numbers never end and never repeat.

x=pq, p,q∈Z, q≠0x=\frac{p}{q},\ p,q\in\mathbb{Z},\ q\neq 0

Try it with your numbers

Show every step

So 34\frac{3}{4}, −7-7, 0.3‾0.\overline{3} and 49\sqrt{49} are rational, while 2\sqrt{2}, π\pi and 1+52\frac{1+\sqrt{5}}{2} are irrational. The sections below show how to sort any number quickly, why the sorting works, and where it trips people up.

What makes a number rational or irrational?

The word “rational” comes from ratio. Every integer is rational because 5=515=\frac{5}{1} and −3=−31-3=\frac{-3}{1}, and zero is rational because 0=010=\frac{0}{1}. Terminating decimals qualify too: 0.75=340.75=\frac{3}{4}. The only restriction is q≠0q\neq 0, since division by zero has no value.

Together, the rationals and irrationals make up the real number system, and they do not overlap. Every point on the number line is exactly one of the two. Numbers involving ii are neither, because they are not real. If you also need to sort numbers into natural, whole and integer, classifying real numbers covers those layers.

The trap here is appearance. A fraction bar does not make a number rational, and a root sign does not make it irrational. What matters is whether some fraction of two integers equals the number. That is why 82=2\frac{\sqrt{8}}{\sqrt{2}}=2 is rational while π2\frac{\pi}{2} is not.

Fraction bar, not a fraction

π2\frac{\pi}{2}, 22\frac{\sqrt{2}}{2} and 13\frac{1}{\sqrt{3}} are all irrational, because the top or bottom is not an integer and no integer fraction can equal them.

How do you tell rational from irrational in decimals?

Three fractions 7/40, 5/12 and 6/15 showing denominator primes decide whether the decimal terminates or repeats
Only 2s and 5s in the reduced denominator give a terminating decimal; any other prime forces a repeat.

A decimal that terminates or repeats is rational, and one that does neither is irrational. The reason is a clean one. When you divide pp by qq by long division, every step leaves a remainder from 00 to q−1q-1. A remainder of 00 ends the decimal. Otherwise, after at most qq steps a remainder must repeat, and from that point the digits cycle. So every fraction ends or repeats, with no exceptions.

You can predict which one without dividing. Reduce the fraction with simplifying fractions, then use prime factorization on the denominator. If the only primes are 22 and 55, the decimal terminates, because 10=2⋅510=2\cdot 5. Any other prime in the denominator forces a repeat. For example, 740\frac{7}{40} has 40=23⋅540=2^3\cdot 5, so it terminates: 0.1750.175. And 512\frac{5}{12} has 12=22⋅312=2^2\cdot 3, so it repeats: 0.416‾0.41\overline{6}.

Always reduce first. The fraction 615\frac{6}{15} has a 33 in its denominator, yet it equals 25=0.4\frac{2}{5}=0.4, which terminates. The second trap is mistaking a pattern for a repeat. The decimal 0.101001000100001…0.101001000100001\ldots has an obvious pattern, but the block keeps growing and never cycles, so the number is irrational. A calculator screen shows only about ten digits, so it can never settle the question. Structure decides, not digits.

Quick check

Does 730\frac{7}{30} terminate or repeat as a decimal?

Is a square root rational or irrational?

For a positive integer nn, n\sqrt{n} is either a whole number or irrational. There is no middle case. Check the perfect squares list or work out square roots by sandwiching: if nn falls strictly between two consecutive squares, it is not a perfect square, so n\sqrt{n} is irrational. For fractions in lowest terms, ab\sqrt{\frac{a}{b}} is rational only when both aa and bb are perfect squares. Cube roots follow the same rule with perfect cubes.

Worked example. Classify each number.

  • 196=14\sqrt{196}=14, so it is rational.
  • 200\sqrt{200}: 142=19614^2=196 and 152=22515^2=225, and 200200 sits strictly between them, so it is irrational.
  • 2581=59\sqrt{\frac{25}{81}}=\frac{5}{9}, so it is rational.
  • 0.09=9100=310\sqrt{0.09}=\sqrt{\frac{9}{100}}=\frac{3}{10}, so it is rational.
  • 0.9=910=310\sqrt{0.9}=\sqrt{\frac{9}{10}}=\frac{3}{\sqrt{10}}, and 1010 is not a perfect square, so it is irrational.
  • −643=−4\sqrt[3]{-64}=-4, so it is rational.

The last decimal pair is where points get lost. 0.09\sqrt{0.09} and 0.9\sqrt{0.9} look alike, but one is rational and the other is not. Convert the decimal to a fraction first, then test the numerator and denominator.

Why is the square root of 2 irrational?

Prime factor chips showing 12 and 72 have an odd prime count, so their roots are irrational, while 36 is rational
Group the prime factors in pairs: one leftover prime means the square root is irrational.

The ancient Greeks met this number as the diagonal of a unit square. By the Pythagorean theorem the diagonal dd satisfies d2=12+12=2d^2=1^2+1^2=2, and no fraction squares to 22. The standard proof assumes the opposite and reaches a contradiction.

Suppose 2=mn\sqrt{2}=\frac{m}{n} in lowest terms, so mm and nn share no factor. Squaring gives

m2=2n2.m^2=2n^2.

Then m2m^2 is even, so mm is even (an odd number squared is odd). Write m=2km=2k. Substituting gives 4k2=2n24k^2=2n^2, so n2=2k2n^2=2k^2, and nn is even too. Now both mm and nn are even, which contradicts lowest terms. The assumption fails, so 2\sqrt{2} is irrational.

The idea underneath is prime counting. In any perfect square, every prime appears an even number of times. In 2n22n^2, the prime 22 appears an odd number of times. One number cannot be both. The same argument works for any nn with a prime that appears an odd number of times: 12=22⋅312=2^2\cdot 3 has a single 33, so 12\sqrt{12} is irrational, while 36=22⋅3236=2^2\cdot 3^2 has only even counts, so 36=6\sqrt{36}=6 is rational.

The odd-exponent test

n\sqrt{n} is irrational exactly when some prime appears an odd number of times in nn. Since 72=23⋅3272=2^3\cdot 3^2 has three 22s, 72\sqrt{72} is irrational (it equals 626\sqrt{2}).

How do you convert a repeating decimal to a fraction?

This is the proof that repeating decimals are rational, and it is also a practical skill. Multiply by 10k10^k, where kk is the length of the repeating block, so the repeating tails line up. Then subtract so the tails cancel. The full method is in converting repeating decimals to fractions.

Worked example 1. Convert 0.36‾0.\overline{36}. Let x=0.36‾x=0.\overline{36}. The block has length 22, so 100x=36.36‾100x=36.\overline{36}. Subtract:

100x−x=36.36‾−0.36‾⇒99x=36.100x-x=36.\overline{36}-0.\overline{36}\quad\Rightarrow\quad 99x=36.

Then x=3699=411x=\frac{36}{99}=\frac{4}{11}. Check by dividing: 4÷11=0.3636…4\div 11=0.3636\ldots, which matches.

Worked example 2. Convert 0.83‾0.8\overline{3}, where only the 33 repeats. Let x=0.83‾x=0.8\overline{3}. Then 10x=8.3‾10x=8.\overline{3} and 100x=83.3‾100x=83.\overline{3}. Subtract the first from the second: 90x=7590x=75, so x=7590=56x=\frac{75}{90}=\frac{5}{6}. Check: 5÷6=0.8333…5\div 6=0.8333\ldots, which matches.

The method also settles a famous argument. Let x=0.9‾x=0.\overline{9}. Then 10x=9.9‾10x=9.\overline{9}, so 9x=99x=9 and x=1x=1. The numbers 0.9‾0.\overline{9} and 11 are the same number, not two close ones.

Try this: Convert 0.27‾0.\overline{27} to a fraction with the subtract method, reduce it, then divide numerator by denominator to confirm the decimal comes back.

Adding and multiplying rational and irrational numbers

Closure rules tell you what to expect, and they are short enough to memorize.

Operation Result Example
rational + rational always rational 12+13=56\frac{1}{2}+\frac{1}{3}=\frac{5}{6}
rational + irrational always irrational 2+32+\sqrt{3}
nonzero rational ×\times irrational always irrational 12π\frac{1}{2}\pi
irrational + irrational either 2+(−2)=0\sqrt{2}+(-\sqrt{2})=0
irrational ×\times irrational either 2⋅8=4\sqrt{2}\cdot\sqrt{8}=4

The rational-plus-irrational rule has a one-line proof. If r+x=sr+x=s with rr and ss rational, then x=s−rx=s-r would be rational, a contradiction. The same argument works for products by dividing. The word “nonzero” matters: 0⋅π=00\cdot\pi=0 is rational.

Worked example. Classify each result.

  1. (5+7)(5−7)=52−(7)2=25−7=18(5+\sqrt{7})(5-\sqrt{7})=5^2-(\sqrt{7})^2=25-7=18, so it is rational.
  2. 12+3=23+3=33\sqrt{12}+\sqrt{3}=2\sqrt{3}+\sqrt{3}=3\sqrt{3}, so it is irrational. The distributive property is what lets 23+32\sqrt{3}+\sqrt{3} combine.
  3. 62=622=32\frac{6}{\sqrt{2}}=\frac{6\sqrt{2}}{2}=3\sqrt{2}, so it is irrational.

The mental check is to look for cancellation before assuming irrational. Cancellation comes from conjugate pairs like a+ba+\sqrt{b} and a−ba-\sqrt{b}, from opposite radicals, or from radicals that multiply to a perfect square.

Quick check

Is 18⋅8\sqrt{18}\cdot\sqrt{8} rational or irrational?

Are pi and 22/7 rational or irrational?

Pi is irrational, and 227=3.142857‾\frac{22}{7}=3.\overline{142857} is rational, so the two cannot be equal. They differ by about 0.00130.0013. Even 3.14=157503.14=\frac{157}{50} is rational. A better fraction is 355113\frac{355}{113}, which is within about 2.7×10−72.7\times 10^{-7} of π\pi but still not equal to it.

Irrational numbers come in two strengths. The number 2\sqrt{2} is a root of x2−2=0x^2-2=0, and the golden ratio 1+52\frac{1+\sqrt{5}}{2} is a root of x2−x−1=0x^2-x-1=0. Both are algebraic. The numbers π\pi and ee are transcendental: they are not roots of any nonzero polynomial with integer coefficients. Every transcendental number is irrational, but not the other way around.

Between any two real numbers there is a rational, so fractions can approximate anything as closely as you like. Yet the rationals are countable and the irrationals are not, so almost every real number is irrational. In practice, every calculator or computer value is a rational approximation, and how many digits to keep is a question for significant figures.

Where do irrational numbers show up in real problems?

In geometry, a square with integer side ss has diagonal s2s\sqrt{2}, which is irrational, and a circle with integer radius rr has circumference 2πr2\pi r, which is also irrational. Exact answers in construction and design are often left in radical or π\pi form for this reason.

In algebra, the discriminant decides everything for a quadratic with integer coefficients. If b2−4acb^2-4ac is a perfect square, the solutions are rational. If not, they are irrational. For 2x2−x−3=02x^2-x-3=0 the discriminant is 1+24=251+24=25, so x=1±54x=\frac{1\pm 5}{4} gives 32\frac{3}{2} and −1-1. For x2−2x−1=0x^2-2x-1=0 the discriminant is 88, which is not a square, so x=1±2x=1\pm\sqrt{2}. Try the quadratic formula practice problems to see the pattern repeat.

Logarithms hide irrationals too. Suppose log⁡23=pq\log_2 3=\frac{p}{q} with positive integers pp and qq. Then 2p/q=32^{p/q}=3, so 2p=3q2^p=3^q, which asks an even number to equal an odd one. That is impossible, so log⁡23\log_2 3 is irrational. The logarithm rules give the tools to move between these forms.

Quick check

Are the solutions of x2+x−3=0x^2+x-3=0 rational or irrational?

How can you check a classification quickly?

Run any number through these steps in order.

  1. If it is an integer, a fraction of integers, or a terminating or repeating decimal, it is rational.
  2. If it is a root, simplify first and test the number under the root against the perfect squares or cubes. Use the odd-exponent test for big numbers.
  3. Simplify any expression before judging it, since 502\frac{\sqrt{50}}{\sqrt{2}} is just 55.
  4. Apply the closure rules, then check for cancellation before calling a sum or product of irrationals irrational.

Two habits catch most errors. First, never decide from a calculator’s digits, because they are cut off and can only suggest an answer. Second, say the reason out loud: “rational because it equals 411\frac{4}{11}” or “irrational because 1010 is not a perfect square”. If you cannot name the reason, the classification is a guess.

Practice problems

0 of 5 solved

  1. Is 144\sqrt{144} rational or irrational?

  2. Does 1380\frac{13}{80} terminate or repeat as a decimal? Give the decimal.

  3. Write 0.45‾0.\overline{45} as a fraction in lowest terms.

  4. Is (4+10)(4−10)(4+\sqrt{10})(4-\sqrt{10}) rational or irrational? Find its value.

  5. Is 502+3\dfrac{\sqrt{50}}{\sqrt{2}}+\sqrt{3} rational or irrational?

Common questions

Is zero a rational or irrational number?

Zero is rational. It can be written as 01\frac{0}{1}, which is a ratio of two integers with a nonzero denominator.

Are all square roots irrational?

No. The square root of a perfect square is a whole number, so 25=5\sqrt{25}=5 is rational. A square root of a positive integer is irrational only when the number is not a perfect square, like 26\sqrt{26}.

Can two irrational numbers add up to a rational number?

Yes. 2+(−2)=0\sqrt{2}+(-\sqrt{2})=0 and (3+5)+(3−5)=6(3+\sqrt{5})+(3-\sqrt{5})=6. The sum or product of two irrational numbers can be either rational or irrational.

Is a repeating decimal rational or irrational?

Rational. Every repeating decimal equals a fraction of integers, which you can find by multiplying by a power of 10 and subtracting. For example, 0.3‾=130.\overline{3}=\frac{1}{3}.

Is pi rational or irrational?

Pi is irrational. Its decimal expansion never ends and never repeats. Values like 3.143.14 and 227\frac{22}{7} are rational approximations, not the true value of π\pi.

Are negative numbers rational?

Many are. Any negative integer, fraction or terminating or repeating decimal is rational, such as −4-4 or −38-\frac{3}{8}. A negative number like −7-\sqrt{7} is irrational.

Up next