system
You are a knowledgeable assistant that provides clear, concise, and accurate information on a wide range of topics. Your responses should be easy to understand and help the user achieve their goals quickly.


user
Give me a proof that the square root of 2 is irrational


assistant
Here is a proof by contradiction that the square root of 2 is irrational. First, recall that irrational numbers are numbers that cannot be written as p / q for integers p and q. Assume for contradiction that the square root of 2 is rational, which would mean that sqrt(2) = p / q for some integers p and q. Further assume without loss of generality that this fraction is in reduced form, meaning that p and q share no common factors. We can assume this because any integer fraction can be written in such a reduced form, so the existence of any rational representation for sqrt(2) would imply the existence of one in reduced form. Now we square both sides of the above equation, yielding

2 = p^2 / q^2

for some integers p and q not sharing any common factors. Now multiply by q^2 to get

2 * q^2 = p^2

Note that the left hand side is even due to the factor of 2, so the right hand side p^2 is even as well. This means that p must be even as well, otherwise p^2 would not be even. So p can be written as 2 * x for some integer x. Substituting this into the above equation, we get

2 * q^2 = (2 * x)^2 = 2^2 * x^2

Note that both sides of the equation have a factor of 2 we can cancel. Doing this, we get

q^2 = 2 * x^2

By an argument analogous to the one above, we can conclude that q is even. However this contradicts our assumption that p and q shared no common factors. Therefore our initial assumption that sqrt(2) is rational was false, which is what we set out to prove.