Ok proof by contradiction here we go.

Let p be any prime number.

Assume √p is a rational number. √p can therefore be written as a fraction, a/b where a and b are coprime integers. (That it can be written as a fraction comes from the definition of rational but to choose a and b to be coprime we require the fundamental theorem of arithmetic. If you don't know a proof of this I suggest you read the node for the sake of thoroughness.)

√p= a/b

√p=a

Ok next stage (this isn't related to the first bit.) Take the highest integer lower than √p and call this number c.(e.g. √5 is approximately 2.236 so c would be 2.)

b×(√p-c)=b×√p-b×c

Now b×√p is an integer and b×c is an integer so the result, letâ€™s call it d, must also be an integer. The next step is to multiply this result by √p

√p-b×c=d

√p=b×p- b×c×√p

Now b×p is an integer and c×(b×√p) is also an integer. Therefore d×√p is an integer.

d is less than b. {d=b(√p-c} but in choosing and a and b to be comprime we ensured that b was the smallest interger which when multiplied by √p gave an interger.