# Irrationality of the square root of a prime

I saw a proof saying the root of a prime is always irrational, and it went something like this:

sqrt(r) = p/q where p/q is reduced
r = p^2/q^2
r*q^2 = p^2 therefore, r divides p
so define p = c*r
r*q^2 = (c*r)^2 = c^2*r^2
q^2 = c^2*r therefore, r divides q also
since r divides p and q, p/q is not reduced and we have a contradition so sqrt(r) is irrational.

Now my question is, assuming the above is correct, why does this work for prime r and not, say, r = 4.

Werg22
I saw a proof saying the root of a prime is always irrational, and it went something like this:

sqrt(r) = p/q where p/q is reduced
r = p^2/q^2
r*q^2 = p^2 therefore, r divides p
so define p = c*r
r*q^2 = (c*r)^2 = c^2*r^2
q^2 = c^2*r therefore, r divides q also
since r divides p and q, p/q is not reduced and we have a contradition so sqrt(r) is irrational.

Now my question is, assuming the above is correct, why does this work for prime r and not, say, r = 4.

This proof is based on the fact that a power has the same factors than it's root. Since 2 is prime, then it must be a factor of p. But with the number 4 this is no longer revelant since 4=2x2 and it would be fallascious to say 4 is a factor of p.

Werg22 said:
This proof is based on the fact that a power has the same factors than it's root. Since 2 is prime, then it must be a factor of p. But with the number 4 this is no longer revelant since 4=2x2 and it would be fallascious to say 4 is a factor of p.

I figured that's where the difference was but I couldn't quite see why. Thanks.

Homework Helper
another point to bear in mind is the "real" definition of primeness:

p is prime if whenever p diveds ab p divides one onf a or b. 4 fails this test.

here is another way of showing the same result:

suppose p=a^2/b^2, then rearranging pa^2=b^2. By the uniqueness of prime decomposition since the RHS has an even number of prime factors and the left an odd number we have a contradiction.

Homework Helper
The argument is more general than that. If p is an natural number that is not a perfect square then its square root is irrational.

I saw a proof saying the root of a prime is always irrational, and it went something like this:

sqrt(r) = p/q where p/q is reduced
r = p^2/q^2
r*q^2 = p^2 therefore, r divides p
so define p = c*r
r*q^2 = (c*r)^2 = c^2*r^2
q^2 = c^2*r therefore, r divides q also
since r divides p and q, p/q is not reduced and we have a contradition so sqrt(r) is irrational.

Now my question is, assuming the above is correct, why does this work for prime r and not, say, r = 4.
There is no way to express 4 as p/q, where p/q is reduced, except for the trivial case q = 1.

SGT said:
There is no way to express 4 as p/q, where p/q is reduced, except for the trivial case q = 1.

If every rational number can be expressed as the ratio of two integers, I don't see why 4 = 4/1 is trivial.

logic2b1
sqrt(r) = p/q where p/q is reduced
r = p^2/q^2
r*q^2 = p^2 therefore, r divides p

Hi, can you tell me why r divides p? Why not q^2=P^2/r ? Please teach me. Thank you very much!

Homework Helper
logic2b1 said:
sqrt(r) = p/q where p/q is reduced
r = p^2/q^2
r*q^2 = p^2 therefore, r divides p

Hi, can you tell me why r divides p? Why not q^2=P^2/r ? Please teach me. Thank you very much!

r*q^2=p^2 means r divides p^2. LeBrad was assuming r was a prime, so r divides p^2 means r divides p (see matt's post for the definition of prime).

Staff Emeritus
Gold Member
matt grime said:
suppose p=a^2/b^2, then rearranging pa^2=b^2. By the uniqueness of prime decomposition since the RHS has an even number of prime factors and the left an odd number we have a contradiction.

In the above, the RHS has an odd number of divisors while the LHS has an even number, unless p is a perfect square.

Homework Helper
here is another similar proof:

if sqrt(p) = a/b, is in lowest tems, then p/1 = a^2/b^2 is also in lowest terms.

but lowest terms is unique so a^2 = p and b^2 = 1, i.e. p must be a perfect square.