Introduction to proof methods: direct, contrapositive, contradiction
Direct proof, contraposition, contradiction, proof by cases and counterexamples, using the definitions of even/odd, divisibility and rational numbers. The template proof questions of the midterm come from here.
The proof questions are the most feared part of the discrete math midterm. In fact most of them are template questions: “Give a direct proof”, “Prove by contraposition”, “Prove by contradiction”. On this page you will learn the English skeleton of each method. Half of any proof is writing the definition correctly. A proof that starts without the definition usually falls apart.
Golden rules:
- Start with the definition. The moment you write ” is odd”, immediately write “so for some integer ”.
- A new letter for every new number. If and are odd, , .
- Finish with the definition of your goal. ”, where is an integer. Therefore … is odd.”
- An example is not a proof, but a single counterexample refutes a claim.
- If the hypothesis is not useful, switch to the contrapositive.
Terms and definitions
- Theorem: an important claim that has been proved true. Lemma: a helper claim used in a bigger proof. Corollary: a result that follows immediately from a theorem. Conjecture: a claim believed to be true but not proved. Axiom: a starting truth accepted without proof.
- Most theorems start with “for all” but do not write it: “If is odd, then is odd” really means . In the proof you take an arbitrary , and at the end universal generalization makes it hold for all .
Definitions to memorize:
| Concept | Definition |
|---|---|
| even | there is an integer with |
| odd | there is an integer with |
| ( divides ) | and there is an integer with |
| rational | , integers, |
| irrational | a real number that is not rational |
| perfect square | there is an integer with |
Direct proof
To prove , assume and reach using definitions and algebra.
Theorem. If is even and is odd, then is odd.
Proof. Let m be even and n be odd. state the hypothesis
Then m = 2a and n = 2b + 1 for some definitions, TWO different letters
integers a and b.
So m + n = 2a + 2b + 1 = 2(a + b) + 1. algebra, factor out the 2
Since a + b is an integer, m + n is odd definition of the goal
by definition. ∎
PITFALL · Giving the same letter to two numbers. If you write , , you have said ; the proof then works only for consecutive numbers. Every number gets its own letter.
Proof by contraposition
Since , it is enough to prove the contrapositive. When? When the hypothesis does not give you a useful equation: ” is even”, ” is odd”, ” is irrational”.
Theorem. If is an integer and is even, then is odd.
If you try it directly: . This does not help; you cannot see that is odd.
Proof. We prove the contrapositive:
"If n is even, then 3n + 7 is odd."
Let n be even, so n = 2k for some integer k.
Then 3n + 7 = 6k + 7 = 6k + 6 + 1 = 2(3k + 3) + 1.
Since 3k + 3 is an integer, 3n + 7 is odd.
Since the contrapositive is true, the original statement is true. ∎
Writing the contrapositive explicitly as a sentence earns marks. Watch De Morgan when the conclusion contains “and/or”: the negation of ” or ” is ” and ”.
Proof by contradiction
Assume the claim is false and reach an absurdity (). For the assumption is ” is true and is false”. When? For negative claims such as “irrational”, “there is no …”, “infinitely many”.
Theorem. is irrational.
Proof. Assume, for contradiction, that √2 is rational.
Then √2 = a/b where a, b are integers, b ≠ 0, and the
fraction is in lowest terms (a and b have no common factor > 1).
Squaring: 2 = a²/b², so a² = 2b². Hence a² is even,
so a is even (if a were odd, a² would be odd).
Write a = 2c. Then 4c² = 2b², so b² = 2c², and b² is even,
so b is even.
Now a and b are both even, so 2 is a common factor.
This contradicts "lowest terms". Hence √2 is irrational. ∎
Here the lemma “a² even ⇒ a even” was used; you proved it by contraposition (question 1). Big proofs are built from small lemmas.
TIP · Name the contradiction. On the last line write what contradicts what: “This contradicts the assumption that is in lowest terms.” The word “contradiction” alone is weak.
Proof by cases
If the hypothesis splits into several cases, prove each case separately. The cases must cover all possibilities (exhaustive).
Theorem. For every integer , is even.
Proof. Case 1: n is even, n = 2k.
n² + n = 4k² + 2k = 2(2k² + k), even.
Case 2: n is odd, n = 2k + 1.
n² + n = 4k² + 4k + 1 + 2k + 1 = 4k² + 6k + 2 = 2(2k² + 3k + 1), even.
Every integer is even or odd, so n² + n is even for all n. ∎
A shorter way: is the product of two consecutive numbers and one of them is always even. But you have to justify this sentence too; on the exam the two-case proof is safer.
Existence proofs and counterexamples
Existence proof (constructive): to say “There exists with ”, show a concrete . Example: “There is a positive integer that can be written as the sum of two cubes in two different ways.” . Done.
Nonconstructive: proving that something exists without exhibiting it (for example, showing that one of two cases works without saying which). This comes up less in this course.
Counterexample: to show that is false, a single for which is false is enough. The danger is the reverse: however many examples you try, a claim is not proved by examples. is prime for the first ten values and collapses at .
Other small templates
- Vacuous proof: if can never be true, is automatically true. “If is an integer with , then .” The hypothesis is never satisfied.
- Trivial proof: if is always true, is true.
- iff proof: . Write the two directions under separate headings: ”(⇒)” and ”(⇐)”. You may use the contrapositive for the second direction.
Which method should I choose?
| What the hypothesis / claim looks like | Try first |
|---|---|
| The hypothesis gives a formula (” odd”, "") | Direct |
| The hypothesis is “expression is odd/even”, ” …” | Contraposition |
| “irrational”, “no … exists”, “infinitely many” | Contradiction |
| “for every integer” and parity/remainders are involved | Cases |
| “there exists” | Concrete example |
| “prove or disprove” | Try small values first, look for a counterexample |
Common mistakes
| Wrong idea | The truth |
|---|---|
| I showed a few examples, the proof is done | A claim is not proved by examples |
| , | Separate letters: , |
| I write "" and stop | The sentences “where … is an integer” and “therefore … even” are required |
| Proving the converse | Contrapositive: the direction flips AND both parts are negated |
| Starting by assuming the conclusion of the proof | Circular reasoning; start from the hypothesis |
| Not saying what contradicts what in a contradiction proof | Name which part of the assumption it contradicts |
| Only one direction in iff | Both directions are needed |
| Not covering all cases | Write a covering sentence such as “Every integer is even or odd” |
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Which proof method is the most natural for "If is an integer and is even, then is even"? Why?
Show answer
The hypothesis " is even" gives you no useful formula for : you cannot extract from . The contrapositive "if is odd then is odd" starts with : . When the hypothesis is "an expression is odd/even", switch to the contrapositive.
Prove or disprove: for every integer , is odd.
Show answer
Proof by cases. Case 1: . Then , odd. Case 2: . Then , odd. It is odd in every case, so the claim is true. In a "prove or disprove" question, first try a few values (: 1, 3, 7); if no counterexample appears, move on to the proof.
Disprove: "Every odd integer greater than 1 is prime."
Show answer
A single counterexample is enough to break a claim. The odd integers greater than 1 are 3, 5, 7, 9: the first non-prime is 9. "For , is odd but , so it is not prime." This sentence earns full marks.
Give a direct proof: if and , then (for integers , , ).
Show answer
Write the definition: means there is an integer with . means there is an integer with . Use two different letters. Substitute: . is a product of integers, so it is an integer. By definition . ∎
Prove by contraposition: if is an integer and is even, then is odd.
Show answer
: " even", : " odd". The contrapositive : "If is even, then is odd." Let . Then , and is an integer, so it is odd. Since the contrapositive is true, the original is true too. ∎
Prove that there is no integer with for some integer . (That is, no perfect square leaves remainder 2 when divided by 4.)
Show answer
Proof by cases. If then : the remainder on division by 4 is 0. If then : the remainder is 1. A number has only one remainder on division by 4, so can never be of the form . ∎ (Check: over the remainders of squares are only 0 and 1.)
Consider the claim " is prime for every positive integer ." Find the smallest counterexample.
Show answer
For the values are 11, 13, 17, 23, 31, 41, 53, 67, 83, 101: all prime. This is why "I tried a few examples and it works" is not a proof. For , . Hint: when you choose , every term becomes a multiple of 11.
Prove that if is an odd integer, then .
Show answer
Let . Then . and are consecutive; one of them is even, so for some integer . (Show this separately by cases: if is even then , if odd then .) Hence , that is, . ∎ Check: , .
Prove by contradiction: if is rational and is irrational, then is irrational.
Show answer
Assume, for contradiction, that is rational: and , . Then . The numerator and denominator are integers and ; so is rational. This contradicts being irrational. Hence is irrational. ∎
Prove that for all real numbers and , .
Show answer
Proof by cases. Case 1: . Then , , and the sum is . Case 2: . Then , , and the sum is . The two cases cover all possibilities. ∎ It is important to say that the cases are exhaustive.
A student writes: "Claim: if is even then is even. Proof: take . Then is even and is even. So the claim holds." What is wrong?
Show answer
The claim says "for every integer ". A single example does not prove a claim (but a single counterexample refutes it). The right way: contrapositive, "if is odd, , then is odd."
Prove that for every integer : is odd if and only if is even.
Show answer
"iff" requires two proofs. (⇒) : , even.
(⇐) By contrapositive: if is even then is odd. : , odd.
Both directions hold, so the claim is proved. ∎ Proving only one direction earns half marks.
Verification: Every proved claim (even/odd, divisibility, 8 | n²−1, remainders of squares mod 4, etc.) was brute-force tested over -200..200 with node; the counterexamples (9, and 121 for n = 11) were found with a primality test (verify/MAT2033/02.mjs).