29-01 — Direct Proof and Proof by Contrapositive
Phase: 29 — Proof Techniques Subject: 29-01 Prerequisites: 03-08 (Mathematical Induction), basic logic (AND, OR, NOT, IMPLIES) Next subject: 29-02 — Proof by Contradiction
Learning Objectives
By the end of this subject, you will be able to:
- Structure a direct proof with clear hypotheses, logical steps, and conclusion
- Identify the hypothesis and conclusion in an "if-then" statement
- Prove statements of the form "for all x, P(x) implies Q(x)"
- Formulate and prove the contrapositive of a statement
- Know when contrapositive proof is easier than direct proof
Core Content
1. What Is a Proof?
A proof is a logical argument that establishes the truth of a mathematical statement beyond all doubt. Unlike scientific experiments (which provide evidence), proofs provide certainty.
Structure of a proof: 1. Statement: What you're proving (theorem, proposition, lemma) 2. Hypotheses: The assumptions (given conditions) 3. Logical steps: Each step follows from previous steps by rules of logic or previously proven results 4. Conclusion: The statement being proven
2. Direct Proof
A direct proof of "If P, then Q" assumes P is true and uses logical steps to deduce Q.
Template:
Assume P is true.
[Use definitions, theorems, algebra, etc.]
Therefore Q is true.
Since we assumed P and deduced Q, "if P then Q" is proven. ∎
Example structure: - Theorem: If $n$ is even, then $n^2$ is even. - Proof: Assume $n$ is even. Then $n = 2k$ for some integer $k$. $n^2 = (2k)^2 = 4k^2 = 2(2k^2)$. Since $2k^2$ is an integer, $n^2$ is even. ∎
3. Proving "For All" Statements
"For all x in S, P(x)" requires showing that no matter which $x$ you pick from $S$, $P(x)$ holds.
Template:
Let x be an arbitrary element of S.
[Prove P(x) using only properties of x that hold for ALL elements of S]
Since x was arbitrary, P(x) holds for all x in S. ∎
Critical: You must not use any special properties of a particular $x$. The proof must work for every possible $x$.
4. Proof by Contrapositive
The contrapositive of "If P, then Q" is "If not Q, then not P."
Key fact: A statement and its contrapositive are logically equivalent. Proving the contrapositive proves the original statement.
When to use contrapositive: - When assuming "not Q" gives you more information than assuming "P" - When Q is a "negative" statement (e.g., "is not divisible", "is irrational") - When direct proof gets stuck
Template:
We prove the contrapositive: if not Q, then not P.
Assume not Q.
[Use this stronger assumption]
Therefore not P.
Since the contrapositive is true, the original statement is true. ∎
Example: - Theorem: If $n^2$ is even, then $n$ is even. - Contrapositive: If $n$ is odd, then $n^2$ is odd. - Proof: Assume $n$ is odd. Then $n = 2k + 1$. $n^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1$, which is odd. ∎
5. Common Proof Patterns
Divisibility proofs: Use definitions ($a \mid b$ means $b = ak$ for some integer $k$).
Inequality proofs: Often use algebraic manipulation or known inequalities (AM-GM, Cauchy-Schwarz).
Set proofs: Use element arguments (show $x \in A \implies x \in B$) or algebraic manipulation of set definitions.
Worked Examples
Example 1: Direct Proof — Sum of Two Odds
Problem: Prove that the sum of two odd integers is even.
Solution (direct proof):
Let $m$ and $n$ be arbitrary odd integers. By definition of odd: $m = 2k + 1$ and $n = 2j + 1$ for some integers $k, j$.
$$m + n = (2k + 1) + (2j + 1) = 2k + 2j + 2 = 2(k + j + 1)$$
Since $k + j + 1$ is an integer, $m + n$ is of the form $2 \cdot \text{(integer)}$, which means $m + n$ is even.
Answer: Proven. The sum of any two odd integers is even. ∎
Example 2: Contrapositive — Rational Square Root
Problem: Prove that if $\sqrt{n}$ is rational, then $n$ is a perfect square.
Solution (contrapositive):
Contrapositive: If $n$ is NOT a perfect square, then $\sqrt{n}$ is irrational.
Assume $n$ is not a perfect square. Suppose for contradiction that $\sqrt{n}$ is rational. Then $\sqrt{n} = a/b$ in lowest terms ($\gcd(a, b) = 1$).
Squaring: $n = a^2/b^2$, so $a^2 = nb^2$.
This means $b^2 \mid a^2$. Since $\gcd(a, b) = 1$, we must have $b = 1$. So $\sqrt{n} = a$, meaning $n = a^2$ — a perfect square. Contradiction.
Therefore $\sqrt{n}$ is irrational when $n$ is not a perfect square.
Answer: By contrapositive, if $\sqrt{n}$ is rational, then $n$ is a perfect square. ∎
Example 3: Direct Proof — Even Square
Problem: Prove that if $n$ is even, then $n^2$ is even.
Solution (direct proof):
Assume $n$ is even. By definition, $n = 2k$ for some integer $k$.
$$n^2 = (2k)^2 = 4k^2 = 2(2k^2)$$
Since $2k^2$ is an integer, $n^2$ is of the form $2 \cdot \text{(integer)}$, so $n^2$ is even.
Answer: Proven directly. If $n$ is even, then $n^2$ is even. ∎
Practice Problems
Problem 1: Prove directly: If $n$ is odd, then $n^2$ is odd.
Problem 2: Prove by contrapositive: If $n^2$ is odd, then $n$ is odd.
Problem 3: Prove: The product of two even integers is divisible by 4.
Problem 4: Prove by contrapositive: If $a \nmid b$ (a does not divide b), then $a^2 \nmid b^2$.
Problem 5: Prove: For any integer $n$, $n^2 + n$ is always even.
Summary
- Direct proof assumes the hypothesis and logically deduces the conclusion
- "For all" statements require choosing an arbitrary element and proving the property for it
- Proof by contrapositive proves "if not Q then not P" instead of "if P then Q" — logically equivalent
- Contrapositive is useful when the negation gives stronger assumptions or when direct proof stalls
- Key definitions (even = $2k$, odd = $2k+1$, $a \mid b$ means $b = ak$) are the building blocks of elementary proofs
Key Terms
- Contrapositive
- Direct proof
- Hypothesis
- Logical equivalence
- Modus ponens
- Proof
- Theorem
- "For all" quantifier
Pitfalls
Quiz
- Skipping the 'assume P' step. In a direct proof, you must explicitly assume P is true. Starting from 'let x be arbitrary' without linking to P produces a vacuous proof.
- Confusing contrapositive with contradiction. Contrapositive proves ¬Q → ¬P (a direct proof of the contrapositive). Contradiction assumes P ∧ ¬Q and derives a logical falsehood. They are related but distinct.
- Proving the converse by accident. 'If Q then P' is not the same as 'If P then Q'. Make sure you're proving the right direction.
- Vague quantifiers in proofs. 'For all x' and 'there exists x' require different proof strategies. Mixing them up is a common undergraduate error.
- Negating statements incorrectly. The negation of 'P and Q' is 'not P or not Q' (De Morgan). The negation of 'for all x, P(x)' is 'there exists x such that not P(x)'. These flip in contrapositive proofs.
- Forgetting to justify each step. A proof is an argument, not just a conclusion. Every claim needs a reason (definition, theorem, axiom, or prior result).
Q1: A direct proof of "If P, then Q" begins by:
A) Assuming Q is true and deducing P B) Assuming P is true and deducing Q C) Assuming both P and Q are false D) Not making any assumptions
Correct: B)
- If you chose B: Correct. A direct proof assumes the hypothesis P and uses logic to reach the conclusion Q.
- If you chose A: That's the structure of proving the converse ("If Q, then P"), not the original statement.
- If you chose C: Assuming both are false proves nothing about the implication.
- If you chose D: All proofs start with assumptions (the hypotheses of the theorem).
Q2: The contrapositive of "If $n$ is even, then $n^2$ is even" is:
A) If $n^2$ is even, then $n$ is even B) If $n$ is odd, then $n^2$ is odd C) If $n^2$ is odd, then $n$ is odd D) If $n$ is even, then $n$ is odd
Correct: C)
- If you chose C: Correct. "Not Q" = "$n^2$ is not even" = "$n^2$ is odd". "Not P" = "$n$ is not even" = "$n$ is odd". Contrapositive: "If $n^2$ is odd, then $n$ is odd."
- If you chose A: That's the converse, not the contrapositive. The converse is not logically equivalent.
- If you chose B: This happens to be true but is NOT the contrapositive. It's a different true statement.
- If you chose D: This is false (even doesn't imply odd) and isn't any form of the original statement.
Q3: A statement and its contrapositive are:
A) Sometimes equivalent B) Always logically equivalent (both true or both false) C) Never equivalent D) Equivalent only for even numbers
Correct: B)
- If you chose B: Correct. "P implies Q" and "not Q implies not P" have identical truth tables — both true or both false in every case.
- If you chose A: "Sometimes" is wrong. They are ALWAYS equivalent, by the rules of propositional logic.
- If you chose C: The opposite of the truth. Contrapositive is a fundamental logical equivalence.
- If you chose D: Logical equivalence has nothing to do with even or odd numbers.
Q4: To prove "for all $x \in S$, $P(x)$" by direct proof, you should:
A) Test $P(x)$ for a few values of $x$ and generalise B) Let $x$ be an arbitrary element of $S$ and prove $P(x)$ C) Find a counterexample D) Assume $P(x)$ is false and derive a contradiction
Correct: B)
- If you chose B: Correct. An arbitrary $x$ ensures the proof works for ALL elements. Testing a few values is not a proof.
- If you chose A: Testing finitely many values is never a proof of a universal statement. One counterexample would refute it.
- If you chose C: Finding a counterexample DISPROVES the statement, not proves it.
- If you chose D: That's proof by contradiction, not direct proof.
Q5: Proof by contrapositive is particularly useful when:
A) The hypothesis is easier to work with than the conclusion B) The NEGATION of the conclusion is easier to work with than the hypothesis C) You want to prove two statements at once D) The statement involves only numbers
Correct: B)
- If you chose B: Correct. Contrapositive is useful when "not Q" gives more leverage than "P". For example, "not divisible" gives specific equations to work with.
- If you chose A: If the hypothesis is easy, use direct proof. Contrapositive is for when the negation of Q is easier.
- If you chose C: Contrapositive proves one statement (equivalent to the original), not two.
- If you chose D: Contrapositive applies to any logical statement, not just numerical ones.
Q6: In a direct proof that "if $n$ is even, then $n^2$ is even," the first step is:
A) To state that $n^2$ is even B) To assume $n$ is even and write $n = 2k$ C) To compute $n^2$ D) To find a counterexample
Correct: B)
- If you chose B: Correct. A direct proof starts by assuming the hypothesis ($n$ is even), which means $n = 2k$ for some integer $k$.
- If you chose A: You cannot assume the conclusion at the start — that's circular reasoning.
- If you chose C: You need to express $n$ first before computing $n^2$.
- If you chose D: A counterexample would disprove the statement, not prove it.
Q7: Which of the following is proved most naturally by contrapositive?
A) "If $x > 2$, then $x^2 > 4$" B) "If $x^2$ is irrational, then $x$ is irrational" C) "The sum of two even numbers is even" D) "There are infinitely many primes"
Correct: B)
- If you chose B: Correct. Proving "if $x$ is rational, then $x^2$ is rational" is direct and straightforward — that's the contrapositive.
- If you chose A: Direct proof is simple: $x > 2 \implies x^2 > x \cdot 2 > 4$.
- If you chose C: Direct: even + even = $2k + 2j = 2(k+j)$, clearly even.
- If you chose D: Euclid's proof is by contradiction (assume finitely many, construct a new one), not contrapositive.
Q8: The logical form of a direct proof of "If P, then Q" is:
A) Modus tollens B) Modus ponens C) Proof by cases D) Reductio ad absurdum
Correct: B)
- If you chose B: Correct. Modus ponens: "If P implies Q, and P is true, then Q is true." This is the logical backbone of direct proof.
- If you chose A: Modus tollens is "If P implies Q, and not Q, then not P" — this is the contrapositive approach.
- If you chose C: Proof by cases splits into multiple scenarios, not a single direct chain.
- If you chose D: Reductio ad absurdum (proof by contradiction) assumes the negation of the conclusion.
Next Steps
Continue to 29-02 — Proof by Contradiction to learn one of the most powerful proof techniques — assuming the opposite of what you want to prove and deriving an impossibility.