
A "perfect square" is a number that can be expressed as k^{2}, where k is an integer.
Theorem 0: If integer N>1 is not a perfect square, then sqrt(N) is irrational  i.e. sqrt(N) cannot be expressed as a/b, where a and b are integers.
Proof by contradiction:
Suppose N > 1 is not a perfect square, and suppose that sqrt(N) = a/b for some positive integers a and b, and that b is the smallest positive integer denominator for which this is true.
Then b^{2} < N b^{2} = a^{2}, because N > 1, so 0 < b < a.
Now divide a by b, obtaining quotient q and remainder r, so a = q b + r, with 0 <= r < b.
Now if r = 0, we have a = q b, and a/b = q, so N = q^{2}, and N is a perfect square, a contradiction. This means that r cannot be zero, and so 0 < r = a  q b < b. Now
N b^{2} = a^{2}
N b^{2}  q a b = a^{2}  q a b
b(N b  q a) = a (a  q b)
(N b  q a)/(a  q b) = a/b = sqrt(N)This contradicts the minimality of b, since 0 < a  q b < b. This contradiction means that no such integers a and b can exist, and sqrt(N) is irrational.
Note: this proof is similar to an Infinite Descent proof, in that whenever a fraction a/b can be found equal to sqrt(N), a fraction in lower terms (N b  q a)/(a  q b) can be found. The only thing that makes this a proof by contradiction and not by infinite descent is the assertion right at the beginning that a/b is in lowest terms.
Corollary 1:
If sqrt(N) is a rational number, and N is an integer, then N is a perfect square. This is the contrapositive of Theorem 0, so it can be proved immediately by contradiction: suppose sqrt(N) is rational but N is not a perfect square. By Theorem 0, sqrt(N) is irrational, a contradiction.
Corollary 2:
Any integer which is a ratio of squares is a square. Let integer N=a^{2}/b^{2}. Then sqrt(N)=a/b, a rational number. By Corollary 1, N is a perfect square.
Theorem 1: If b is an integer, and a is a nonzero integer that is a perfect square, then the following statement is true: ab is a perfect square if and only if b is a perfect square.
Proof (if):
integers r and s exist such that r^{2}=a, and s^{2}=b.
rs is an integer, and (rs)^{2}=r^{2}s^{2}=ab(only if):
integers r and q exist such that r^{2}=a, and q^{2}=ab
q^{2}/r^{2 }= ab/a = b^{ }q/r = sqrt(b)
q/r is an integer by the corollary of Theorem 0, above.
Theorem 2: If a and b are relatively prime, then ab is a perfect square if and only if both a and b are perfect squares.
Proof (if):
integers r and s exist such that r^{2}=a, and s^{2}=b.
rs is an integer, and (rs)^{2}=r^{2}s^{2}=ab(only if):
(if ab is a perfect square then both a and b are perfect squares)
Assume for purposes of contradiction that a is not a perfect square.
if b is a perfect square, then ab is not a perfect square by Theorem 1.
So we will assume b is also not a perfect square.Let p^{n} be an odd prime power (that is, n is odd) that divides a.
Such an odd prime power exists because a is not a perfect square.
Note that p does not divide b because a and b are coprime.
So p^{n} is the largest power of p that divides ab, and n is odd.This contradicts the assertion that ab is a perfect square.
Factoid 3: Integers a,b,c,d exist such that the sum of all four of them and the sum of each pair of them are squares.
An example is 386, 2114, 3970, 10430. These numbers satisfy:
386+2114=2500=50^2
386+3970=4356=66^2
386+10430=10816=104^2
2114+3970=6084=78^2
2114+10430=12544=112^2
3970+10430=14400=120^2
386+2114+3970+10430=16900=130^2Sketch of a nonbruteforce solution:
The sum of all four (a+b+c+d) is the square of the righthand side of a Pythagorean triple in three different ways, so it has to be divisible by a handful of prime factors, each of which is 1 mod 4 (or else the prime 2). One of these is 130=2*5*13.
IBM's Ponder This: December, 2002  Find four distinct integers a,b,c,d such that 100 <= a,b,c,d <= 12000 and the sum of "all" the four of them and the sum of "every" two of them are perfect squares.
Irrationality Proofs  Proofs that π and e are irrational.
Prove that the area of a right triangle with integer sides is not a perfect square.
Infinite Descent  a method of proving theorems in which whenever a set of integers is found to have a certain property, a set of smaller integers can be found to have the same property.
Arithmetic Sequence of Perfect Squares, page 3  If a^{2}, b^{2}, c^{2} are in arithmetic sequence, why is their constant difference a multiple of 24? Look at the second answer to this question for the relationship between Pythagorean Triples and this arithmetic sequence of squares.
Basic Number Theory Definitions  including some theorems involving GCDs, prime numbers, and squares.
The webmaster and author of this Math Help site is Graeme McRae.