Some Pysics Insights
Path:  physics insights > basics > numbers >

All Non-Integer Roots of Integers are Irrational

I first saw a proof that the square root of 2 is irrational back in Junior High.  The basic idea was that we assume we have a (reduced) fraction whose square is 2, and then we prove that the numerator and denominator must have a common factor, which is a contradiction.  (A version of that proof is given on our Real Numbers page.)  I didn't much like it then, and I don't much like that proof now, either.  On this page we'll present a proof which I find more appealing.  The basic idea goes like this:

Consider a rational number, written as a decimal expansion.  As an example, we'll consider 1.234.
Square it.
Our example number, squared, is 1.522756.  There were 3 decimal places in the original number; now that we've squared it, there are six.
You may recall that, when you multiply two decimals together, the number of places in the result is the sum of the number of places in the two factors.  Thus, in particular, we have:
Lemma 1:
When you square a number written as a finite decimal, the number of decimal places doubles.
Since the number of decimal places of the result is always larger than the number of places in the original value, the square of a non-integer decimal can never be an integer.
And that's it!  If the square of a rational number, written as a decimal, always has more decimal places than we started with, no integer can have a rational non-integer square root. It's short, it's simple, it's intuitive.  I was delighted when I stumbled across this.

Now, I must hasten to add that the proof, as I just wrote it, has bigger holes than the Titanic.  However, it's not all that hard to plug them and make it work for real, without (I hope!) losing the essential intuitive nature of the proof.  We'll spend the rest of this page doing that.

Repeating Decimals

The most obvious problem with the argument given above is that it only works for finite decimals.  If there are already an infinite number of decimal places, as with a repeating decimal, then our simple rule for multiplying decimals doesn't tell us anything about the number of decimal places in the answer.

The key here is that whether a number is rational or not is an intrinsic property of the number -- it doesn't matter how you write it.  Either it's a ratio of two integers, or it isn't.  On the other hand, the form taken by the radix expansion depends on the base.  So, for instance, in base 10, the first two of these are finite, while the third repeats:


On the other hand, in base 3, assuming I did the division right, we have


where the first two have repeating expansions, and the third is finite.

In fact, any rational number n/m can be expressed as a terminating radix expansion by a suitable choice of base.  In particular, the fraction n/m, when expressed in base m, certainly has a finite expansion!

And so we see that in fact Lemma 1 can be applied to any rational number.

But we're still not quite done, because we never really proved Lemma 1, and there is a problem with it.

Stray Zeros

Certainly, the number of decimal places in the result is the sum of the numbers of decimal places in the factors.  But how do we know those new decimal places aren't filled with zeros?  In particular, we've claimed the number of decimal places doubles when we square a decimal expansion.  That's only really true if the last place in the result can't somehow turn into a zero.

Can we show that the last place in the result must be nonzero?

In fact, we can ... in base 10.  But here, the base matters, as we will see.

To see why the last place in the result must be nonzero we need to understand exactly where it comes from.  Consider this tableau, showing long multiplication of two decimals:


Where did the final digit 9 come from?
It was the product of the two 3 digits in the factors.  Unlike all the other digits in the answer, it had nothing else added to it -- the other "partial products", 245 and 123, are both at least ten times larger than the 369 which appeared first, and contain no digits which are added to the last place of the first partial product.
In general, it should be easy to see that the last digit of the result always comes from the product of the last digits of the factors, and nothing else.  We could produce more algebra to drive the point home but I think it's clear enough from the example given in (1.3).

Now, let's look at the squares of the digits in base 10:


No base 10 digit has a square with a zero in the last place.
Consequently, in base 10, when we square a terminating decimal, the result will have twice the number of significant digits of the value we were squaring.  And so, Lemma 1 works just fine in base 10 -- we can be assured that the square of any non-integer rational number with a terminating expansion in base 10 cannot be an integer.

This is not true in general.  For instance, in base 16, 0.82 = 0.40 ... and the last place is most definitely a zero.  In that case, the number of significant digits to the right of the radix point certainly didn't double!  So what's special about base 10?

In order for the square of a digit to have a zero in the last place, the square must be a multiple of the base.  So, if digit d in base B has a zero in the last place of its square, we must have:


for some integer k.

That can only happen if every prime factor of B is also a factor of d.  Otherwise, no matter what power we raise d to, the result will be missing whatever prime factor of B isn't present in d.

If every prime factor in B appears in B just once, then the smallest integer which has all of B's prime factors is B itself.  Since all digits in base B are necessarily smaller than B, that means that, if B has no repeating prime factors, no digit in base B can square to a multiple of B.

Going back to our examples of base 10 and base 16, we see that 10 = 2 ⋅ 5.  The prime factors in 10 thus each appear just once.  On the other hand, 16 = 24, and the (single) prime factor of 16 appears four times.  Any even base 16 digit will have a power which is a multiple of 16, while no base 10 digit can have any power which is a multiple of 10.

For our purposes, then, any base which has no repeating prime factors is a good base.  A base which has at least one repeated factor is a bad base.  As examples, bases 2, 3, and 10 are "good", while bases 12 and 16 are "bad".

Choosing a Base for n/m

So now we know what bases will let us apply Lemma 1.  Given a rational number n/m, can we always find a "good" base in which the radix expansion of n/m terminates?  To answer this, we need to know when a fraction has a terminating radix expansion.

We'll just consider the case 1/m, since n/m is 1/m multiplied by n.  (If 1/m has a terminating expansion, multiplying it by an integer is certainly going to yield another terminating expansion.)

To produce the expansion in base B, we divide 1 by m in base B.  Predicting whether the division will terminate seems hard.  On the other hand, it's easy to decide whether division of one integer by another will go evenly, so we're going to change the problem slightly.  Instead of dividing m into 1, we'll shift the 1 to the left a few places, and divide m it into some power of B: 100...00B.  If, when we shift the 1 "far enough" to the left, we find no remainder, then we know that 1/m has a terminating expansion in base B because the result of dividing 100...00B by m is just 1/m's expansion, shifted left by a few places.

In order to find no remainder when we divide it out, 100...00B must be a multiple if m.  For that to be the case, every prime factor of m must be present in 100...00B.  That, in turn, means that every prime factor of m must be present in B, since 100...00B is a power of B.
Conversely, if every prime factor of m is present in B, then if we raise B to a high enough power, the result will be a multiple of m.

As an example, consider 1/625.  625 has just one prime factor, 5, and that factor is also a factor of 10.  Therefore, there is a power of 10 which is divisible by 625:  10000 / 625 = 16.  Consequently, we'd expect 1/625 to have a terminating decimal expansion -- and indeed it does:  1/625 = 0.0016.

Putting it together, given any fraction n/m, we can find a "good base" in which to express it by finding all the prime factors of m, and multiplying them together, with each prime appearing just once.  The result will be a base in which n/m has a terminating radix expansion, and it will be a base in which squaring a terminating radix expansion always produces twice as many significant digits as we started with.

And that proves that no non-integer fraction n/m can ever produce an integer when squared.  Consequently, any integer whose square root is not an integer has an irrational square root; QED.

Other Roots

We can generalize this easily enough to all roots, not just square roots.  We'll start by generalizing Lemma 1:
Lemma 2:
When you raise a number written as a finite decimal to the kth power, the number of decimal places increases by a factor of k.
Since the number of decimal places of the result is always larger than the number of places in the original value, a power of a non-integer decimal can never be an integer.
Consider raising a number, written as a radix expansion, to power k.  As we know (and as we stated in Lemma 2), the number of digits to the right of the radix point in the result will be k times the number of digits in the initial value.  The question we need to answer is whether the last digit in the result can be a zero.  If it can't, then Lemma 2 works and we're done.

For this, we'll (finally) resort to some algebra.  If n/m has T digits after the radix point in base B, then we can write out its radix expansion like this:


where w is some integer, and each di is a digit in base B, and consequently must lie between 0 and B-1.  The final digit, dT, is assumed to be nonzero.

When we raise (2.1) to the kth power, we obtain:


where the last term, which is the one in 1/BTk, is formed only when k copies of dT are multiplied together, with no other factors from (2.1). All the terms which include any other factors from (2.1) produce lower powers of 1/B.

My statement of this argument may seem a bit murky; if so, my apologies.  I'm not sure how to state it more clearly without a large number of additional words.  Recasting (2.2) to show the explicit formulas for each of the coefficients might help (or it might not).

Be that as it may, the upshot is that the last digit of the result comes only from the last digit of the expansion, raised to the k power.  So, for the last digit of the result to be zero, the last digit of the root, raised to the k power, must end in zero, and must, therefore, be a multiple of B.  Consequently, if we're working in a base in which no power of any digit is a multiple of the base, then the last digit of the result must always be nonzero.

In fact, the arguments by which we defined a "good base" for square roots actually led to the conclusion that, in a "good base", no power of any digit could be a multiple of the base.  Thus, that result applies to any power, and we can conclude that no non-integer rational value, raised to any power, can be an integer.  Therefore, any root of an integer which is not an integer must be irrational.

Page created on 11/18/2007 and then left unfinished until I realized how one finds a "good base", in Sep 2013.