 Recall that for a conditional statement, p implies q, its contrapositive was the statement not q implies not p, and these statements are logically equivalent to each other. So in terms of logic, these two are the same thing. We would say that they're equal to each other. Remember, that means that if this conditional statement is true, then this conditional statement is true. Likewise, if the contrapositive is true, the original conditional was true. If the conditional was false, then it's contrapositive is false. And lastly, if the contrapositive is false, then the conditional is false. They're logically equivalent to each other. Now in the past, we've talked about how one can prove a conditional statement. We typically use a method which we call direct proof. And the reason we call it direct proof is that there are ways to prove a conditional that are indirect, and the contrapositive proof pattern is exactly one of these first indirect proof methods we can prove here. Because if this statement is true, then its contrapositive is likewise true. And more importantly, if this statement is true, then this statement is true as well. So if we have to prove a conditional statement, what we can do is we can instead look at its contrapositive, we can prove the contrapositive to be true, which then makes the original statement true as well. So remember, with the method of direct proof, what we do is we assume the hypothesis of our conditional is true, and then we argue and then we can conclude that the conclusion is true. Now if you apply the method of direct proof to the contrapositive, what that means for you is you would assume that the negation of the conclusion is true, because that is the premise of the contrapositive. And so then you would make some argument and you would end with the statement that the conclusion is false. That is the conclusion of the contrapositive. But the conclusion of the contrapositive is the negation of the premise of the original conditional there. So if you apply direct proof to the contrapositive, that then proves the contrapositive to be true. And since it's logically equivalent to the original conditional, this would also prove that the conditional is true. But as you're doing it somewhat indirectly, you're assuming the conclusion is false and then arguing that the premise is false. This is what we call the method of contrapositive. So a contrapositive proof. It's an alternative way to prove a conditional statement is true. And there are many times where it can be more helpful to do that in that situation. Now, of course, with direct proof, you assume the premise is true because of the premise is false. The statement is vacuously true. But over here, you assume the conclusion is false because if the conclusion was true, the conditional would be trivially true as we've talked about previously. So let's then compare how does a proof by contrapositive compare to direct proof? So consider the following statement. Suppose x is an integer. If 7x plus 9 is even, then the number x was actually an odd number. I'm going to prove this theorem twice using the method of direct proof and contrapositive proof. Let's start with the direct proof. As we have this conditional statement, if p, then q, I'm going to assume p is true and then work from there to prove that q is true. Well, that would mean I suppose that 7x plus 9 is even. What does it mean to be even? Well, that means there exists some integer k such that 7x plus 9 is equal to 2k. Now, the next step of the problem, well, the next step is not so bad. We want to show that x is odd. So at some point we have to get x equals 2l plus 1, something like that. That's what we're looking to do right here. So how do we do that? So it makes sense to solve for x in this situation. So you can do that by moving the 9 to the other side. You're going to get 7x is equal to 2k minus 9. But then the next natural step would be to divide both sides by 7, for which then you get that x is equal to 2k minus 7. We have a problem here. First of all, how do I know that 2k minus 9 divided by 7 is even an integer? Because when you start dividing by integers, there's no guarantee that you have an integer anymore. The only way that 2k minus 9 divided by 7 is an integer is if 2k minus 9 is divisible by 7. And I don't actually have a good argument available to me to provide why 2k minus 7 is divisible by 7. I would love it to be, but I don't actually know that for a fact. Now it might be tempting to be like, well, 9 minus 2 is 7, maybe. But we don't know what k is. So there could be an argument, perhaps, right? But we don't have it necessarily in front of us. And it might be difficult to find it. And then even if we prove that 2k minus 9 divided by 7 is an integer, even if we know this is an integer, how do we know it's odd? Which is what we're trying to show. It could arguably be done, because x is in fact odd here, because that's what we're trying to prove. But that's a very difficult argument comparatively. Now what we can do instead is we don't necessarily have to solve for x by dividing by 7. What we could do is we could actually subtract 6x from both sides of the equation. So by doing that, we get x equals 2k minus 6x minus 9. Now this right here feels like it's a violation of my mathematical upbringing. I've taught many algebra students, like college algebra, intermediate algebra students over the years, calculus students as well. And oftentimes they're asked to solve an equation of two variables. It's usually an x and y or something. And they try to solve for x. Maybe it was y equals some function, and you get x squared plus x plus 2. And then they might do something like, oh yeah, I'm going to write as x equals y minus x squared minus 2. It's like, oh, I solved for x. But it's like there's still x's on the other side of the equation. You didn't really solve for x right there, because in order to determine x, you have to know y. And you have to know x. That's not very helpful as a formula. Like over here, if you know x, then you know y. But we didn't reverse the direction. We didn't find the inverse function. I've had to tell students so many times that you have to make sure you get all of the variables on the one side of the equation. But I actually did the exact opposite. I did the opposite of what I've been telling students to do for years. x equals 2k minus 6x minus 9. Now I confess in this situation, I'm not trying to come up with a function. So I don't necessarily need to do that. I just have to show that x is odd. But it's kind of odd that I'm going to reference x by using x itself, in addition to k, of course. So there's this awkwardness that's happening here. But nonetheless, 2k is an even number. You can factor out a 2. Negative 6x is an even number. You can factor out the 2 leaving negative 3x. And you could rewrite negative 9 as negative 10 plus 1. You could leave the 1 by itself. And then the negative 10 is an even number. It's 2 times negative 5. So you can rewrite this expression as 2 times k minus 3x minus 5 plus 1. As k minus 3x minus 5 is an integer, 2 times an integer is an even number. Plus 1 is a non-number. We've been able to write x as an odd number. That proves that x is an odd number. So this is a valid proof. But I want to mention that it's sort of an awkward proof. There were some weird things I did that made me uncomfortable as I did them. I was able to get around the problems. But imagine you, if you were trying to write this proof by yourself, and you've never written a proof like this before, you might struggle to have done it in the direct approach because of some of these awkwardness, these obstacles I explained along the way. Now, if we were to instead prove this by the contrapositive, or positive, which instead of assuming the premise, we are going to negate the conclusion. So suppose that x is not odd. Well, if you're an integer and you're not odd, that means you're even. So we're assuming that x is an even number. Now, if x is an even number, that means there is an integer L such that x equals 2L. Now, this proof is actually very much in line with previous proofs we've considered in this lecture series. I need to show that 7x plus 9 is not even. But to show that it's not even, I have to show that it's odd, which means I need to show it looks like some type of 2k plus 1. But the way I approach this is like, okay, 7x plus 9 depends on x. I could plug in this substitution in for x inside of 7x plus 9 and then pull it out. 7x plus 9 is the same thing as 7 times 2L plus 9, which of course, like we did before, 7 times 2L, that's 14L that you can factor out the 2. The 2 is already there, right? And then with 9, you can break it up as 8 plus 1. 8 is 2 times 4. And so this then decomposes as 2 times 7L plus 4 plus 1. So this then shows that 7x plus 9 is an odd number. And if it's odd, then it's not even. And therefore, we've been proven it by contra position. We use the contra positive here because we took not the conclusion and proved not the premise as opposed to assuming the premise and then getting the conclusion. Now, when we proved it via contra positive, we didn't have any of the annoyances, the awkwardness that appeared over here. Now, when you look at the proof side by side, they look like they're the exact same length, okay? They're both involving like five lines of writing here. Yeah, five lines of writing. So it looks like the same length. So in terms of brevity, it's not one that's shorter than the other, which is something nice. But I definitely would argue that the contra positive approach was smoother. Again, it avoided some of the awkwardness. Now, if you're reading it after the fact, maybe you don't notice it. But when you're writing it, those decisions had to be made. And this one was super awkward, super cumbersome. This one was much slicker and smoother. And because of that, I would actually endorse the contra positive as a method here. That because sometimes when you have a conditional statement, sometimes the conditional itself can be awkward to prove, but its contra positive might be much slicker or smoother to prove. So instead, you can prove the conditional by contra positive as opposed to direct proof. Let's see some other examples. Now, in these examples, I'm going to prove it by contra positive, not necessarily because the contra positive is better, but I think many of us could make an argument that the contra positive is the better approach here. So for our next proposition, it's very similar to the one we just did here. Suppose that x is an integer. If x squared minus 6x plus 5 is even, then x is odd. Now, this is sort of actually very similar to the one we just did here. If I assume that x squared minus 6x plus 5 is even, I would know that this number equals 2k, but I have x's and x squared. Again, trying to get x to be odd, so x looks like some 2l plus 1 is going to be very, very, very awkward. The other direction is actually much easier. I'm going to assume the opposite. I'm going to assume that x is not odd, or I might begin with suppose x is even. Now, when you prove something by contra positive, you don't necessarily have to be like, suppose not the following statement, which was the conclusion. As we've practiced previously in this lecture series, we've practiced how one negates a statement. This is exactly that moment to imply that skill, to apply it here. So instead of saying, suppose x is not odd, that is, that is, x is even, you could write something like that. Instead, it's very, it's reasonable to expect the audience knows that if an integer is not odd, it's even. So I'm just going to start with the negation already computed. I don't have to tell anyone that I'm going to get a statement. It's reasonable that my audience can negate statements. This is a fundamental advanced mathematics. So I'm going to do this by contra positive, so I get the negation of the conclusion. So suppose n is even. Well, if n is even, there exists some integer k, so it's at x equals 2k. And much like in the other proof, what I can do is I can take this substitution and plug it into my expression x squared minus 6x plus 5 and then try to argue that that is going to be not even a ka odd. So when we do that, you replace the x with a 2k here and here. So we get 2k quantity squared minus 6 times 2k plus 5. Let's simplify that for a moment. 2k quantity squared, we have 4k squared. Negative 6 times 2k is a negative 12k. Nothing to do with 5 so far. But I need this to look like 2l plus 1. So what I'm going to do is I'm going to pull a 1 off. So 5 breaks up as 4 and 1. Then everything left that's not the 1 is an even number. You can factor out a factor of 2 there. So we end up with 2 times 2k squared minus 6k plus 2 and then you add 1 back in there. Since the 2k squared minus 6k plus 2 is an integer, this then shows that x squared minus 6x plus 5 is an odd number. And of course, if you're odd, that means you're not even. I don't need to specifically say that it's not even, saying that it's odd is good enough. And that then gives us the contrapositive proof. We took the negation of the conclusion and then proved the negation of the premise. That's a contrapositive proof. Let's look at an example using real numbers and inequalities. Suppose that x and y are real numbers. If y cubed plus yx squared is less than or equal to x cubed plus xy squared, then y is less than or equal to x. This one is one that screams to prove it by contrapositive, much for the same reasons as the previous examples. The premise looks awfully complicated while the conclusion looks awfully simple. And it might be a little bit confusing. How do I use this complicated statement to prove this much simpler statement? It's like, I don't even know what to begin with this thing, but I want to get there. So the nice thing about contrapositions, you can go the other way around. I can take the simple conclusion to prove the complicated premise, at least the negations of such. Because if we take y is less than or equal to x, then the negation of that statement would be that we are not less than or equal to. That's the same thing as saying y is greater than x. There's only those possibilities for this. So that's how I'm going to start my statement. Suppose that y is greater than x. Again, I don't need to say not y less than or equal to x. I can just say y is greater than x as my original assumption. The reader would understand that that's the negation of the conclusion. So suppose that y is greater than x. We can move the x to the other side, then y minus x is greater than zero. Again, there is some reasoning that has to go on here, but the thing is, a typical student, if you start with the left-hand side here, you're like, I have no idea what to do with that premise in order to get here. This other one makes a little bit more sense because you have a y minus x. There are a bunch of cubes and squares in there. So if I take this y minus x is greater than zero, if I times both sides by the non-negative value x squared plus y squared, I will then get the following inequality, y minus x times x squared plus y squared. That's greater than zero times x squared plus y squared. Because this is a non-negative value, squared real numbers can never be negative, and so you add together two non-negatives that itself is non-negative. That's important because when you multiply both sides by a non-negative, it doesn't change the direction of the inequality. We have to pay attention to is our quantity positive or negative or zero, right? We know it's non-negative because it's a sum of squares. So if you take the inequality we have right here and then you get this, well, you can simplify things. So the right-hand side's pretty easy. Zero times anything will give us zero. On the left-hand side, I'm just going to foil things out. You get y times x squared. You're going to get y times y squared, which is a y cubed. You're going to get negative x times x squared and negative x cubed. And then negative x times y squared gives you a negative x y squared. And then finally, if we move the negative terms to the right-hand side, which was zero, we end up with y cubed plus y x squared is greater than x cubed plus x y squared. Notice these were the terms we wanted, but now we have the negation of our premise, right? Because as this thing is greater than, that means the negation would be y cubed plus y x squared is less than or equal to x cubed plus x y squared, like so. So we have now arrived upon the negation and we don't necessarily need to be like, we've negated the premise. You can say that if you want to. If you think there's any lack of clarity there, put that in there. But sometimes we do ourselves a disservice by saying too much, like we don't necessarily need to say, I will prove this statement by contra position. You can say that if you want to. And again, if you think it would benefit the reader to actually declare the proof technique you're going to use, do it. But in professional mathematical writings, very few people say that. But it's not completely isolated. I mean, as in like, some people say like, oh, we'll prove this by induction. Sometimes the proof technique is mentioned specifically, but don't feel like you have to say that. Only say it for the sake of clarity. Like by not saying it, does it make the proof more confusing? And it might be depending upon your audience, right? If you're writing to professional mathematical researchers, you don't need to tell them, this is a proof by contra position. So they've been there before they can do it. But if you're writing to like, transition to advanced mathematics students, then they're not used to proofs by contra position yet. So therefore you might need to say that we will prove this by contra position. That's perfectly fine. And so that judgment has to be made by the author to decide what is necessary for the sake of clarity or not. Let's do one more example here. Let's do one with some divisibility here. Suppose we have integers x and y. And if 5 does not divide the product xy, then 5 does not divide x and 5 does not divide y. Now in this situation, you'll notice that this is a statement that's negated and these statements are also negated. So because there's a bunch of negations, there's a bunch of knots in play, this is also a reason to consider using contra positives because if I negate something that's already been negated, it's a double negative and hence becomes arguably a simple argument in that situation. So if I do this by contra positive, which I'm going to do, I'm going to take my premise here, excuse me, my conclusion, and I have to negate that. So we're going to negate 5 doesn't divide x and 5 doesn't divide y. But as we're negating things, we have to be careful about how negations work. Like how do you negate quantifiers? How do you negate connectives like and and or? The De Morgan law comes into play here. So the negation would look like not 5 doesn't divide x or not 5 doesn't divide y. Now of course these other ones simplify. If 5 does not not divide x, that means 5 divides x, or 5 divides y. So that would be the negation of that. And if you want to put all of those details into your proof, you are welcome to do so, but you have to make this argument between completeness and clarity. Because it's like, wait, how are those things competing with each other? When your proofs start to get longer and longer and longer and longer, because you're providing details upon details upon details, you think you're doing yourself a service for the sake of completeness. It's like, oh, I concluded all the details. But the problem is the longer and longer the proofs get, the more and more cognitive load you are putting onto your reader. There's more things they have to keep track of. There's more things they have to read and understand and remember. And therefore it can make it difficult to understand what's happening because they don't see the trees inside of the forest. I should say they don't see the forest inside the trees. How are the phrase goes, right? There's just too many trees. We'll put it that way. And so they can get confused because of the length of it. And therefore a one way to shorten a proof is to put some of the calculations, and in this case, this is a logical calculation, to put some of the calculations onto the reader. I know that seems strange, but you give them some of the burden, and that actually takes a burden off of themselves. So then when you start with something like suppose that x is five divides x or five divides y, then the reader, when they look at that, it's like, hmm, oh, that's the negation of this. They're proven by contrapositive. Okay, so they make that mental note. They sort of certify that up to this point, I'm good. And then they can keep on going from there. And then they don't have to worry about it anymore. It's actually, believe it or not, is more clear to let your reader participate. It's much like when you're teaching, if I'm teaching students, I need to give them something to do. It's not just me talking over and over and over again. They need to do these calculations themselves. That'll deepen their understanding. By allowing the reader to do some of the calculations, you are doing them a favor. And so while I did this negation calculation, I don't include any of the details in the proof. Instead, the reader will be like, why are we looking at five divide X or five divide Y? That's the negation of the conclusion of contrapositive proof. You're doing them a service by doing that. Now, because our assumption is an OR statement, there are cases that have to be considered. Five could divide X or five could divide Y. I don't know which one it does. But it turns out that there's really no difference between X and Y. You have these two different numbers, they're integers, and I'm going to take their product, but it doesn't matter who's the first factor or the second factor. So this is a great time where we can then be like, without the loss of generality, we assume that X divides a five divides X. Because assuming five divides X is no different than assuming five divides Y. It divides one of them. Let's just assume it was X. If it actually was Y, they will secretly relabel them. Y is now X and X is now Y, problem solved. Now, because five divides X, there exists an integer A such that X equals five times A. Now, if I take this equation, this is an equation, and I times both sides by Y, the left-hand side becomes XY, the right-hand side becomes five AY. Notice how I put the parentheses here. The right-hand side then suggests that XY is divisible by Y. We'll get this statement right here, which of course, if five divides XY, that's then the negation of my premise, and that then finishes the proof by contraposition. The proof is now done. I didn't need this last sentence, but again, I put it in for the sake of clarity. I did want my reader to know the proof is done, in which case they're like, why is the proof done? We just proved that five divides five XY. Oh, that's the negation of the premise. We're doing by contrapositive. I forgot that. Yeah, we're done. So again, you can say things, but we say things for the sake of clarity. And sometimes saying too much can be a problem with that as well. So in addition to some of these writing tips, hopefully we now have a better understanding that we can prove conditionals by proving they're contrapositive instead. And sometimes working with the contrapositive is a simpler approach to them working with the conditional. Not always, but we'll talk about some more of that in the future.