 Recall that a statement is either true or it's false. It's one or the other, it can't actually be both. Now, as we try to write proofs of statements, we sometimes struggle to prove that something is true. Like we think it's true, and really, really struggled to prove it's true. It turns out what you could do instead, instead of proving it's true, you could pretend that it's actually a false statement and see where that takes you. Like for me personally, I like to play lots of logic games, like Sudoku for example, that's a fun logic game you can play. And so if you're playing Sudoku, you might have some situation, I'm not gonna draw the whole board, but you might get something like the following, where you have some square and you're like, I think it's a one or a two, I'm not sure. So what you can do is you can play where it's like, I'm not gonna guess, what if it's one? And then it's like, okay, if that's a one, that's a three, and if that's a three, this is a two, and if that's a two, this is a four, and if that's a four, this is a five, and if that's a five, this is a three. And then you're like, oh wait, you know, in Sudoku you can't repeat the same number in the same row or column. And so the fact that I got two threes in the same column means that this is not a possible solution. So then I have to follow back my logic to here when it's like, oh, it wasn't one, and therefore it must have been the other possibility, it must have been two. This is what an example of what we call a proof by contradiction, or also referred to as reductio on absurdum. And a Latin phrase often abbreviated as R-A-A, which just translates as to reduce to the absurd. That is, you take an assumption and if it leads to something absurd, or in this case, if it leads to a contradiction, then that means your assumption was wrong. If you assume a statement's false and get a contradiction for which the king of all contradictions will be you have some statement Q and you've also proven it's negation. The statement Q and not Q is a contradiction. It is always false. No matter what the statement Q is, this is always false. If you can prove a contradiction after you make some false statement, then that means the statement actually was false. And that's how one proves by contradiction. It's a really nice technique. Now, if you're not sure how all of that actually gives you a valid proof argument, consider the following. Let's take any old statement P and I wanna show you that the following is logically equivalent to it. Now the statement P is logically equivalent to P or false. Remember how a false statement, how an or statement works here. Or statements are true if any portion of the statement is true. Now, if you take P or false, then oring a false will never make it true. The only way that this statement can be true is if P is true. If P is true, then P is true. So P and P or false are logically equivalent to each other. Now, of course, I can replace the P with not not P. If you take a double negation, you get back the original statement not not P is equivalent to P and therefore P or false is the same thing as not not P or false. And then this one is equivalent to not P implies false. Here I'm using the fact that a conditional statement implies B is equal to not A or B. Remember if the hypothesis is false, it's vacuously true. And if the conclusion is true, it's trivially true. Therefore a conditional will be true if the hypothesis is false or if the conclusion is true. So thus we see that not not P or false is the same thing as not P implies false. And so thus when you put these together, not P implies false is logically equivalent to P. Therefore if this statement is true, then this statement is true. And conversely, if this statement is true, this statement is true. Now in the latter case, not P implies false, that's a conditional statement. We typically would prove that to be true using the method of direct proof, which direct proof means that you're going to assume the hypothesis, so you assume not P and then you go about trying to prove the conclusion. Well, the conclusion is false. So that is we're looking for a contradiction. You're looking for two statements that conflict with each other, which typically like I said earlier, this will manifest itself in the form that you prove some statement Q, you also prove it's negation and hence Q and not Q. This is a contradiction. So this is what we're looking for. Sometimes people draw a contradiction as these implication arrows, these logical arrows pointing towards each other. So it's like there's a conflict there. And so a lot of proof by contradiction is a valid proof technique. Since if you can prove this to be true, which again, the way you do that is you assume not P and then you find a contradiction, this then shows that P is true. And sometimes it can be easier to prove something by contradiction than it is to prove it directly. Let me provide you some examples of that. So perhaps one of the most classic proofs by contradiction there exists is the proof of the infinitude of the prime numbers. And this goes back to the days of Euclid in the book, The Elements. Euclid proved that there are infinitely many prime numbers. And the way that you can do it is by contradiction. So suppose to the contrary that there are only finitely many prime numbers. So this phrase right here, suppose to the contrary, this is the author telling the reader that I'm gonna prove something by contradiction. I'm gonna make an assumption opposite to what I want to be true in order to derive a contradiction. You say this to the reader so you know what's going on but also so the reader knows that you know what's going on as the writer, right? You're not just coming up with false statements, you know it's false. And so you're telling it, this is a false statement because it'll give us a contradiction that's gonna be coming forward. And so the reader knows to look for a contradiction because you're telling us suppose to the contrary such and such or you could say for the sake of contradiction such and such. Some people like to say by way of contradiction such and such like this BWOC by way of contradiction. You should indicate to the reader that you're going to prove something by contradiction. All right, so suppose to the contrary that there are only finitely many primes and so let's list them, there's a first prime, there's a second prime, there's a third prime, there's a fourth prime up to the nth prime. So these are the finite primes that exist in many primes. Now with these in many primes, I'm gonna make a new number. I'm gonna make the number A, which is the product of every single prime exactly once and then you add one to it, okay? So I want to then show that this number has to have a prime divisor. And we actually proved this previously in a different lecture using induction that every, well actually you strong induction if I'm being more accurate, every positive integer greater than or equal to two has a prime divisor as two is clearly one of the divisors. A has to be larger than two, so therefore it has a prime divisor. Now without the loss of generality, let's assume that the prime divisor of A is P1. Am I listed these primes? I didn't say they were in ascending order, like I didn't say that the first prime I listed was the smallest prime and the second was the next prime. I'm just saying here's my primes. So without the loss of generality let's assume that P1 is a prime divisor of A. It has a prime divisor, it's one of these n primes, let's call P1. So we have that P1 divides A because A has a prime divisor. But also if you take the product, P1 times P2 times P3 times P4 times up to Pn, this is actually what's known as a primorial. It's kind of an amalgamation of the word factorial and primes because a factorial is the product of all integers, one upward. So the primorial is actually the product of all the consecutive primes from the first prime to the second prime all the way up to the nth prime, okay? Anyways, clearly the primorial product there is divisible by P1. I mean, I can see P1 as one of the factors, clearly, okay? So if P1 divides A and P1 divides the primorial, that means that P1 also divides their difference. It divides, P1 divides A minus the product P1, P2 up to Pn. But this product, excuse me, this difference, A minus the product of primes is equal to one. So by Lemma 194, which we saw previously in this lecture series, it told us that if a prime, well, not even as a prime, if you have a common divisor between two numbers, then it'll also divide the difference of those two numbers. So P1 has to divide one. But wait a second, one doesn't have a prime divisor. So for one reason, we now have that one has a prime divisor, but for other reasons, because honestly all primes have to be larger than one, one doesn't have a prime divisor. This is a contradiction. One cannot have a prime divisor and also not have a prime divisor. That's a contradiction. And that's the contradiction we were looking for. So because we contradicted our original hypothesis that there are finitely many primes, the negation actually must be true. Therefore, there are infinitely many primes. That's a pretty cool result there. It's a very nice proof by contradiction. There exists dozens and dozens of proofs showing that there's infinitely many primes. But I honestly think that the simplest of proofs, in this case was probably the first one, which was Euclid's proof by contradiction, that there are infinitely many prime numbers. Let's look at another classic proof by contradiction because one can actually use a contradiction to show that an element doesn't belong to a set. For example, how would you show that one half does not belong to the set of integers? Because to be in the set of integers, there's a certain definition there, and then you have to show that one half doesn't satisfy it. That can sometimes be difficult. And so what you could do is you can do, by way of contradiction, you could suppose that one half is inside the integers. You can then make the argument. There is an argument that can be made here. I'm not gonna supply it at the moment. This is just an example. But you can make the argument that one half is between zero and one. That's one statement. But then you can also make the argument that there is no integer between zero and one. Be aware that with the integers, the integers by construction are discrete objects. That is there are gaps between the integers. And so in particular, there's a gap zero and one. One is the successor of zero with regard to the integers and there's no integers between it. If one half was an integer, it would have to be an integer between zero and one. That's a contradiction. And so therefore, one half cannot be an integer. Now, one half is clearly a rational number because it is a ratio of integers. It's one over two, but it's not an integer. So this is an example of a fraction which gives you a rational number which is not integral. That's approved by contradiction even if I didn't supply all the details to it. One that I will supply all the details to it is another classic infamous theorem here. The real number, the square root of two is irrational. That is to say we're gonna show that the square root of two is a element of the real numbers, but it's not an element of the rational numbers. So more specifically, the square root of two is not a rational number. The fact that it's a real number is not in question at all. But every real number is either rational or irrational. To be rational, you have to express the number as a fraction of integers. So if I think that the square root of two is not a rational number, I have to show that it's not ever a fraction of integers. But there's a whole lot of fractions out there. How do I know it's not a fraction of integers? I could try a bunch of fractions like, oh, the square root of two doesn't equal three over two. It doesn't equal five over seven. It doesn't equal 11 over 13. Those are all true statements, but I can't just list a bunch of examples and expect that to work. In order to show that there's no fraction that works, contradiction actually becomes an effective method to do it. Because instead, what I'm gonna do is suppose to the contrary that the square root of two is a fraction of integers and then derive a contradiction from that. That'll show there exists no such fraction because if there was a fraction, we would get absurdity. So let's then see that proof. For the sake of contradiction, suppose that the square root of two is a rational number. And if it's a rational number, there exists integers p and q such that the square root of two equals p over q. And sure, we can assume that q is not zero. We don't really have to worry about that right now. Instead, what we're gonna do is we're gonna assume that this fraction p over q is in lowest terms. So we say that a fraction is in lowest terms when the GCD between the numerator and the denominator is equal to one. Now, one can actually provide an argument, a proof that every rational number can be written in lowest terms. This basically comes down to an argument using the well ordering principle. For which if you take a rational number you take all the possible fractions that represent that rational number. For example, if you take the rational number one half, you would have things like one half, two fourths, three sixths, et cetera. Take all of the possible fractions you can use to represent a rational number and look at the set of positive denominators that can be used there. That's a set of natural numbers because they have to be positive. And so by the well ordering principle, there exists a minimal element inside of that, call that minimum element q. There has to be some companion to q, call it p. I then claim that that fraction is the lowest terms for that rational number. And I'll leave it as an exercise to the viewer here to provide the details of that. That the well ordering principle guarantees that every fraction can be written in lowest terms. Okay? So we're just gonna go forward with that fact established. Like I said, I'll leave it up to the viewers to prove that here. So the square root of two can be written as a fraction in lowest terms. Now, by definition, what is the square root of two? The square root of two is a real number such that when you square that real number, you get two. So therefore, if I take this equation, square both sides, the left hand side becomes two because that's what the square root of two is. And then on the right hand side, we're gonna square p over q. And now when you square a fraction, you can square the numerator, you can square the denominator. And so we get two equals p squared over q squared. If you cleared the denominators, I can make this into an equation of integers. Two q squared is equal to p squared in that situation. Now notice the left hand side. The left hand side is clearly divisible by two because I can see the factor of two there. Two divides the left hand side, two q squared. Therefore, two has to also divide the right hand side, p squared. Now by Euclid's lemma, remember Euclid's lemma tells you that if a prime divides a product AB, then the prime has to also divide one of the factors. It divides a or divides b. I don't necessarily know which one it is, but Euclid's lemma guarantees that. Again, this is the same Euclid. Euclid in the elements proved that the square root of two is irrational. And remember, irrational numbers, these were controversial numbers, like there's legend goes that the first person to prove that the square root of two was irrational belonged to the school of Pythagoras. And the Pythagoreans had him drowned because all numbers have to be expressible and irrational numbers by definition can't be expressed. And therefore this was heresy and the man was executed for this. Whether such a legend is true or not, I can't attest to, but it definitely did cause the Pythagorean school in ancient Greece a lot of angst, this conversation of irrational numbers. And so they kind of were believed to not be existent. Years later, of course, we can accept this proof by contradiction that in fact it is an irrational number here. But anyways, by Euclid's lemma here, which we haven't proven Euclid's lemma, we'll actually prove it in the very next lecture. So this won't be a circular argument. We can prove Euclid's lemma without anything we've proven so far. So take a look at that in the next lecture here, lecture 24. Anyways, by Euclid's lemma, since two divides p squared, it has to divide p or it has to divide p. But if that's your options there, two divides p or two divides p, that's the same option. So we can actually conclude from that, that two divides p, okay? Now, if two divides p, that means four divides p squared because each of the p's in p squared offers a two. And therefore, since p squared is the right-hand side, if four divides the right-hand side, four has to divide the left-hand side as well. So that is four divides two q squared. Now, there's a two there and four is two times two. So that accounts for one of the twos. We could divide two from both sides there, but we still have to produce another factor of two for which the only thing remaining is two has to divide q squared. But then, again, by Euclid's lemma, if two divides q squared, it must have been that two divides q. And so I want you to see what we've now done here. We've now argued that two divides p, but two also divides q. But by definition of being in lowest terms, the numerator and divisor, their greatest common divisor has to be one, but we found a common divisor two, which is bigger than one. This would contradict the fact that p and q is in lowest terms. And since the well-ordered principle guarantees that every fraction has lowest terms, the square root of two, its fraction can't be written in lowest terms, which actually contradicts the fact that there is no such fraction. That is to say that the square root of two is actually not a rational number. And you could modify this proof to show that any square root of a prime number is in fact irrational. And honestly, if you take the square root of any number that's not a perfect square, such as a prime number, this same argument applies in that situation there. Now, of course, if you take a number that's not a perfect square that's a little bit, you have to be careful that you don't make a circular argument there. But for example, you can show that the square of six is not a rational number by using a similar argument that we have done right here. So these two proofs illustrate how powerful a proof by contradiction can be. And we'll use this proof technique in our future study of advanced mathematics.