Evanalysis
7.2Estimated reading time: 30 min

7.2 Rational and irrational numbers

Study rational numbers, irrational numbers, closure of Q, nonnegative nth roots, irrationality proofs for roots, and the perfect-square criterion for rational square roots.

Course contents

Why rational numbers are not enough

The integers are closed under addition, subtraction, and multiplication, but not under division. To solve equations such as

3x=2,3x=2,

we enlarge the number system from Z\mathbb Z to the rational numbers Q\mathbb Q. This enlargement is extremely useful: it allows fractions, it is stable under the four ordinary arithmetic operations, and it is still governed by integer divisibility through numerators and denominators.

However, even Q\mathbb Q is not large enough for all familiar equations. The equation

x2=2x^2=2

has a real solution, namely the nonnegative square root 2\sqrt2, but that solution is not rational. The purpose of this section is to make this contrast precise. We first record the arithmetic stability of rational numbers, then use prime divisibility to prove that certain roots cannot be rational.

Rational and irrational numbers

Definition

Rational and irrational numbers

Let x∈Rx\in\mathbb R.

  1. We say that xx is a rational number if there exist integers m,n∈Zm,n\in\mathbb Z such that n≠0n\ne0 and

    x=mn.x=\frac mn.
  2. We say that xx is irrational if xx is not rational.

The set of all rational numbers is denoted by Q\mathbb Q.

The denominator condition n≠0n\ne0 is essential. Division by zero is not defined, so a rational representation must always have a nonzero denominator. Also, rational representations are not unique:

12=24=−3−6.\frac12=\frac24=\frac{-3}{-6}.

When proving that a number is rational, it is enough to produce one valid fraction. When proving that a number is irrational, one must prove that no such fraction exists.

It is often convenient to reduce a rational number to lowest terms. If x∈Qx\in\mathbb Q and x>0x\gt 0, then we may write

x=abx=\frac ab

with a,b∈Z+a,b\in\mathbb Z^+ and gcd⁡(a,b)=1\gcd(a,b)=1. The condition gcd⁡(a,b)=1\gcd(a,b)=1 means that all common factors have already been cancelled. Many irrationality proofs begin by assuming such a lowest-terms representation and then showing that a prime divides both aa and bb, which is impossible.

To justify that normalization, start with any integer representation of a positive rational number. Its numerator and denominator have the same sign; change both signs if necessary, then divide both by their positive greatest common divisor. The value is unchanged and the resulting positive integers are relatively prime. Thus requiring lowest terms does not discard any possible positive rational value. It chooses a representation on which a common-factor contradiction has force.

Closure of the rational numbers

Theorem

Closure of Q under arithmetic

Let x,y∈Qx,y\in\mathbb Q.

  1. x+y∈Qx+y\in\mathbb Q, x−y∈Qx-y\in\mathbb Q, and xy∈Qxy\in\mathbb Q.
  2. If y≠0y\ne0, then x/y∈Qx/y\in\mathbb Q.

This theorem says that rational numbers are closed under the four arithmetic operations, except that division by zero is still excluded.

To prove it, write

x=mn,y=pq,x=\frac mn,\qquad y=\frac pq,

where m,n,p,q∈Zm,n,p,q\in\mathbb Z and n≠0n\ne0, q≠0q\ne0. Then

x+y=mq+npnq,x−y=mq−npnq,xy=mpnq.x+y=\frac{mq+np}{nq}, \qquad x-y=\frac{mq-np}{nq}, \qquad xy=\frac{mp}{nq}.

The numerators and denominators displayed here are integers, and the denominator nqnq is nonzero. Hence all three numbers are rational.

For division, suppose y≠0y\ne0. Since

y=pq,y=\frac pq,

the condition y≠0y\ne0 forces p≠0p\ne0. Therefore

xy=m/np/q=mqnp.\frac xy=\frac{m/n}{p/q}=\frac{mq}{np}.

Again the numerator and denominator are integers, and np≠0np\ne0, so x/yx/y is rational.

Closure has a direction: rational inputs give a rational output. It does not say that a rational output forces both inputs to be rational. Nor does it say that every equation with rational coefficients has a rational solution; root extraction is not one of the four operations proved above. In each use, identify the inputs and, for division, the particular quantity required to be nonzero. A displayed fraction alone is insufficient: its numerator and denominator must have the required number types. Dividing an irrational number by one does not produce an integer-fraction representation.

Worked example

Check rationality through explicit arithmetic

Take x=2/3x=2/3 and y=−5/4y=-5/4. A common denominator and the product formula give

x+y=−712,x−y=2312,xy=−56,xy=−815.x+y=-\frac7{12},\qquad x-y=\frac{23}{12},\qquad xy=-\frac56,\qquad \frac xy=-\frac8{15}.

For example, x−y=(8+15)/12x-y=(8+15)/12 because subtracting the negative numerator changes its sign. For the quotient, y≠0y\ne0, so multiplying by its reciprocal −4/5-4/5 is legal. Each result has an integer numerator and nonzero integer denominator. Reduction is convenient but unnecessary for this existence argument: even −10/12-10/12 proves that the product is rational. Lowest terms become essential later when a contradiction concerns common factors.

Theorem

Rational shifts and nonzero rational multiples

If r∈Qr\in\mathbb Q and s∈R∖Qs\in\mathbb R\setminus\mathbb Q, then r+sr+s is irrational. If also r≠0r\ne0, then rsrs is irrational.

If r+s=t∈Qr+s=t\in\mathbb Q, subtraction gives s=t−r∈Qs=t-r\in\mathbb Q, a contradiction. If rs=t∈Qrs=t\in\mathbb Q and r≠0r\ne0, division gives s=t/r∈Qs=t/r\in\mathbb Q, again a contradiction. These arguments use closure only on two quantities already known to be rational. In particular, −s-s is irrational by choosing r=−1r=-1 in the multiplication statement. There is no nonzero restriction on the rational summand in the addition statement.

Counterexample mode

Irrational inputs do not determine the output type

The tempting claim that two irrational inputs always have an irrational sum or product is false. Using the irrationality of 2\sqrt2 proved below,

2+(−2)=0,2⋅2=2.\sqrt2+(-\sqrt2)=0,\qquad \sqrt2\cdot\sqrt2=2.

Both inputs in each operation are irrational, but the outputs are rational. The opposite universal claim also fails: 2+2=22\sqrt2+\sqrt2=2\sqrt2 is irrational, and 2(1+2)=2+2\sqrt2(1+\sqrt2)=2+\sqrt2 is irrational. The mixed-operation theorem verifies these outputs and verifies that 1+21+\sqrt2 is an irrational input. Thus the examples satisfy their stated hypotheses.

The repaired rule fixes one input as rational: a rational shift preserves irrationality, and a rational multiple does so only when its multiplier is nonzero. The missing condition is witnessed by 0⋅2=00\cdot\sqrt2=0. This does not contradict the addition rule: 0+2=20+\sqrt2=\sqrt2 remains irrational.

Nonnegative nth roots

Definition

Nonnegative nth real root

Let n∈Z+n\in\mathbb Z^+, and let a,ρa,\rho be nonnegative real numbers. We say that ρ\rho is a nonnegative nn-th real root of aa if

ρn=a.\rho^n=a.

Theorem

Existence and uniqueness of nonnegative nth roots

Let n∈Z+n\in\mathbb Z^+, and let aa be a nonnegative real number. There is a unique nonnegative real number ρ\rho such that

ρn=a.\rho^n=a.

This number is denoted by

an.\sqrt[n]{a}.

The word "nonnegative" is doing important work. For square roots, both 33 and −3-3 satisfy x2=9x^2=9, but only 33 is the nonnegative square root. Thus

9=3,\sqrt9=3,

not ±3\pm3. The notation an\sqrt[n]{a} always refers to the unique nonnegative root when a≥0a\ge0.

For odd nn, negative real roots can also be discussed, but this section only needs the nonnegative root of a nonnegative real number.

The existence of an\sqrt[n]{a} is recorded here as a fact about the real numbers. Its full proof belongs to a later analysis course. In this section, we use the notation to ask a different question: when can such a root be rational?

Uniqueness can be checked without constructing the real numbers. If 0≤u<v0\le u\lt v, then vn>unv^n\gt u^n: for n=1n=1 this is immediate, and for n≥2n\ge2 it follows from

vn−un=(v−u)(vn−1+vn−2u+⋯+un−1)>0.v^n-u^n=(v-u)(v^{n-1}+v^{n-2}u+\cdots+u^{n-1})\gt0.

The first factor is positive, and the sum is positive because its first term is positive and the others are nonnegative. Consequently two different nonnegative numbers cannot have the same nnth power. Existence remains the stated real-number theorem, not a consequence of this uniqueness argument. At the boundaries, 0n=0\sqrt[n]{0}=0 and a1=a\sqrt[1]{a}=a. The condition n≥1n\ge1 excludes a zeroth-root interpretation.

Irrationality of 2\sqrt2

The first major example is the classical proof that 2\sqrt2 is not rational. The proof uses Euclid's lemma from integer divisibility:

p∣ab⟹p∣a or p∣bp\mid ab\quad\Longrightarrow\quad p\mid a\text{ or }p\mid b

when pp is prime. In particular, if a prime pp divides a2a^2, then pp divides aa.

Theorem

Irrationalityof2Irrationality of \sqrt{2}

The real number 2\sqrt2 is irrational.

Proof: Lowest terms, parity, and the contradiction

Assumption and goal. Suppose, for contradiction, that 2\sqrt2 is rational. Since it is positive, we may write

2=ab\sqrt2=\frac ab

where a,b∈Z+a,b\in\mathbb Z^+ and gcd⁡(a,b)=1\gcd(a,b)=1. Squaring both sides gives

2=a2b2,so2b2=a2.2=\frac{a^2}{b^2}, \qquad\text{so}\qquad 2b^2=a^2.

First dependency: the numerator is even. Hence 2∣a22\mid a^2. Since 22 is prime, Euclid's lemma implies 2∣a2\mid a. Write a=2ca=2c for some c∈Z+c\in\mathbb Z^+. Substituting this into 2b2=a22b^2=a^2 gives

2b2=(2c)2=4c2.2b^2=(2c)^2=4c^2.

Dividing by 22,

b2=2c2.b^2=2c^2.

Second dependency: the denominator is even. Thus 2∣b22\mid b^2, and again Euclid's lemma gives 2∣b2\mid b. We have shown that 22 divides both aa and bb, contradicting gcd⁡(a,b)=1\gcd(a,b)=1.

Contradiction and conclusion. Therefore the assumption that 2\sqrt2 is rational is false, and 2\sqrt2 is irrational.

Evenness of the numerator alone is not a contradiction: a reduced fraction can have an even numerator and an odd denominator, such as 2/32/3. The second use of prime divisibility is indispensable because it forces the denominator to be even as well. Conversely, obtaining two even numbers would say nothing about an unreduced representation such as 2/42/4. The lowest-terms assumption is what turns the common factor into an impossibility.

The structure of the proof is more important than the particular number 22. A rational representation in lowest terms cannot have a prime factor forced into both numerator and denominator. Irrationality proofs often look for exactly that contradiction.

Worked example

Uniqueness of rational coefficients with sqrt(3)

Let a,b,c,d∈Qa,b,c,d\in\mathbb Q, and suppose

a+b3=c+d3.a+b\sqrt3=c+d\sqrt3.

Assume that 3\sqrt3 is irrational. We prove that a=ca=c and b=db=d.

Move the rational terms to one side and the 3\sqrt3 terms to the other:

a−c=(d−b)3.a-c=(d-b)\sqrt3.

If d−b≠0d-b\ne0, then

3=a−cd−b.\sqrt3=\frac{a-c}{d-b}.

The numerator and denominator are rational numbers, and the denominator is nonzero, so the quotient is rational by closure of Q\mathbb Q under division. That contradicts the irrationality of 3\sqrt3. Therefore d−b=0d-b=0, so b=db=d. Substituting back gives a=ca=c.

This example shows a useful principle: over the rational numbers, the two pieces 11 and 3\sqrt3 cannot secretly imitate each other. A rational part and an irrational 3\sqrt3 part must match separately.

Irrationality of prime nth roots

The same idea proves a stronger result for roots of prime numbers.

Theorem

Prime nth roots are irrational

Let nn be an integer greater than 11, and let pp be a positive prime number. Then

pn\sqrt[n]{p}

is irrational.

Suppose, for contradiction, that pn\sqrt[n]{p} is rational. Since it is positive, write

pn=ab\sqrt[n]{p}=\frac ab

where a,b∈Z+a,b\in\mathbb Z^+ and gcd⁡(a,b)=1\gcd(a,b)=1. Raising both sides to the nn-th power gives

p=anbn,sopbn=an.p=\frac{a^n}{b^n}, \qquad\text{so}\qquad pb^n=a^n.

Hence p∣anp\mid a^n. By applying Euclid's lemma repeatedly, a prime dividing ana^n must divide aa. Therefore p∣ap\mid a, so write

a=pca=pc

for some c∈Z+c\in\mathbb Z^+. Substitute this into pbn=anpb^n=a^n:

pbn=(pc)n=pncn.pb^n=(pc)^n=p^n c^n.

Cancel one factor of pp:

bn=p n−1cn.b^n=p^{\,n-1}c^n.

Because n>1n\gt 1, the right-hand side is divisible by pp. Hence p∣bnp\mid b^n. Again, Euclid's lemma applied repeatedly gives p∣bp\mid b.

Thus pp divides both aa and bb, contradicting gcd⁡(a,b)=1\gcd(a,b)=1. Therefore pn\sqrt[n]{p} is irrational.

Common mistake

The exponent must exceed one

If n=1n=1, then p1=p\sqrt[1]{p}=p, which is an integer and therefore rational. The contradiction above needs pn−1p^{n-1} to contain at least one factor of pp.

When is n\sqrt n rational?

For square roots of positive integers, rationality has an exact answer: a positive integer has a rational square root precisely when it is already a perfect square.

Definition

Perfect square

An integer n∈Z+n\in\mathbb Z^+ is a perfect square if there exists an integer m∈Zm\in\mathbb Z such that

n=m2.n=m^2.

Theorem

Rational square-root criterion

Let n∈Z+n\in\mathbb Z^+. Then n\sqrt n is rational if and only if nn is a perfect square.

First suppose nn is a perfect square, say n=m2n=m^2 for some m∈Zm\in\mathbb Z. Since n>0n\gt 0, we have m≠0m\ne0, and the nonnegative square root is

n=∣m∣.\sqrt n=|m|.

This is an integer, hence rational.

Conversely, suppose n\sqrt n is rational. Write it in lowest terms as

n=ab,\sqrt n=\frac ab,

where a,b∈Z+a,b\in\mathbb Z^+ and gcd⁡(a,b)=1\gcd(a,b)=1. Squaring gives

nb2=a2.nb^2=a^2.

We claim that b=1b=1. If b>1b\gt 1, then bb has a prime divisor pp. Since p∣bp\mid b, we have p∣b2p\mid b^2, and the equation nb2=a2nb^2=a^2 implies p∣a2p\mid a^2. By Euclid's lemma, p∣ap\mid a. Thus pp divides both aa and bb, contradicting gcd⁡(a,b)=1\gcd(a,b)=1. Therefore b=1b=1.

So n=a\sqrt n=a, and hence

n=a2.n=a^2.

Thus nn is a perfect square.

The theorem explains why 4\sqrt4, 9\sqrt9, and 49\sqrt{49} are rational, while 2\sqrt2, 3\sqrt3, 5\sqrt5, 6\sqrt6, and 10\sqrt{10} are not. The question is not whether the decimal expansion looks simple; it is whether the integer under the square root is a square of an integer.

Notice the change of strategy from the prime-root proof. Here the integer nn need not be prime, so one cannot assume that n∣a2n\mid a^2 forces n∣an\mid a. Instead, choose a prime from the denominator if that denominator exceeds one. The argument shows that a rational square root of an integer must itself be an integer. Without the integer hypothesis on the radicand, this conclusion fails: 1/4=1/2\sqrt{1/4}=1/2 is rational but not an integer.

Worked example

Choose the theorem that applies to the radicand

For 49\sqrt{49}, the equality 49=7249=7^2 gives the nonnegative root 77. For 18\sqrt{18}, primality is unavailable because 1818 is composite. However, 42=16<18<25=524^2=16\lt18\lt25=5^2, so 1818 is not an integer square: any nonnegative integer is either at most 44 or at least 55. The square-root criterion therefore makes 18\sqrt{18} irrational.

For 74\sqrt[4]{7}, use the prime-root theorem with prime p=7p=7 and integer n=4>1n=4\gt1. Finally, 2+1132+\sqrt[3]{11} is irrational: the prime-root theorem handles 113\sqrt[3]{11}, and the rational-shift theorem handles the addition. These conclusions are exact. A finite decimal approximation would not prove that no rational representation exists.

Why some roots are irrational

Follow the contradiction proof behind sqrt(2): the same prime is forced into numerator and denominator, then the idea extends to prime roots and perfect squares.

  1. The gap in Q

    The rational numbers are closed under arithmetic, but the real equation x^2=2 has no rational solution.

  2. Lowest terms

    Assume sqrt(2)=a/b with positive integers a,b and gcd(a,b)=1; the contradiction must break that lowest-terms condition.

  3. Prime enters a

    Squaring gives 2b^2=a^2, so 2 divides a^2; Euclid's lemma then forces 2 to divide a.

  4. Prime enters b

    Writing a=2c and substituting back gives b^2=2c^2, so the same prime also divides b.

  5. Contradiction

    A lowest-terms fraction cannot have the same prime dividing both numerator and denominator, so sqrt(2) is irrational.

  6. Root tests

    The same proof pattern gives prime nth-root irrationality and the criterion sqrt(n) is rational iff n is a perfect square.

The proof of sqrt(2) is a lowest-terms contradiction: a prime is forced into both the numerator and denominator. The same pattern explains why prime nth roots are irrational and why sqrt(n) is rational exactly when n is a perfect square.

Quick checks

Checkpoint

What does it mean to prove that a real number xx is irrational?

Pay attention to the word "not" in the definition.

Solution · Answer

It means proving that there do not exist integers m,nm,n with n≠0n\ne0 such that x=m/nx=m/n.

Checkpoint

If x=m/nx=m/n and y=p/qy=p/q are rational numbers with nonzero denominators, why is xyxy rational?

Use the integer formula for the product.

Solution · Answer

We have xy=mp/(nq)xy=mp/(nq). Since mp,nq∈Zmp,nq\in\mathbb Z and nq≠0nq\ne0, the product is rational.

Checkpoint

Give one example where the sum of two irrational numbers is rational.

Use opposite irrational numbers.

Solution · Answer

For example, 2\sqrt2 and −2-\sqrt2 are irrational, but 2+(−2)=0\sqrt2+(-\sqrt2)=0, which is rational.

Checkpoint

In the proof that 2\sqrt2 is irrational, why do we first write 2=a/b\sqrt2=a/b with gcd⁡(a,b)=1\gcd(a,b)=1?

The contradiction concerns common divisors.

Solution · Answer

Every positive rational number can be written in lowest terms. If the proof then forces the same prime to divide both aa and bb, it contradicts gcd⁡(a,b)=1\gcd(a,b)=1.

Checkpoint

Why does p∣anp\mid a^n imply p∣ap\mid a when pp is prime?

Think of ana^n as a product of nn copies of aa.

Solution · Answer

Since an=a⋅a⋯aa^n=a\cdot a\cdots a, Euclid's lemma says that if the prime pp divides this product, then it divides at least one factor. Every factor is aa, so p∣ap\mid a.

Checkpoint

For a positive integer nn, what exact condition makes n\sqrt n rational?

State the criterion as an if and only if.

Solution · Answer

n\sqrt n is rational if and only if nn is a perfect square, meaning n=m2n=m^2 for some integer mm.

Summary

Rationality requires one integer-fraction representation; irrationality rules out every such representation. Closure proves the four arithmetic rules with the nonzero-divisor condition, and also supports contradiction arguments for rational shifts and nonzero rational multiples of irrational numbers.

Root proofs first fix the nonnegative real root, then test rationality using a reduced fraction. For prime radicands, prime divisibility forces a common factor into both terms. For a square root of a positive integer, any prime factor of the denominator would force a common factor, so the denominator must equal one. Keep existence, uniqueness, and rationality as separate questions, and check the hypotheses before choosing a theorem.

Exercises

  1. Prove directly from the definition that if x,y∈Qx,y\in\mathbb Q, then 3x−5y∈Q3x-5y\in\mathbb Q.
  2. Give examples showing that the sum and product of irrational numbers may be rational.
  3. Prove that if r∈Qr\in\mathbb Q, s∉Qs\notin\mathbb Q, and r≠0r\ne0, then rs∉Qrs\notin\mathbb Q.
  4. Let a,b,c,d∈Qa,b,c,d\in\mathbb Q. Suppose a+b3=c+d3a+b\sqrt3=c+d\sqrt3, and assume 3\sqrt3 is irrational. Prove that a=ca=c and b=db=d.
  5. Prove that 53\sqrt[3]{5} is irrational.
  6. Let n∈Z+n\in\mathbb Z^+. Prove that n\sqrt n is rational if and only if nn is a perfect square.
  7. Determine whether each number is rational or irrational: 16\sqrt{16}, 18\sqrt{18}, 74\sqrt[4]{7}, and 2+1132+\sqrt[3]{11}.
Solution · Model solution 1

Write x=m/nx=m/n and y=p/qy=p/q, where m,n,p,q∈Zm,n,p,q\in\mathbb Z and n,q≠0n,q\ne0. Then

3x−5y=3mn−5pq=3mq−5pnnq.3x-5y=\frac{3m}{n}-\frac{5p}{q} =\frac{3mq-5pn}{nq}.

The numerator and denominator are integers, and nq≠0nq\ne0, so 3x−5y∈Q3x-5y\in\mathbb Q.

Solution · Model solution 2

For the sum, 2+(−2)=0\sqrt2+(-\sqrt2)=0, which is rational. For the product, 2⋅2=2\sqrt2\cdot\sqrt2=2, which is rational. Both examples use irrational inputs but produce rational outputs.

Solution · Model solution 3

Suppose, for contradiction, that rs∈Qrs\in\mathbb Q. Since r∈Qr\in\mathbb Q and r≠0r\ne0, closure of Q\mathbb Q under division gives

s=rsr∈Q,s=\frac{rs}{r}\in\mathbb Q,

contradicting s∉Qs\notin\mathbb Q. Therefore rsrs is irrational.

Solution · Model solution 4

Starting from

a+b3=c+d3,a+b\sqrt3=c+d\sqrt3,

rearrange to get

a−c=(d−b)3.a-c=(d-b)\sqrt3.

If d−b≠0d-b\ne0, then

3=a−cd−b.\sqrt3=\frac{a-c}{d-b}.

The right-hand side is rational, contradicting the irrationality of 3\sqrt3. Hence d−b=0d-b=0, so b=db=d. Substituting into the original equation gives a=ca=c.

Solution · Model solution 5

This is the prime nth-root theorem with p=5p=5 and n=3n=3. For a direct proof, suppose

53=ab\sqrt[3]{5}=\frac ab

in lowest terms, with a,b∈Z+a,b\in\mathbb Z^+. Cubing gives

5b3=a3.5b^3=a^3.

Hence 5∣a35\mid a^3, so 5∣a5\mid a. Write a=5ca=5c. Then

5b3=125c3,sob3=25c3.5b^3=125c^3, \qquad\text{so}\qquad b^3=25c^3.

Thus 5∣b35\mid b^3, so 5∣b5\mid b, contradicting that aa and bb are relatively prime. Therefore 53\sqrt[3]{5} is irrational.

Solution · Model solution 6

If n=m2n=m^2 for some m∈Zm\in\mathbb Z, then n=∣m∣\sqrt n=|m|, so n\sqrt n is rational. Conversely, suppose n=a/b\sqrt n=a/b in lowest terms with a,b∈Z+a,b\in\mathbb Z^+. Then nb2=a2nb^2=a^2. If b>1b\gt 1, choose a prime p∣bp\mid b. Then p∣a2p\mid a^2, so p∣ap\mid a, contradicting gcd⁡(a,b)=1\gcd(a,b)=1. Hence b=1b=1, and n=a2n=a^2. Therefore nn is a perfect square.

Solution · Model solution 7

16=4\sqrt{16}=4, so it is rational. The integer 1818 is not a perfect square, so 18\sqrt{18} is irrational. The number 74\sqrt[4]{7} is irrational by the prime nth-root theorem. Finally, 113\sqrt[3]{11} is irrational by the same theorem, so 2+1132+\sqrt[3]{11} is irrational; otherwise subtracting the rational number 22 would make 113\sqrt[3]{11} rational.

Practice

Work out your answer, then check it. You can revise and try again.

Loading…

Key terms in this unit