Skip to main content

Contraposition

The contraposition of the statement PQP \Rightarrow Q is ¬Q¬P\neg Q \Rightarrow \neg P. Despite being equivalent, we will often find that one statement is easier to prove than another. Let us look at some concrete examples. We say that ab(modm)a \equiv b \pmod{m} ("aa is congruent to bb modulo mm") if m(ab)m \mid (a - b). For example, 1218(mod3)12 \equiv 18 \pmod{-3} and 34(mod7)3 \equiv -4 \pmod{7}. Notice, x1(mod2)x \equiv 1 \pmod{2} for odd integer xx.

Example 9

For all integers a,ba, b where aba \mid b, if bb is odd, then aa is odd. Try to prove this by a direct proof, and you will see that it is a bit confusing. On the other hand, if we prove the contrapositive, it is entirely trivial: Assume that aa is even, so a=2ka = 2k for some kZk \in \mathbb{Z}. Since aa divides bb, we have b=q2k=2(kq)b = q \cdot 2k = 2(kq) for some qZq \in \mathbb{Z}. This implies that bb is also even.

Example 10

Prove: (x)[(y)(xy)x=±1](\forall x)[(\forall y)(x \mid y) \Rightarrow x = \pm 1]. This can be read in English as "an integer xx that divides every integer must be +1+1 or 1-1". So the contraposition is (x)[x±1(y)(x∤y)](\forall x)[x \neq \pm 1 \Rightarrow (\exists y)(x \not\mid y)]. To prove this, assume that we have integer x±1x \neq \pm 1. Notice that x∤1x \not\mid 1 (and integer 11 serves as our yy).

Example 11 (Pigeonhole's principle)

Let nn and kk be positive integers. Place nn objects into kk boxes. If n>kn > k, then at least one box contains more than one object. To prove this, assume that each box contains at most one object. This implies that the total number of objects is at most the number of boxes (nk)(n \le k).

From these examples, it may seem like there is no way to tell in advance whether the direct statement or its contraposition would be easier to prove. Indeed, this is something that you would pick up on once you get used to them (which we hope would happen to everyone before the end of this course).

Exercise 1

Let xx be an integer. If x2x^2 is even, then xx is even.