A rational number is a fraction p/q of integers with q=0
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
decide when a fraction has an ending decimal, and turn a repeating decimal into a fraction;
prove that 2, p, n for a non-square n, and log23 are irrational;
use the rational root theorem, and decide whether a sum or product of irrational numbers is rational.
Can the diagonal be measured?
A square has a side of 1 m. Its diagonal is 2 m long. The Greeks believed at first that any two lengths could be measured with a common unit, small enough. The diagonal and the side cannot. In number language, 2 is not a fraction.
Rational numbers and their decimals
A number is rational when it can be written qp with integers p and q and q=0. Otherwise it is irrational.
When does a decimal end? Write the fraction in lowest terms. The decimal ends exactly when the denominator has no prime factor other than 2 and 5. For example, 407=40×257×25=1000175=0.175, since 40=23⋅5. If q=2i5j, the decimal ends after the larger of i and j places.
Otherwise it repeats. In the long division of p by q only the remainders 1,…,q−1 can appear, so a remainder comes back, and from then on the digits repeat. For example 71=0.142857, with a block of 6 digits.
From a repeating decimal to a fraction. Let x=0.27=0.2727…. Then 100x=27.2727…, and 100x−x=27. So x=9927=113. In the same way 0.16=61.
So every rational number has an ending or repeating decimal, and every such decimal is rational. An irrational number has a decimal that goes on forever without repeating.
The square root of 2 is irrational
Proof. Suppose 2=qp in lowest terms, so p and q share no factor.
Squaring gives p2=2q2. So p2 is even, and hence p is even (an odd number has an odd square).
Write p=2k. Then 4k2=2q2, so q2=2k2, and q is even too.
Now p and q share the factor 2. That contradicts lowest terms. So 2 is irrational.
A right triangle with two legs of length 1 and the hypotenuse labelled square root of 2. Beside it the proof is written in three short lines: if p squared = 2 q squared then p is even; write p = 2k, then q squared = 2 k squared, so q is even; both even contradicts lowest terms.
The general case. Let n be a positive integer that is not a perfect square. Suppose n=qp. Then p2=nq2. In p2 and q2 every prime has an even exponent. Since n is not a square, some prime has an odd exponent in n, and so an odd exponent in nq2. By the fundamental theorem the two sides cannot be equal. So n is irrational unless n is a perfect square. The same argument shows that 32 is irrational.
Logarithms
log23 is irrational. Suppose log23=ba with positive integers a and b. Then 2a/b=3, so 2a=3b. The left side is even and the right side is odd. That is impossible.
The rational root theorem
Theorem. If qp, in lowest terms, is a root of anxn+⋯+a1x+a0 with integer coefficients, then p∣a0 and q∣an.
Proof. Put x=p/q and multiply by qn: anpn+an−1pn−1q+⋯+a0qn=0. Every term except the last has a factor p, so p∣a0qn. As p and q share no prime, p∣a0. In the same way q∣anpn, so q∣an.
This gives a second proof for 2: it is a root of x2−2, whose only possible rational roots are ±1 and ±2, and none of them works.
A harder one. Is 2+3 rational? Let x=2+3. Then x2=5+26, so (x2−5)2=24, that is, x4−10x2+1=0. The only possible rational roots are ±1, and 1−10+1=0. So x is irrational.
Sums and products
Rational plus irrational is irrational. If r+s were rational, so would be s=(r+s)−r.
A non-zero rational times an irrational is irrational, in the same way.
Two irrationals can give a rational: 2+(−2)=0 and 2×8=4.
Practise with new numbers
Try it in Python
The program prints the length of the repeating block of n1, turns 0.27 into a fraction, and searches for whole numbers with p2=2q2.
Common mistakes
Testing a fraction that is not in lowest terms.123 ends (0.25), though 12 has the factor 3. Cancel first.
Saying "p2 even, so p even" without a reason. An odd number squared is odd, so an even square has an even root.
Thinking the sum of two irrationals is irrational. It can be rational.
Using the rational root theorem on a polynomial with fractions. Clear the denominators first.
Remember these
qp in lowest terms ends exactly when q=2i5j, after the larger of i and j places.
Rational numbers have ending or repeating decimals.
n is irrational unless n is a perfect square.
log23 is irrational because 2a=3b is impossible.
A rational root p/q of an integer polynomial has p∣a0 and q∣an.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Write 0.45 as a fraction in lowest terms.
Does 16013 have an ending decimal? After how many places?
Prove that 5 is irrational.
Is 12 rational?
Prove that log35 is irrational.
References
Ivan Niven, Numbers: Rational and Irrational, Chapters 2 and 4 on decimals and irrational numbers.
NCERT, Mathematics Textbook for Class X, Chapter 1 (Real Numbers), for the proof that 2 is irrational.
Enroll free in Factorials, Irrational Numbers, Digits and the Floor Function
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.