# Using proof by contradiction vs proof of the contrapositive

What is the difference between a "proof by contradiction" and "proving the contrapositive"? Intuitive, it feels like doing the exact same thing. And when I compare an exercise, one person proves by contradiction, and the other proves the contrapositive, the proofs look almost exactly the same.

For example, say I want to prove: $P \implies Q$ When I want to prove by contradiction, I would say assume this is not true. Assume $Q$ is not true, and $P$ is true. Blabla, but this implies $P$ is not true, which is a contradiction.

When I want to prove the contrapositive, I say. Assume $Q$ is not true. Blabla, this implies $P$ is not true.

The only difference in the proof is that I assume $P$ is true in the beginning, when I want to prove by contradiction. But this feels almost redundant, as in the end I always get that this is not true. The only other way that I could get a contradiction is by proving that $Q$ is true. But this would be the exact same things as a direct proof.

Can somebody enlighten me a little bit here ? For example: Are there proofs that can be proven by contradiction but not proven by proving the contrapositve?

• Also related: math.stackexchange.com/questions/71245/… and more importantly, math.stackexchange.com/questions/227109/… – Asaf Karagila Dec 20 '12 at 19:06
• Excellent question, +1. – Rudy the Reindeer Dec 20 '12 at 19:16
• Andrej Bauer had a recent blog post about this. "I am discovering that mathematicians cannot tell the difference between “proof by contradiction” and “proof of negation”. " – MJD Dec 20 '12 at 22:39
• @MJD: Nearly three years is not very recent in terms of the internet. Just to get some perspective, Google+ was not yet conceived when Andrej posted this. – Asaf Karagila Dec 21 '12 at 1:10
• @asaf: I thought it was recent because I hadn't seen it when it was new, or perhaps because I saw it when it was new, forgot it, and saw it again last week. – MJD Dec 21 '12 at 1:24

## 6 Answers

There is a useful rule of thumb, when you have a proof by contradiction, to see whether it is "really" a proof by contrapositive.

In a proof of by contrapositive, you prove $P \to Q$ by assuming $\lnot Q$ and reasoning until you obtain $\lnot P$.

In a "genuine" proof by contradiction, you assume both $P$ and $\lnot Q$, and deduce some other contradiction $R \land \lnot R$.

So, at then end of your proof, ask yourself: Is the "contradiction" just that I have deduced $\lnot P$, when the implication was $P \to Q$? Did I never use $P$ as an assumption? If both answers are "yes" then your proof is a proof by contraposition, and you can rephrase it in that way.

For example, here is a proof by "contradiction":

Proposition: Assume $A \subseteq B$. If $x \not \in B$ then $x \not \in A$.

Proof. We proceed by contradiction. Assume $x \not \in B$ and $x \in A$. Then, since $A \subseteq B$, we have $x \in B$. This is a contradiction, so the proof is complete.

That proof can be directly rephrased into a proof by contrapositive:

Proposition: Assume $A \subseteq B$. If $x \not \in B$ then $x \not \in A$.

Proof. We proceed by contraposition. Assume $x \in A$. Then, since $A \subseteq B$, we have $x \in B$. This is what we wanted to prove, so the proof is complete.

Proof by contradiction can be applied to a much broader class of statements than proof by contraposition, which only works for implications. But there are proofs of implications by contradiction that cannot be directly rephrased into proofs by contraposition.

Proposition: If $x$ is a multiple of $6$ then $x$ is a multiple of $2$.

Proof. We proceed by contradiction. Let $x$ be a number that is a multiple of $6$ but not a multiple of $2$. Then $x = 6y$ for some $y$. We can rewrite this equation as $1\cdot x = 2\cdot (3y)$. Because the right hand side is a multiple of $2$, so is the left hand side. Then, because $2$ is prime, and $1\cdot x$ is a multiple of $2$, either $x$ is a multiple of $2$ or $1$ is a multiple of $2$. Since we have assumed that $x$ is not a multiple of $2$, we see that $1$ must be a multiple of $2$. But that is impossible: we know $1$ is not a multiple of $2$. So we have a contradiction: $1$ is a multiple of $2$ and $1$ is not a multiple of $2$. The proof is complete.

Of course that proposition can be proved directly as well: the point is just that the proof given is genuinely a proof by contradiction, rather than a proof by contraposition. The key benefit of proof by contradiction is that you can stop when you find any contradiction, not only a contradiction directly involving the hypotheses.

• It'd be very helpful if you also explicitly addressed the relationship between nonessential proof by contradicton vs. direct proof in proofs like Euclid's proof that there are infinitely many primes. Then we could refer to this answer as a canonical answer for eliminating such nonessential uses of contradiction. I don't think that will be clear to beginners from what is written above. it is addressed briefly in passing in Hardy and Woodgold's intelligencer article (and, iirc, also mentioned in passing in some answers here). – Bill Dubuque Mar 17 '14 at 4:20
• @Bill Dubuque: that is a good idea, but I don't know if it fits into this question very well. I wrote something at math.stackexchange.com/a/715438/630 – Carl Mummert Mar 17 '14 at 12:49
• Thanks, that should prove very helpful to many readers. However, it doesn't seem to address the point I raised above, which perhaps was not clear. What I meant was that many proofs of Euclid's proposition P by contradiction are simply proofs of P that have prepended an unused assumption of $\,\lnot$ P. Thus, similar to above, deleting that unused assumption yields a direct proof of P. $\ \$ – Bill Dubuque Mar 17 '14 at 23:35
• @Bill that's covered by Andrej Bauer's post referenced above though. – Nicolas M. Gutierrez May 15 at 3:04
• @Nicolas But we prefer to have answers on-site (vs. links to off-site content - which usually eventually succumb to link rot) – Bill Dubuque May 15 at 7:45

To prove $P \rightarrow Q$, you can do the following:

1. Prove directly, that is assume $P$ and show $Q$;
2. Prove by contradiction, that is assume $P$ and $\lnot Q$ and derive a contradiction; or
3. Prove the contrapositive, that is assume $\lnot Q$ and show $\lnot P$.

Sometimes the contradiction one arrives at in $(2)$ is merely contradicting the assumed premise $P$, and hence, as you note, is essentially a proof by contrapositive $(3)$. However, note that $(3)$ allows us to assume only $\lnot Q$; if we can then derive $\lnot P$, we have a clean proof by contrapositive.

However, in $(2)$, the aim is to derive a contradiction: the contradiction might not be arriving at $\lnot P$, if one has assumed ($P$ and $\lnot Q$). Arriving at any contradiction counts in a proof by contradiction: say we assume $P$ and $\lnot Q$ and derive, say, $Q$. Since $Q \land \lnot Q$ is a contradiction (can never be true), we are forced then to conclude it cannot be that both $(P \land \lnot Q)$.

But note that $\lnot (P \land \lnot Q) \equiv \lnot P \lor Q\equiv P\rightarrow Q.$

So a proof by contradiction usually looks something like this ($R$ is often $Q$, or $\lnot P$ or any other contradiction):

• $P \land \lnot Q$ Premise
• $P$
• $\lnot Q$
• $\vdots$
• $R$
• $\vdots$
• $\lnot R$
• $\lnot R \land R$ Contradiction

$\therefore \lnot (P \land \lnot Q) \equiv P \rightarrow Q$

• "We are forced then to conclude $¬P$, since $Q∧¬Q$ is a contradiction." But this is essentially proving directly $(1)$, right ? – Kasper Dec 20 '12 at 19:11
• No, this is not the same as proving directly: To prove P, one uses step by step implications to arrive directly at $Q$, without assuming $\lnot Q$. (2) Note that the contradiction obtained may may be that assuming P and $\lnot Q$ leads to both $R \land \lnot R$ (R may happen to be Q)$. – amWhy Dec 20 '12 at 19:18 • Yes, Kasper, usually. It's just that in longer proofs, we may find a point were some other statement AND its negation follow from assuming both$P\land \lnot Q$. (e.g., P may imply R, and$\lnot Q$may imply$\lnot R$, in which we have to conclude that we cannot have both$P$and$\lnot Q$, which is equivalent to proving$P\rightarrow Q$). – amWhy Dec 20 '12 at 19:44 • Okay, I understand. I've one other question if you don't mind :). Does a problem like the following exist? You're assuming:$P∧¬Q$(to prove a contradiction). And in this problem it's impossible to prove$Q∧¬Q$or$P∧¬P$from this assumption. But it's possible to prove another contradiction$R∧¬R$. – Kasper Dec 20 '12 at 20:02 • Yes, I'll try to find an example. There are many...usually longer proofs, where we assume$P \land \lnot Q$...then show$\lnot Q \rightarrow q_i ....\rightarrow...q_j....\rightarrow R$and$P \rightarrow ...p_i....\rightarrow...p_j \rightarrow \lnot R$, giving$R \land \lnot R$. When I have a little time to look through some texts, for a shortish proof using this, I'll post here, or we can go through it in chat...either way, I'll let you know. – amWhy Dec 20 '12 at 20:09 It's not the same. If$P$and$Q$are statements about instances that (a priori independently) are true for some instances and false for others then proving$P\Rightarrow Q$is the same as proving the contrapositive$\neg Q\ \Rightarrow \neg P$. Both mean the same thing: The set of instances for which$P$is true is contained in the set of instances where$Q$is true. Proving a statement$A$by contradiction is something else: You add$\neg A$to your list of axioms, and using the rules of logic arrive at a contradiction, e.g., at$1=0$. Then you say: My axiom system was fine before adding$\neg A$. Since this addition has spoiled it, in reality$A$has to be true. An example: You want to prove the statement $$A:\quad {\rm "The\ number}\ \sqrt{2}\ {\rm is\ irrational."}$$ Then you add$\sqrt{2}={p\over q}$to your list of axioms about rational numbers and arrive at a contradiction. One difference is that proof by contrapositive only applies to propositions of the form$A \to B$("if-then propositions"). However not every proposition is a "if-then proposition", for example, consider the proposition, exist x real for all p,q integer, x != p/q, there is no$\to$inside that proposition, so it is not feasible to prove it by contrapositive. Proof by contrapositive:$(\neg B \to \neg A) \to (A \to B)$Proof by contradiction:$(\neg A \to (B \land\neg B)) \to A $[Note: The post by amWhy is pretty much what I like to say, but still prefer to put my response as a separate answer, hoping some readers might find it more useful] First, let me restrict my response only to conditional statements of the form$P\rightarrow $Q. With this, let's understand two important equivalences as listed below.$P\rightarrow Q \equiv \lnot Q\rightarrow \lnot P$...(I)$P\rightarrow Q \equiv \lnot (\lnot (P\rightarrow Q)) \equiv \lnot (P \land \lnot Q) \equiv (P \land \lnot Q) \rightarrow C$where C is contradiction ...(II) For proof by contraposition, we use equivalence (I) where we start by assuming$\lnot Q$and show, by use of calculations and a priori knowledge about other theorems, etc., that$\lnot P$is true. For proof by contradiction, we use equivalence (II) where we start by assuming$P$and$\lnot Q$and show this leads to some kind of contradiction. The contradiction can be with$P$, or$Q$, or with altogether new statement$R$. However, as long as there is some contradiction, it essentially proves the original statement. In this regard, also note that, when the contradiction is with either$P$or$Q$(i.e. any of the initial assumptions), the proof by contradiction often looks very similar to proof by contraposition, especially for the ones who are not clear about the differences in (I) and (II). Example$1$: If$n$is an odd integer, then$5n-3$is an even integer. You may prove this either by contradicting$P$or by$Q$. Example$2$:If$f(x)=\frac{2x+3}{x+2}$, then for every real$x, f(x) \neq 2$. You may find a contradiction in an altogether new statement say$R$:= "$3=4\$"

Surprisingly, no one has mentioned quantifiers.

To quote a comment from Bernard on a duplicate of this question:

Take the assertion: ‘When Mr So and So is happy, he sings. The contrapositive asserts that ‘Mr So and So does not sing so he's not happy’. The negation asserts that ‘There are days when Mr So and So is happy, yet he does not sing’.

I converted this example into logical notation with quantifiers, which makes the difference between negation and contrapositive more obvious.

Original statement: Any day when Mr. So-and-so is happy is a day when he sings. $$\forall d \in D_{ays}: (H_{appy}(M_r) \rightarrow S_{ings}(M_r))$$

Contrapositive: Any day when Mr. So-and-so does not sing is a day when he is not happy. $$\forall d \in D_{ays}: (\neg S_{ings}(M_r) \rightarrow \neg H_{appy}(M_r))$$

Negation: There are some days (at least one day) when Mr. So-and-so is happy, but does not sing. $$\exists d \in D_{ays}: (H_{appy}(M_r) \land \neg S_{ings}(M_r))$$

This doesn't directly address the different types of proofs based on these concepts (addressed in several answers already), but it may assist an understanding of that.

To prove by contrapositive, in the above example, you would start with the expression (proposition) "not singing" and directly derive "not happy" (perhaps by algebraic rearrangement).

To prove by contradiction, on the other hand, you would assume the negation, and then derive from there until you had proven two contradictory facts.