The square root of a number is the number that multiplied by itself gives . For example, the square root of 44100 is 210, since 210 × 210 = 44100. Actually, positive numbers have two square roots, one positive, one negative; e.g., –210 × –210 = 44100. The square root of a negative number is an imaginary number.
Proof. Take the set of all positive integers and square all its members, label the resulting set . Clearly is the set of all positive integers that have integer square roots. Obviously, these integer square roots are rational numbers, as they can be expressed as , where .
Now, take any from that is not in . Then is not an integer, but at this point we have not ruled out the possibility that it could be rational. If that were the case, there would be integers and such that , with since . If is not a fraction in lowest terms, we make it so by dividing and by . From the fundamental theorem of arithmetic, it follows that has a least prime factor, which we label here. Then (it doesn't matter if is itself prime, in which case , nor does it matter if , since a number can have square divisors but not itself be a square).
Since , we can write . Multiply by to get . This means that is divisible by , and therefore (the value of is not necessary for this proof). So, and thus . Dividing both sides by we obtain . This means that is also divisible by . But we established that is also divisible by , contradicting the assertion that and are coprime, and therefore is not a rational number. ¿¿¿IS THERE A HOLE IN THIS PROOF REGARDING COMPOSITE NUMBERS???
In summary, if , then , but if not, then as specified by the theorem. □
Corollary. Much of the foregoing can be said for negative numbers with only small adjustments. For convenience, let's say that the function returns a real value, that is to say, , not . Then, if , either or .
This proof is essentially a generalization of proofs for the square roots of specific integers. Perhaps it would be more elegant to first prove the fundamental theorem of algebra and then derive not only this result but also the similar results for cubes, biquadrates, etc.
However it is proven, this result can be used to prove the irrationality of some other numbers involving square roots quite easily. For example:
Theorem SQRT23. The number is irrational.
Proof. Assume that is in fact rational, and thus . Thus, , so . Redistributing gives us and therefore . Remember that a rational number divided by any integer (except 0) is also rational. This means that is a rational number. But that also means is rational, which it can't be since its square root is not an integer, as established by the previous theorem, thus proving this theorem. □ 
Theorem SQRT2.25. The square of rational number that is not an integer is another rational number that is not an integer either.
Proof. If but , this means that with , and . Therefore, , and it follows that , and , and thus but just like .
For example, .
Corollary. The square root of an integer may be an integer or it may be an irrational number, but it may not be a non-integral rational number, as that would obviously contradict what we have just proven.
The converse is not always true: the square root of a rational number that is not an integer may be an irrational number. This is the case with the reciprocals of most integers, e.g., , which is clearly irrational.
Square roots of some small integers
In the following table, the square roots are given to 20 decimal places, truncated.
* With a different offset.
A note on square roots of positive integers: we can write where is squarefree. Then is given by A000188(n), which we can call the "inner square root" of , while is given by A007913(n), and is the "squarefree kernel" of , given by A007947(n); , the "outer square root" of n, is given by A019554(n). For example, .
Square roots of some important constants
As before, these are given to 20 decimal places, truncated.
The square root of –1 is the imaginary unit , and the square root of the imaginary unit is .
- Ivan Niven, Numbers: Rational and Irrational. New York: Random House for Yale University (1961): 44.