← Logic for the TMUA

The Contrapositive

What you will get from this section. You will learn what the contrapositive of an implication is, why it is equivalent to the original implication, and how to express it in several different but equivalent ways.

The contrapositive from necessary conditions

Suppose we have an implication

PQ.P \Rightarrow Q.

One way to say this is:

Q is a necessary condition for P.Q \text{ is a necessary condition for } P.

QQ is necessary for PP means that:

without Q, P could not be true.\text{without } Q,\ P \text{ could not be true}.

In other words:

if Q is not true, then P cannot be true.\text{if } Q \text{ is not true},\text{ then } P \text{ cannot be true}.

Symbolically, we can write this as:

¬Q¬P.\neg Q \Rightarrow \neg P.

This implication is called the contrapositive of PQP \Rightarrow Q, and it is yet another way to express the idea of PQP \Rightarrow Q, in addition to all the other equivalent ways you saw in section 2.

Example 1

Let PP be "nn is a multiple of 1010", and let QQ be "nn is even".

We know that

n is a multiple of 10n is even.n \text{ is a multiple of } 10 \Rightarrow n \text{ is even}.

Here, being even is necessary for being a multiple of 1010. Without being even, nn could not be a multiple of 1010.

So the contrapositive is

n is not evenn is not a multiple of 10.n \text{ is not even} \Rightarrow n \text{ is not a multiple of } 10.

For an integer nn, this can also be written as

n is oddn is not a multiple of 10.n \text{ is odd} \Rightarrow n \text{ is not a multiple of } 10.

Example 2

We know that

x>2x>1.x>2 \Rightarrow x>1.

Here, x>1x>1 is necessary for x>2x>2. Without x>1x>1, it is impossible to have x>2x>2.

The contrapositive is

x1x2.x \leq 1 \Rightarrow x \leq 2.

This is true. If xx is not greater than 11, then xx certainly cannot be greater than 22.

Example 3

Suppose

Jane is in LondonJane is in England.\text{Jane is in London} \Rightarrow \text{Jane is in England}.

Being in England is necessary for being in London. Without being in England, Jane could not be in London.

So the contrapositive is

Jane is not in EnglandJane is not in London.\text{Jane is not in England} \Rightarrow \text{Jane is not in London}.

This is often how we naturally use the contrapositive in real life. If someone says, "Jane is not even in England", then we can immediately conclude that Jane is not in London.

The contrapositive family

So the contrapositive of PQP \Rightarrow Q is ¬Q¬P\neg Q \Rightarrow \neg P, but ¬Q¬P\neg Q \Rightarrow \neg P is itself an implication! So we can express it using the same family of equivalent phrasings we used before from section 2.

The following all express the contrapositive of PQP \Rightarrow Q:

  • ¬Q\neg Q implies ¬P\neg P, or symbolically ¬Q¬P\neg Q \Rightarrow \neg P.
  • If ¬Q\neg Q, then ¬P\neg P.
  • ¬Q\neg Q is a sufficient condition for ¬P\neg P.
  • ¬P\neg P is an inevitable consequence of ¬Q\neg Q.
  • ¬P\neg P is a necessary condition for ¬Q\neg Q.
  • ¬Q\neg Q only if ¬P\neg P.

Example 4

Consider the implication

n is a multiple of 6n is even.n \text{ is a multiple of } 6 \Rightarrow n \text{ is even}.

Here,

P:n is a multiple of 6P: n \text{ is a multiple of } 6

and

Q:n is even.Q: n \text{ is even}.

The contrapositive is

n is not evenn is not a multiple of 6.n \text{ is not even} \Rightarrow n \text{ is not a multiple of } 6.

So the contrapositive family is:

  • nn is not even implies nn is not a multiple of 66.
  • If nn is not even, then nn is not a multiple of 66.
  • nn is not even is a sufficient condition for nn not being a multiple of 66.
  • nn not being a multiple of 66 is an inevitable consequence of nn not being even.
  • nn not being a multiple of 66 is a necessary condition for nn not being even.
  • nn is not even only if nn is not a multiple of 66.

For an integer nn, "not even" could also be replaced by "odd".

Example 5

Consider the implication

Jane is in ParisJane is in France.\text{Jane is in Paris} \Rightarrow \text{Jane is in France}.

Here,

P:Jane is in ParisP: \text{Jane is in Paris}

and

Q:Jane is in France.Q: \text{Jane is in France}.

The contrapositive is

Jane is not in FranceJane is not in Paris.\text{Jane is not in France} \Rightarrow \text{Jane is not in Paris}.

So the contrapositive family is:

  • Jane is not in France implies Jane is not in Paris.
  • If Jane is not in France, then Jane is not in Paris.
  • Jane not being in France is a sufficient condition for Jane not being in Paris.
  • Jane not being in Paris is an inevitable consequence of Jane not being in France.
  • Jane not being in Paris is a necessary condition for Jane not being in France.
  • Jane is not in France only if Jane is not in Paris.

The two families of equivalent ways to express PQP \Rightarrow Q

We now have two families of statements that all express the same logical idea.

The first family is the original implication family:

  • PP implies QQ, or symbolically PQP \Rightarrow Q.
  • If PP, then QQ.
  • PP is a sufficient condition for QQ.
  • QQ is an inevitable consequence of PP.
  • QQ is a necessary condition for PP.
  • PP only if QQ.

The second family is the contrapositive family:

  • ¬Q\neg Q implies ¬P\neg P, or symbolically ¬Q¬P\neg Q \Rightarrow \neg P.
  • If ¬Q\neg Q, then ¬P\neg P.
  • ¬Q\neg Q is a sufficient condition for ¬P\neg P.
  • ¬P\neg P is an inevitable consequence of ¬Q\neg Q.
  • ¬P\neg P is a necessary condition for ¬Q\neg Q.
  • ¬Q\neg Q only if ¬P\neg P.

Every statement in these two families is equivalent to every other statement in the two families. So we now have more than 10 different ways to express the idea of PP implying QQ.

One key skill you need to develop is the ability to write out all these different equivalent forms, given any one version of PQP \Rightarrow Q.

Optional: proof that the contrapositive is equivalent to PP implies QQ.

This part is optional, but it is useful to see this result formally proved. The proof also gives a first glimpse of proof by contradiction, which is our next topic, and uses a neat self-application idea. I hope you find it interesting!

First, suppose

PQ.P \Rightarrow Q.

We want to prove

¬Q¬P.\neg Q \Rightarrow \neg P.

Assume ¬Q\neg Q is true. We need to show that ¬P\neg P is true. Just to be clear, our known facts here are: PQP\Rightarrow Q, and ¬Q\neg Q is true. Based on these two facts, we wish to show that ¬P\neg P must be true.

Now, in any situation, either PP is true or ¬P\neg P is true. Let's examine these in turn to see if each is possible.

Case 1: suppose PP is true, but then by the fact PQP \Rightarrow Q, we immediately deduce that QQ is true, and now QQ and ¬Q\neg Q are both true. This cannot be right, which is what we call a contradiction. Thus the conclusion here is that our supposition that "PP is true" is wrong.

Now if Case 1 is wrong, then the only remaining possibility, Case 2, that ¬P\neg P is true, must be true, as exactly one of them is true in any given situation. Hence we now conclude that under these conditions, ¬P\neg P must be true, and we have proven:

(PQ)(¬Q¬P)().(P \Rightarrow Q) \Rightarrow (\neg Q \Rightarrow \neg P) \qquad (*).

By the way, this is an example of proof by contradiction, which I will discuss in detail in the next section.

To finish proving PQP \Rightarrow Q is equivalent to ¬Q¬P\neg Q \Rightarrow \neg P, we next must show the reverse direction, or the converse of the result we have just proved, is also true, that is: ¬Q¬P\neg Q \Rightarrow \neg P implies PQP \Rightarrow Q. For this, we can simply use the result ()(*) we have just proven! By setting PP in ()(*) as ¬Q\neg Q, and setting QQ in ()(*) as ¬P\neg P, the result ()(*) immediately becomes:

(¬Q¬P)(¬(¬P)¬(¬Q)).(\neg Q \Rightarrow \neg P) \Rightarrow (\neg(\neg P) \Rightarrow \neg(\neg Q)).

But ¬(¬P)\neg(\neg P) is just PP, and ¬(¬Q)\neg(\neg Q) is just QQ. Therefore this becomes:

(¬Q¬P)(PQ).(\neg Q \Rightarrow \neg P) \Rightarrow (P \Rightarrow Q).

So we have now shown both directions:

(PQ)(¬Q¬P),(P \Rightarrow Q) \Rightarrow (\neg Q \Rightarrow \neg P),

and

(¬Q¬P)(PQ).(\neg Q \Rightarrow \neg P) \Rightarrow (P \Rightarrow Q).

Therefore,

(PQ)    (¬Q¬P),(P \Rightarrow Q) \iff (\neg Q \Rightarrow \neg P),

and they are equivalent.

Summary

  • The contrapositive of PQP \Rightarrow Q is ¬Q¬P\neg Q \Rightarrow \neg P.
  • The easiest way to understand the contrapositive is through necessary conditions.
  • If QQ is necessary for PP, then without QQ, PP cannot be true.
  • Therefore, PQP \Rightarrow Q gives ¬Q¬P\neg Q \Rightarrow \neg P.
  • The original implication and its contrapositive are equivalent.
  • There are now two families of equivalent ways to express PQP \Rightarrow Q: the original implication family and the contrapositive family.