3.2: Proofs
( \newcommand{\kernel}{\mathrm{null}\,}\)
Investigate!
Decide which of the following are valid proofs of the following statement:
If
- Suppose
and are odd. That is, and for some integers and ThenTherefore
is odd. - Assume that
or is even - say it is (the case where is even will be identical). That is, for some integer ThenThus
is even. - Suppose that
is even but and are both odd. Namely, and for some integers and ThenBut since
is an integer, this says that the integer is equal to a non-integer, which is impossible. - Let
be an even number, say and be an odd number, sayTherefore
must be even.
Anyone who doesn't believe there is creativity in mathematics clearly has not tried to write proofs. Finding a way to convince the world that a particular statement is necessarily true is a mighty undertaking and can often be quite challenging. There is not a guaranteed path to success in the search for proofs. For example, in the summer of 1742, a German mathematician by the name of Christian Goldbach wondered whether every even integer greater than 2 could be written as the sum of two primes. Centuries later, we still don't have a proof of this apparent fact (computers have checked that “Goldbach's Conjecture” holds for all numbers less than
Writing proofs is a bit of an art. Like any art, to be truly great at it, you need some sort of inspiration, as well as some foundational technique. Just as musicians can learn proper fingering, and painters can learn the proper way to hold a brush, we can look at the proper way to construct arguments. A good place to start might be to study a classic.
Theorem
There are infinitely many primes.
- Proof
-
Suppose this were not the case. That is, suppose there are only finitely many primes. Then there must be a last, largest prime, call it
Consider the numberNow
is certainly larger than Also, is not divisible by any number less than or equal to since every number less than or equal to divides Thus the prime factorization of contains prime numbers (possibly just itself) all greater than So is not the largest prime, a contradiction. Therefore there are infinitely many primes.
This proof is an example of a proof by contradiction, one of the standard styles of mathematical proof. First and foremost, the proof is an argument. It contains sequence of statements, the last being the conclusion which follows from the previous statements. The argument is valid so the conclusion must be true if the premises are true. Let's go through the proof line by line.
- Suppose there are only finitely many primes. [this is a premise. Note the use of “suppose.”]
- There must be a largest prime, call it
[follows from line 1, by the definition of “finitely many.”] - Let
[basically just notation, although this is the inspired part of the proof; looking at is the key insight.] is larger than [by the definition of ] is not divisible by any number less than or equal to [by definition, is divisible by each number less than or equal to so is not.]- The prime factorization of
contains prime numbers greater than [since is divisible by each prime number in the prime factorization of and by line 5.] - Therefore
is not the largest prime. [by line 6, is divisible by a prime larger than ] - This is a contradiction. [from line 2 and line 7: the largest prime is
and there is a prime larger than ] - Therefore there are infinitely many primes. [from line 1 and line 8: our only premise lead to a contradiction, so the premise is false.]
We should say a bit more about the last line. Up through line 8, we have a valid argument with the premise “there are only finitely many primes” and the conclusion “there is a prime larger than the largest prime.” This is a valid argument as each line follows from previous lines. So if the premises are true, then the conclusion must be true. However, the conclusion is NOT true. The only way out: the premise must be false.
The sort of line-by-line analysis we did above is a great way to really understand what is going on. Whenever you come across a proof in a textbook, you really should make sure you understand what each line is saying and why it is true. Additionally, it is equally important to understand the overall structure of the proof. This is where using tools from logic is helpful. Luckily there are a relatively small number of standard proof styles that keep showing up again and again. Being familiar with these can help understand proof, as well as give ideas of how to write your own.
Direct Proof
The simplest (from a logic perspective) style of proof is a direct proof. Often all that is required to prove something is a systematic explanation of what everything means. Direct proofs are especially useful when proving implications. The general format to prove
Assume
Explain, explain, …, explain. Therefore
Often we want to prove universal statements, perhaps of the form
Here are a few examples. First, we will set up the proof structure for a direct proof, then fill in the details.
Example
Prove: For all integers
- Solution
-
The format of the proof with be this: Let
be an arbitrary integer. Assume that is even. Explain explain explain. Therefore is even.To fill in the details, we will basically just explain what it means for
to be even, and then see what that means for Here is a complete proof.Proof
Let
be an arbitrary integer. Suppose is even. Then for some integer Now Since is an integer, is even.
Example
Prove: For all integers
- Solution
-
Even before we know what the divides symbol means, we can set up a direct proof for this statement. It will go something like this: Let
and be arbitrary integers. Assume that and Dot dot dot. ThereforeHow do we connect the dots? We say what our hypothesis (
and ) really means and why this gives us what the conclusion ( ) really means. Another way to say that is to say that for some integer (that is, that is a multiple of ). What are we going for? That for some integer (because we want to be a multiple of ). Here is the complete proof.Proof
Let
and be integers. Assume that and In other words, is a multiple of and is a multiple of So there are integers and such that and Combining these (through substitution) we get that But is an integer, so this says that is a multiple of Therefore
Proof by Contrapositive
Recall that an implication
The skeleton of the proof of
Assume
As before, if there are variables and quantifiers, we set them to be arbitrary elements of our domain. Here are a couple examples:
Example
Is the statement “for all integers
- Solution
-
This is the converse of the statement we proved above using a direct proof. From trying a few examples, this statement definitely appears this is true. So let's prove it.
A direct proof of this statement would require fixing an arbitrary
and assuming that is even. But it is not at all clear how this would allow us to conclude anything about Just because does not in itself suggest how we could write as a multiple of 2.Try something else: write the contrapositive of the statement. We get, for all integers
if is odd then is odd. This looks much more promising. Our proof will look something like this:Let
be an arbitrary integer. Suppose that is not even. This means that …. In other words …. But this is the same as saying …. Therefore is not even.Now we fill in the details:
Proof
We will prove the contrapositive. Let
be an arbitrary integer. Suppose that is not even, and thus odd. Then for some integer Now Since is an integer, we see that is odd and therefore not even.
Example
Prove: for all integers
- Solution
-
The problem with trying a direct proof is that it will be hard to separate
and from knowing something about On the other hand, if we know something about and separately, then combining them might give us information about The contrapositive of the statement we are trying to prove is: for all integers and if and are even, then is even. Thus our proof will have the following format:Let
and be integers. Assume that and are both even. la la la. Therefore is even.Here is a complete proof:
Proof
Let
and be integers. Assume that and are even. Then and for some integers and Now Since is an integer, we see that is even, completing the proof.Note that our assumption that
and are even is really the negation of or is odd. We used De Morgan's law here.We have seen how to prove some statements in the form of implications: either directly or by contrapositive. Some statements are not written as implications to begin with.
Example
Consider the statement, for every prime number
- Solution
-
Proof
Let
be an arbitrary prime number. Assume is not odd. So is divisible by 2. Since is prime, it must have exactly two divisors, and it has 2 as a divisor, so must be divisible by only 1 and 2. Therefore This completes the proof (by contrapositive).
Proof by Contradiction
There might be statements which really cannot be rephrased as implications. For example, “
This is why proof by contradiction works. If we can prove that
Here are a couple examples of proofs by contradiction:
Example
Prove that
- Solution
-
Proof
Suppose not. Then
is equal to a fraction Without loss of generality, assume is in lowest terms (otherwise reduce the fraction). So,Thus
is even, and as such is even. So for some integer and We then have,Thus
is even, and as such is even. Since is also even, we see that is not in lowest terms, a contradiction. Thus is irrational.
Example
Prove: There are no integers
- Solution
-
Proof
We proceed by contradiction. So suppose there are integers
and such that So is even. We have seen that this implies that is even. So for some integer Then This in turn gives But is even, and is odd, so these cannot be equal. Thus we have a contradiction, so there must not be any integers and such that
Example
The Pigeonhole Principle: If more than
- Solution
-
Proof
Suppose, contrary to stipulation, that each of the pigeon holes contain at most one pigeon. Then at most, there will be
pigeons. But we assumed that there are more than pigeons, so this is impossible. Thus there must be a pigeonhole with more than one pigeon.While we phrased this proof as a proof by contradiction, we could have also used a proof by contrapositive since our contradiction was simply the negation of the hypothesis. Sometimes this will happen, in which case you can use either style of proof. There are examples however where the contradiction occurs “far away” from the original statement.
Proof by (counter) Example
It is almost NEVER okay to prove a statement with just an example. Certainly none of the statements proved above can be proved through an example. This is because in each of those cases we are trying to prove that something holds of all integers. We claim that
This cannot be stressed enough. If you are trying to prove a statement of the form
However, existential statements can be proven this way. If we want to prove that there is an integer
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | |
| 41 | 43 | 47 | 53 | 61 | 71 | 83 |
So far we have gotten only primes. You might be tempted to conjecture, “For all positive integers
In fact, we can quickly see that
Example
Above we proved, “for all integers
- Solution
-
The converse is the statement, “for all integers
and if is odd or is odd, then is odd.” This is false! How do we prove it is false? We need to prove the negation of the converse. Let's look at the symbols. The converse isWe want to prove the negation:
Simplify using the rules from the previous sections:
As the negation passed by the quantifiers, they changed from
to We then needed to take the negation of an implication, which is equivalent to asserting the if part and not the then part.Now we know what to do. To prove that the converse is false we need to find two integers
and so that is odd or is odd, but is not odd (so even). That's easy: 1 and 3. (remember, “or” means one or the other or both). Both of these are odd, but is not odd.
Proof by Cases
We could go on and on and on about different proof styles (we haven't even mentioned induction or combinatorial proofs here), but instead we will end with one final useful technique: proof by cases. The idea is to prove that
If that last paragraph was confusing, perhaps an example will make things better.
Example
Prove: For any integer
- Solution
-
It is hard to know where to start this, because we don't know much of anything about
We might be able to prove that is even if we knew that was even. In fact, we could probably prove that was even if was odd. But since must either be even or odd, this will be enough. Here's the proof.Proof
We consider two cases: if
is even or if is odd.Case 1:
is even. Then for some integer This givesand since
is an integer, this says that is even.Case 2:
is odd. Then for some integer This givesand since
is an integer, we see that is even again.Since
is even in both exhaustive cases, we see that is indeed always even.
1This is not to say that looking at examples is a waste of time. Doing so will often give you an idea of how to write a proof. But the examples do not belong in the proof.


