Some true statements give a direct proof nothing to work with, because the hypothesis says nothing usable about the thing the conclusion is about.
The previous lesson proved conditionals by assuming the hypothesis and walking forward from definitions, and it ended on a claim that walk cannot finish: for every integer , if is even then is even. It also used, without proof, the fact that is irrational. This lesson pays both debts with two indirect methods, proof by contrapositive and proof by contradiction, proves Euclid's theorem that there are infinitely many primes, and says how to choose a method. It assumes the definitions of even, odd and divisibility: is even when for some integer , odd when , and when for some integer .
Turning the conditional round
The contrapositive of is , and a truth table shows the two are true in exactly the same rows. So a proof of the contrapositive is a proof of the original, not an approximation to one. A proof by contrapositive is a direct proof aimed at that equivalent statement: assume , and reach .
What makes the swap worth doing is that negation can turn a useless hypothesis into a useful one. " is even" gives , and there is no way back through the square to . Its partner in the contrapositive is " is not even", which, because every integer is even or odd and none is both, means " is odd", and that gives , a formula for itself. Squaring a formula is easy. Unsquaring a fact is not.
Example. Prove that for every integer , if is even then is even.
We prove the contrapositive: for every integer , if is not even then is not even. Let be an integer that is not even. Since every integer is even or odd, is odd, so for some integer . Then . Since is an integer, is odd, and since no integer is both odd and even, is not even. This proves the contrapositive, and therefore the original statement.
The first sentence is not decoration. Without it, the proof looks like a proof of the converse, and a careful reader will wonder whether the writer has confused the two.
Now you. Prove that for every integer , if then . (Use the fact that every integer is of the form , or for some integer .)
Answer
We prove the contrapositive: if does not divide then does not divide . Let be an integer not divisible by . Then or for some integer . In the first case , and in the second . Either way leaves remainder on division by , so does not divide . This proves the contrapositive, and so the claim.
Assuming the opposite
A proof by contradiction proves a statement by assuming and deriving something impossible: a statement together with its negation. The justification is one row of a truth table. The conditional has a conclusion that is false in every row, so if the conditional has been proved, its hypothesis must be false too. And false means true.
For a conditional , the thing to assume is its negation, which is . So the proof starts with two assumptions rather than one: everything the direct proof had, plus the negated conclusion as a further fact to use.
The method is old. Aristotle, in the Prior Analytics of the fourth century BCE, gives as his standard example of reasoning "to the impossible" the proof that the diagonal of a square cannot be measured by its side, since otherwise odd numbers would equal even ones: the next proof in this lesson.
The contrapositive is a special case: if the argument uses to reach , that contradicts the assumed . The difference is the destination. A contrapositive proof has a fixed target, , while a proof by contradiction may end at any impossibility at all.
The square root of two
A real number is rational if it equals for some integers and with , and irrational otherwise. "Irrational" is a negative: no pair of integers, out of infinitely many, has a certain property. Contradiction assumes one pair exists and extracts an impossibility from it, a single argument about a single, arbitrary pair.
Approximations show why checking cannot settle it. The fraction gives against , and gives against . The gap is one each time, and no amount of searching can show that it never closes.
Example. Prove that is irrational.
Suppose, for contradiction, that is rational, so for some integers and with . If and are both even, cancel a factor of from each; the denominator shrinks in size each time, so this must stop, and we may assume that and are not both even. Squaring and multiplying by gives , so is even. By the result proved above, is even, so for some integer . Substituting, , so , and is even. By the same result, is even. So and are both even, which contradicts the choice of and . Hence is not rational.
A proof that proves too much is wrong, so why does it not show irrational? Run it with : from the next step would need "if then ", and that is false, since while does not divide . The proof for works because is prime, and it breaks exactly where it should.
Now you. Prove that is irrational, using the result from the first Now you: if then .
Answer
Suppose, for contradiction, that for integers and with . Cancelling factors of from both as long as both are divisible by , which must stop because the denominator shrinks in size, we may assume and are not both divisible by . Squaring gives , so , and therefore . Write . Then , so and , hence . So divides both and , contradicting the choice of and . Hence is irrational.
The primes never run out
An integer is prime if its only positive divisors are and . The primes thin out, from a quarter of the numbers up to to about one in thirteen of those up to a million, so whether they stop is a real question. Around 300 BCE Euclid answered it in Book IX of the Elements, Proposition 20. The proof needs one preliminary fact.
Every integer has a prime divisor. Among the divisors of that are greater than there is at least one, itself, and there are only finitely many candidates between and , so there is a smallest; call it . Suppose, for contradiction, that is not prime. Then for some integers with . Now and , so by the transitivity of divisibility from the previous lesson. That makes a divisor of greater than and smaller than , contradicting the choice of . So is prime.
Example. Prove that there are infinitely many primes.
Suppose, for contradiction, that there are only finitely many, and list all of them as . Let . Then , so by the preliminary fact has a prime divisor . Since the list contains every prime, is one of , and so divides the product . It also divides . A number dividing two integers divides their difference (from the previous lesson), so , that is, . But , and no integer greater than divides . This contradiction shows the primes are not finite in number.
Now you. Prove directly that for every positive integer there is a prime greater than . (Consider a prime divisor of .)
Answer
Let be a positive integer. Since , it has a prime divisor . If , then is one of the factors of , so ; as also , it would follow that , which is impossible. So . For , , and both prime factors exceed . The proof uses a small contradiction to locate , but it never assumes the primes are finite: it produces a larger prime from any .
What Euclid's proof does not say
A common retelling runs: multiply the primes together, add one, and the result is a new prime. The proof says something weaker, that has a prime divisor not on the list, and the retelling is false. The first cases make it look right: , , then , and , all prime. The sixth breaks it:
Neither nor is among the primes from to , exactly as the proof promises. The new prime is a divisor of , not itself.
Nor did Euclid assume the primes were finite. His proposition reads "prime numbers are more than any assigned multitude of prime numbers": given any finite collection of primes, their product plus one either is prime or has a prime divisor, and the divisibility argument shows that divisor is not in the collection. That proves more than the textbook version, since it turns any finite list into a new prime.
Choosing a method
Try the direct route first. When it stalls, look at the shape of the statement. If it is a conditional whose hypothesis gives nothing to manipulate while the negation of its conclusion gives a formula, as " is even" against " is odd", use the contrapositive. If the statement is a negative with no hypothesis to start from, "is irrational", "there is no largest", "there are infinitely many", use contradiction, since assuming the positive version hands the proof an object to work on.
The claim that is irrational shows the second shape. Suppose with and positive integers (positive because ). Then , so . The left side is even and the right side is a product of odd numbers, hence odd, and no integer is both.
Prefer the contrapositive when both methods work. Its target, , is fixed in advance, so a mistake usually shows as a failure to arrive. A proof by contradiction accepts any impossibility, including one produced by an algebra slip, so a wrong one can look exactly like a right one.
Contradictions in disguise
Many proofs by contradiction are something else wearing its opening sentence. The test is to delete "suppose, for contradiction" and ask whether the assumption was ever used. Consider: "Suppose, for contradiction, that the sum of odd integers and is odd. Write and . Then , which is even, a contradiction." The assumed oddness of did nothing until the last word. Strip the wrapper and what remains is a direct proof that is even.
The second disguise hides a contrapositive. "Suppose is even and is odd. Then , so is odd, contradicting even." The hypothesis appears only in the final clash; the work ran from to . Writing it as a contrapositive says the same thing with fewer assumptions in the air.
The textbook proof of Euclid's theorem is the third: its argument works on any finite list, so the assumption that the list held every prime was never needed. Removing a disguise improves a proof. Every line becomes true, rather than true only in an impossible world about to collapse, and a stronger or constructive result often appears.
What none of these methods can do
Every proof in this lesson and the previous one handled infinitely many integers by one argument about an arbitrary integer. Some claims do not yield to that. Take "every integer is a product of primes". For an arbitrary , either is prime, or with and smaller than ; to finish, the proof needs and to be products of primes already, which is the claim for smaller numbers. The argument for each leans on the cases below it, and checking them one by one never ends. The next lesson supplies the method that follows such a chain all the way up: induction.