squaring both sides of this equation, we obtainn2=4k2=2(2k2), which implies thatn2 is also even becausen2=2t, wheret =2k2. We have proved that ifnis an integer andn2is odd, thennis odd. Our attempt to find a proof by contraposition succeeded. ▲
We have now shown that the assumption of¬pleads to the equation√
2=a/b, wherea andbhave no common factors, but bothaandbare even, that is, 2 divides bothaandb. Note that the statement that√
2=a/b, whereaandbhave no common factors, means, in particular, that 2 does not divide bothaandb. Because our assumption of¬pleads to the contradiction that 2 divides bothaandband 2 does not divide bothaandb,¬pmust be false. That is, the statementp, “√
2 is irrational,” is true. We have proved that√
2 is irrational. ▲
Proof by contradiction can be used to prove conditional statements. In such proofs, we first assume the negation of the conclusion. We then use the premises of the theorem and the negation of the conclusion to arrive at a contradiction. (The reason that such proofs are valid rests on the logical equivalence ofp→qand(p∧ ¬q)→F. To see that these statements are equivalent, simply note that each is false in exactly one case, namely whenpis true andqis false.)
Note that we can rewrite a proof by contraposition of a conditional statement as a proof by contradiction. In a proof ofp→q by contraposition, we assume that¬qis true. We then show that¬pmust also be true. To rewrite a proof by contraposition ofp→q as a proof by contradiction, we suppose that bothpand¬qare true. Then, we use the steps from the proof of¬q→ ¬pto show that¬pis true. This leads to the contradictionp∧ ¬p, completing the proof. Example 11 illustrates how a proof by contraposition of a conditional statement can be rewritten as a proof by contradiction.
EXAMPLE 11 Give a proof by contradiction of the theorem “If 3n+2 is odd, thennis odd.”
Solution:Letpbe “3n+2 is odd” andqbe “nis odd.” To construct a proof by contradiction, assume that bothpand¬q are true. That is, assume that 3n+2 is odd and thatnis not odd.
Becausenis not odd, we know that it is even. Because nis even, there is an integer k such thatn=2k. This implies that 3n+2=3(2k)+2=6k+2=2(3k+1). Because 3n+2 is 2t, wheret =3k+1, 3n+2 is even. Note that the statement “3n+2 is even” is equivalent to the statement¬p, because an integer is even if and only if it is not odd. Because bothpand
¬pare true, we have a contradiction. This completes the proof by contradiction, proving that if
3n+2 is odd, thennis odd. ▲
Note that we can also prove by contradiction thatp→q is true by assuming thatpand
¬q are true, and showing thatq must be also be true. This implies that ¬q and q are both true, a contradiction. This observation tells us that we can turn a direct proof into a proof by contradiction.
PROOFS OF EQUIVALENCE To prove a theorem that is a biconditional statement, that is, a statement of the formp↔q, we show thatp→qandq→pare both true. The validity of this approach is based on the tautology
(p↔q)↔(p→q)∧(q→p).
EXAMPLE 12 Prove the theorem “Ifnis an integer, thennis odd if and only ifn2is odd.”
Solution:This theorem has the form “pif and only ifq,” wherepis “nis odd” andqis “n2 is odd.” (As usual, we do not explicitly deal with the universal quantification.) To prove this theorem, we need to show thatp→qandq→pare true.
We have already shown (in Example 1) thatp→qis true and (in Example 8) thatq→p is true.
Because we have shown that both p→q andq→p are true, we have shown that the
theorem is true. ▲
Sometimes a theorem states that several propositions are equivalent. Such a theorem states that propositionsp1, p2, p3, . . . , pnare equivalent. This can be written as
p1↔p2↔ · · · ↔pn,
which states that allnpropositions have the same truth values, and consequently, that for alli andjwith 1≤i≤nand 1≤j ≤n,piandpj are equivalent. One way to prove these mutually equivalent is to use the tautology
p1↔p2↔ · · · ↔pn↔(p1→p2)∧(p2→p3)∧ · · · ∧(pn→p1).
This shows that if thenconditional statementsp1→p2,p2→p3, . . . , pn →p1can be shown to be true, then the propositionsp1, p2, . . . , pnare all equivalent.
This is much more efficient than proving thatpi→pj for alli =j with 1≤i≤nand 1≤j ≤n. (Note that there aren2−nsuch conditional statements.)
When we prove that a group of statements are equivalent, we can establish any chain of conditional statements we choose as long as it is possible to work through the chain to go from any one of these statements to any other statement. For example, we can show thatp1,p2, and p3are equivalent by showing thatp1→p3,p3→p2, andp2→p1.
EXAMPLE 13 Show that these statements about the integernare equivalent:
p1: nis even.
p2: n−1 is odd.
p3: n2is even.
Solution:We will show that these three statements are equivalent by showing that the conditional statementsp1→p2,p2→p3, andp3→p1are true.
We use a direct proof to show thatp1→p2. Suppose thatnis even. Thenn=2kfor some integerk. Consequently,n−1=2k−1=2(k−1)+1. This means thatn−1 is odd because it is of the form 2m+1, wheremis the integerk−1.
We also use a direct proof to show thatp2→p3. Now supposen−1 is odd. Thenn− 1=2k+1 for some integerk. Hence,n=2k+2 so thatn2=(2k+2)2=4k2+8k+4= 2(2k2+4k+2). This means thatn2is twice the integer 2k2+4k+2, and hence is even.
To provep3→p1, we use a proof by contraposition. That is, we prove that ifnis not even, thenn2is not even. This is the same as proving that ifnis odd, thenn2is odd, which we have
already done in Example 1. This completes the proof. ▲
COUNTEREXAMPLES In Section 1.4 we stated that to show that a statement of the form
∀xP (x)is false, we need only find acounterexample, that is, an examplex for whichP (x) is false. When presented with a statement of the form∀xP (x), which we believe to be false or which has resisted all proof attempts, we look for a counterexample. We illustrate the use of counterexamples in Example 14.
EXAMPLE 14 Show that the statement “Every positive integer is the sum of the squares of two integers” is false.
Solution:To show that this statement is false, we look for a counterexample, which is a particular integer that is not the sum of the squares of two integers. It does not take long to find a counterex- ample, because 3 cannot be written as the sum of the squares of two integers. To show this is the case, note that the only perfect squares not exceeding 3 are 02=0 and 12=1. Furthermore, there is no way to get 3 as the sum of two terms each of which is 0 or 1. Consequently, we have shown that “Every positive integer is the sum of the squares of two integers” is false. ▲