Evanalysis
7.2Estimated reading time: 19 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

MATH1025: Preparatory mathematics

Preparatory mathematics notes.

9 sections

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 xRx\in\mathbb R.

  1. We say that x is a rational number if there exist integers m,nZm,n\in\mathbb Z such that n0n\ne0 and

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

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

The denominator condition n0n\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=36.\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 xQx\in\mathbb Q and x>0x>0, then we may write

x=abx=\frac ab

with a,bZ+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 a and b, which is impossible.

Closure of the rational numbers

Theorem

Closure of Q under arithmetic

Let x,yQx,y\in\mathbb Q.

  1. x+yQx+y\in\mathbb Q, xyQx-y\in\mathbb Q, and xyQxy\in\mathbb Q.
  2. If y0y\ne0, then x/yQx/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,qZm,n,p,q\in\mathbb Z and n0n\ne0, q0q\ne0. Then

x+y=mq+npnq,xy=mqnpnq,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 nq is nonzero. Hence all three numbers are rational.

For division, suppose y0y\ne0. Since

y=pq,y=\frac pq,

the condition y0y\ne0 forces p0p\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 np0np\ne0, so x/yx/y is rational.

Common mistake

Closure of Q is not closure of the irrational numbers

The theorem is about operations starting with rational numbers. It does not say that irrational numbers are closed under addition or multiplication. In fact, they are not.

For example, 2\sqrt2 is irrational, but

2+(2)=0\sqrt2+(-\sqrt2)=0

is rational. Also,

22=2\sqrt2\cdot\sqrt2=2

is rational. The word "irrational" means "not in Q\mathbb Q"; it does not create a separate number system closed under the usual arithmetic operations.

Nonnegative nth roots

Definition

Nonnegative nth real root

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

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

Theorem

Existence and uniqueness of nonnegative nth roots

Let nZ+n\in\mathbb Z^+, and let a 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 3 and 3-3 satisfy x2=9x^2=9, but only 3 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 a0a\ge0.

For odd n, 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?

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:

pabpa or pbp\mid ab\quad\Longrightarrow\quad p\mid a\text{ or }p\mid b

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

Theorem

Irrationalityof2Irrationality of \sqrt{2}

The real number 2\sqrt2 is irrational.

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

2=ab\sqrt2=\frac ab

where a,bZ+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.

Hence 2a22\mid a^2. Since 2 is prime, Euclid's lemma implies 2a2\mid a. Write a=2ca=2c for some cZ+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 2,

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

Thus 2b22\mid b^2, and again Euclid's lemma gives 2b2\mid b. We have shown that 2 divides both a and b, contradicting gcd(a,b)=1\gcd(a,b)=1.

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

The structure of the proof is more important than the particular number 2. 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,dQa,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:

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

If db0d-b\ne0, then

3=acdb.\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 db=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 1 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 n be an integer greater than 1, and let p 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,bZ+a,b\in\mathbb Z^+ and gcd(a,b)=1\gcd(a,b)=1. Raising both sides to the n-th power gives

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

Hence panp\mid a^n. By applying Euclid's lemma repeatedly, a prime dividing ana^n must divide a. Therefore pap\mid a, so write

a=pca=pc

for some cZ+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 p:

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

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

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

Common mistake

Do not skip the condition n > 1

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

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 nZ+n\in\mathbb Z^+ is a perfect square if there exists an integer mZm\in\mathbb Z such that

n=m2.n=m^2.

Theorem

Rational square-root criterion

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

First suppose n is a perfect square, say n=m2n=m^2 for some mZm\in\mathbb Z. Since n>0n>0, we have m0m\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,bZ+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>1, then b has a prime divisor p. Since pbp\mid b, we have pb2p\mid b^2, and the equation nb2=a2nb^2=a^2 implies pa2p\mid a^2. By Euclid's lemma, pap\mid a. Thus p divides both a and b, 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 n 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.

Quick checks

Quick check

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

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

Solution

Answer

Quick check

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

Use the integer formula for the product.

Solution

Answer

Quick check

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

Use opposite irrational numbers.

Solution

Answer

Quick check

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

Quick check

Why does panp\mid a^n imply pap\mid a when p is prime?

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

Solution

Answer

Quick check

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

State the criterion as an if and only if.

Solution

Answer

Exercises

  1. Prove directly from the definition that if x,yQx,y\in\mathbb Q, then 3x5yQ3x-5y\in\mathbb Q.
  2. Give examples showing that the sum and product of irrational numbers may be rational.
  3. Prove that if rQr\in\mathbb Q, sQs\notin\mathbb Q, and r0r\ne0, then rsQrs\notin\mathbb Q.
  4. Let a,b,c,dQa,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 nZ+n\in\mathbb Z^+. Prove that n\sqrt n is rational if and only if n 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

Guided solutions

Section mastery checkpoint

Answer each question correctly to complete this section checkpoint. Correct progress: 0%.

Skills: integer-methods, irrationality, euclids-lemma

In the chapter 7 proof that 2\sqrt2 is irrational, suppose 2=a/b\sqrt2=a/b with a,bZ+a,b\in\mathbb Z^+ relatively prime. From 2b2=a22b^2=a^2, Euclid's lemma first shows that 2 divides which numerator? Fill in the blank: 2\mid ____.

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

Syntax guidance: Enter the numerator variable.

  • Enter one variable name.

Skills: integer-methods, irrationality, perfect-square

Use the chapter 7 criterion: n\sqrt n is rational if and only if n is a perfect square. Which statement is correct?

Attempts used: 0

Attempts remaining: Unlimited attempts

Preview does not consume an attempt.

Submit records a graded attempt.

  • 64=8264=8^2 is a perfect square, but 72 is between 828^2 and 929^2.

Key terms in this unit

Premium learning add-ons

Core notes stay free. Advanced exercises, video explanations, and premium exports are available through paid plans.