Quiz 2

Proof Techniques I: Direct, Contrapositive, and Contradiction

1426 words
7 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Proof Techniques I: Direct, Contrapositive, and Contradiction ## 🎯 Learning Objectives - Construct **direct proofs** by logical deduction from premises - Use **proof by contrapositive** to prove conditional statements - Apply **proof by contradiction** when direct approaches fail - Recognise which technique is ap...

Proof Techniques I: Direct, Contrapositive, and Contradiction

🎯 Learning Objectives

  • Construct direct proofs by logical deduction from premises
  • Use proof by contrapositive to prove conditional statements
  • Apply proof by contradiction when direct approaches fail
  • Recognise which technique is appropriate for different statements
  • Write complete, well-structured proofs

3.1 Intuition: The Art of Mathematical Argument

A proof is a convincing logical argument that a statement is true. Unlike experimental science (which collects evidence), mathematics demands certainty — a proof must leave no room for doubt.
🔑 Key Insight: Different proof techniques are different strategies for building an irrefutable case. The right technique depends on the structure of what you're trying to prove.

3.2 Direct Proof

Idea: Assume the premises are true. Deduce the conclusion step by step, using definitions, axioms, and previously established results.

Structure

  1. Assume PP is true.
  2. Use logical reasoning to deduce QQ.
  3. Conclude PQP \to Q.

Example 1: Sum of Even Numbers

Theorem: The sum of two even integers is even. Proof: Let mm and nn be even integers.
  • By definition, m=2am = 2a and n=2bn = 2b for some integers a,ba, b.
  • Then m+n=2a+2b=2(a+b)m + n = 2a + 2b = 2(a + b).
  • Since a+ba + b is an integer, m+nm + n is even (divisible by 2). \square

Example 2: Product of Odd Numbers

Theorem: The product of two odd integers is odd. Proof: Let mm and nn be odd integers.
  • By definition, m=2a+1m = 2a + 1 and n=2b+1n = 2b + 1 for some integers a,ba, b.
  • mn=(2a+1)(2b+1)=4ab+2a+2b+1=2(2ab+a+b)+1mn = (2a + 1)(2b + 1) = 4ab + 2a + 2b + 1 = 2(2ab + a + b) + 1.
  • Since 2ab+a+b2ab + a + b is an integer, mnmn is odd. \square

Example 3: Divisibility

Theorem: If aba \mid b and bcb \mid c, then aca \mid c. Proof: Assume aba \mid b and bcb \mid c.
  • By definition, there exist integers k1,k2k_1, k_2 such that b=ak1b = ak_1 and c=bk2c = bk_2.
  • Then c=(ak1)k2=a(k1k2)c = (ak_1)k_2 = a(k_1k_2).
  • Since k1k2k_1k_2 is an integer, aca \mid c. \square

3.3 Proof by Contrapositive

Idea: Instead of proving PQP \to Q, prove its contrapositive ¬Q¬P\neg Q \to \neg P. They are logically equivalent.

When to Use

When the conclusion (QQ) gives more useful information than the premise (PP).

Example 1: Squares and Parity

Theorem: If n2n^2 is even, then nn is even. Contrapositive: If nn is odd, then n2n^2 is odd. Proof (of contrapositive): Assume nn is odd. Then n=2k+1n = 2k + 1 for some integer kk. n2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1n^2 = (2k + 1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1. Thus n2n^2 is odd. \square

Example 2: Inequality

Theorem: If x+y2x + y \geq 2, then at least one of x,yx, y is 1\geq 1. Contrapositive: If x<1x < 1 and y<1y < 1, then x+y<2x + y < 2. Proof (of contrapositive): Assume x<1x < 1 and y<1y < 1. Then x+y<1+1=2x + y < 1 + 1 = 2. \square

Example 3: Function Injectivity

Theorem: If f(x)=3x+2f(x) = 3x + 2 is injective (one-to-one). Contrapositive approach: Show that if x1x2x_1 \neq x_2, then f(x1)f(x2)f(x_1) \neq f(x_2). Proof: Assume x1x2x_1 \neq x_2. Then 3x13x23x_1 \neq 3x_2, so 3x1+23x2+23x_1 + 2 \neq 3x_2 + 2, i.e., f(x1)f(x2)f(x_1) \neq f(x_2). \square

3.4 Proof by Contradiction

Idea: Assume the statement is false, then derive a logical contradiction. Since the contradiction cannot be true, the original statement must be true.

Structure

  1. Assume ¬S\neg S (the negation of what you want to prove).
  2. Reason logically until you reach a contradiction (P¬PP \land \neg P).
  3. Conclude SS must be true.

When to Use

When proving something is impossible or must exist — especially for "there is no" or "at least one" statements.

Example 1: Irrationality of 2\sqrt{2}

Theorem: 2\sqrt{2} is irrational. Proof: Assume, for contradiction, that 2\sqrt{2} is rational.
  • Then 2=ab\sqrt{2} = \frac{a}{b} where a,ba, b are integers in lowest terms (coprime).
  • Squaring: 2=a2b2    a2=2b22 = \frac{a^2}{b^2} \implies a^2 = 2b^2.
  • So a2a^2 is even, hence aa is even (by contrapositive example above). Write a=2ka = 2k.
  • Then (2k)2=2b2    4k2=2b2    b2=2k2(2k)^2 = 2b^2 \implies 4k^2 = 2b^2 \implies b^2 = 2k^2.
  • So b2b^2 is even, hence bb is even.
  • But then aa and bb are both even, contradicting that ab\frac{a}{b} was in lowest terms. Thus our assumption was false — 2\sqrt{2} is irrational. \square

Example 2: Infinitely Many Primes

Theorem: There are infinitely many prime numbers. Proof: Assume, for contradiction, that there are only finitely many primes: p1,p2,,pnp_1, p_2, \dots, p_n.
  • Consider N=p1p2pn+1N = p_1 \cdot p_2 \cdot \dots \cdot p_n + 1.
  • NN is greater than any pip_i, so NN is not prime (by our assumption that the list is complete).
  • Therefore NN must have a prime divisor pp.
  • pp must be one of p1,,pnp_1, \dots, p_n (since we assumed these are all primes).
  • But pp divides both p1pnp_1 \cdots p_n and NN, so pp divides Np1pn=1N - p_1 \cdots p_n = 1.
  • Contradiction: a prime cannot divide 1. Thus our assumption was false — there are infinitely many primes. \square

Example 3: Pigeonhole Principle

Theorem: In any set of 3 integers, there exist two whose sum is even. Proof: Assume, for contradiction, that no two have even sum.
  • Parity can be even or odd. By pigeonhole principle, among 3 numbers, at least two have the same parity (both even or both odd).
  • The sum of two evens is even; the sum of two odds is even.
  • Contradiction to our assumption. \square

3.5 Choosing the Right Technique

(Diagram)

📊 Technique Comparison

TechniqueStructureBest ForExample
DirectPQP \to QClear logical pathSum of evens is even
Contrapositive¬Q¬P\neg Q \to \neg P¬Q\neg Q gives useful infoIf n2n^2 even then nn even
ContradictionAssume ¬S\neg S , derive \botImpossibility, existence2\sqrt{2} irrational

✅ Practice Questions

Q1: Prove that if nn is an integer and 3n+23n + 2 is even, then nn is even.
Solution
We'll use contrapositive: If nn is odd, then 3n+23n+2 is odd. Assume nn is odd, so n=2k+1n = 2k+1. 3n+2=3(2k+1)+2=6k+3+2=6k+5=2(3k+2)+13n+2 = 3(2k+1) + 2 = 6k + 3 + 2 = 6k + 5 = 2(3k+2) + 1. Thus 3n+23n+2 is odd. By contrapositive, if 3n+23n+2 is even then nn is even. Q2: Prove that if aa and bb are rational numbers, then a+ba + b is rational. Solution
Direct proof: Let a=pqa = \frac{p}{q} and b=rsb = \frac{r}{s} where p,q,r,sp,q,r,s are integers, q0q \neq 0, s0s \neq 0. a+b=pq+rs=ps+qrqsa + b = \frac{p}{q} + \frac{r}{s} = \frac{ps + qr}{qs}. Since ps+qrps + qr and qsqs are integers and qs0qs \neq 0, a+ba+b is rational. Q3: Prove that 23\sqrt[3]{2} is irrational. Solution
Assume 23=ab\sqrt[3]{2} = \frac{a}{b} in lowest terms. Then 2=a3b32 = \frac{a^3}{b^3}, so a3=2b3a^3 = 2b^3. Thus a3a^3 is even, so aa is even. Write a=2ka = 2k. Then 8k3=2b3    4k3=b38k^3 = 2b^3 \implies 4k^3 = b^3, so b3b^3 is even, so bb is even. Contradiction — aa and bb both even, but they were in lowest terms. Q4: Prove that between any two distinct rational numbers there is another rational number. Solution
Let r<sr < s be rational numbers. Their average m=r+s2m = \frac{r+s}{2} is rational (sum of rationals divided by 2). And r<m<sr < m < s because mr=sr2>0m - r = \frac{s-r}{2} > 0 and sm=sr2>0s - m = \frac{s-r}{2} > 0. Q5: Prove that for any integer nn, n2n^2 is divisible by 3 iff nn is divisible by 3. Solution
(\leftarrow) If n=3kn = 3k, then n2=9k2=3(3k2)n^2 = 9k^2 = 3(3k^2), divisible by 3. (\rightarrow) We prove the contrapositive: if nn is not divisible by 3, then n2n^2 is not divisible by 3. If nn is not divisible by 3, then n=3k+1n = 3k+1 or n=3k+2n = 3k+2. Case 1: n=3k+1n = 3k+1, then n2=9k2+6k+1=3(3k2+2k)+1n^2 = 9k^2 + 6k + 1 = 3(3k^2+2k) + 1, remainder 1 mod 3. Case 2: n=3k+2n = 3k+2, then n2=9k2+12k+4=3(3k2+4k+1)+1n^2 = 9k^2 + 12k + 4 = 3(3k^2+4k+1) + 1, remainder 1 mod 3. In both cases, n21(mod3)n^2 \equiv 1 \pmod{3}, so not divisible by 3. Join Discord PreviousQuantifier ApplicationsNextLogical Fallacies
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.