START WELL TO END WELL
+92 340 1501700 startwelleducationbhimber@gmail.com Mon – Sat: 8:00 AM – 2:00 PM
Startwell Education logo
StartwellEducation
Discrete Structures · Lecture 9

Proof by Contradiction

Week 3, slot 3 · CLO-2, CLO-4 · Bloom C3 · Prerequisite: Lectures 7–8 · Reference: Rosen 7th, Logic and Proofs

Learning objectives

  1. State the logic behind proof by contradiction.
  2. Prove a statement by assuming its negation and reaching an impossibility.
  3. Prove an implication p → q by assuming p ∧ ¬q.
  4. Distinguish contradiction from contraposition.

Roman Urdu. Proof by contradiction mein hum maan lete hain ke jo baat sabit karni hai woh ghalat hai, phir aage chal kar koi aisi baat nikalti hai jo mumkin nahi (jaise r aur ¬r dono sahih). Is se pata chalta hai ke hamari assumption ghalat thi, yani asal statement sahih hai.

Core concepts

Logic. If ¬p leads to a contradiction (a statement of the form r ∧ ¬r), then ¬p must be false, so p is true. In symbols: (¬p → F) → p is a tautology.

For an implication. To prove p → q by contradiction, assume p is true and q is false, and derive a contradiction. This works because ¬(p → q) ≡ p ∧ ¬q.

Contradiction versus contraposition

Contraposition Contradiction
Applies to p → q only any statement
Assume ¬q ¬p (or p ∧ ¬q)
Goal reach ¬p reach any contradiction
Typical use clean algebraic form of ¬q non-existence and irrationality results

Worked examples

Example 1 (basic). Theorem. No integer is both even and odd. Proof: suppose n = 2a and n = 2b + 1 for integers a, b. Then 2a = 2b + 1, so 2(a − b) = 1, so a − b = 1/2. But a − b is an integer, which is a contradiction. ∎

Example 2 (intermediate). Theorem. √2 is irrational. Proof: suppose √2 = a/b with integers a, b, b ≠ 0, and the fraction in lowest terms (no common factor greater than 1). Squaring: 2b² = a², so a² is even. By Lecture 8, Example 2, a is even, say a = 2c. Then 2b² = 4c², so b² = 2c², so b² is even and b is even. Now a and b are both even, contradicting lowest terms. ∎

Example 3 (advanced). Theorem (Euclid). There are infinitely many primes. Proof: suppose there are only finitely many primes p₁, p₂, …, pₙ. Let N = p₁p₂…pₙ + 1. Every integer greater than 1 has a prime divisor (proved in Lecture 11), so some prime q divides N. Since our list contains all primes, q = pᵢ for some i. Then pᵢ divides p₁…pₙ and also N, so pᵢ divides N − p₁…pₙ = 1. No prime divides 1, a contradiction. ∎

Example 4 (computing). Theorem. If 12 keys are stored in a hash table with 11 slots, two keys share a slot. Proof: suppose no two keys share a slot. Then each of the 12 keys uses a different slot, so at least 12 slots exist. But there are only 11. Contradiction. ∎ This is the pigeonhole principle, studied in Module 8.

Computer science connection

Impossibility results in computing (for example, that some problems have no algorithm) are proved by contradiction; lower bounds on algorithms; correctness arguments for hashing and collision.

Key takeaways

  • Assume the negation, reach a contradiction, conclude the original.
  • Good for non-existence, uniqueness and irrationality.
  • Contradiction is more general than contraposition but the contradiction must be real and clearly shown.

Roman Urdu. Contradiction mein ¬p maan kar aisi baat nikalte hain jo mumkin nahi. √2 irrational hone ka saboot is ki mashhoor misal hai. Contraposition sirf p → q ke liye hota hai, contradiction har statement ke liye.

Five revision questions

  1. What is assumed when proving p → q by contradiction?
  2. Where did the proof of √2 use "lowest terms"?
  3. Prove that there is no smallest positive real number.
  4. Prove that the sum of a rational and an irrational number is irrational.
  5. Explain the difference between contraposition and contradiction in two sentences.

Homework. Prove by contradiction: (a) if 3n + 2 is even then n is even; (b) there is no largest integer; (c) √3 is irrational (state clearly which fact about divisibility by 3 you use and prove it).

Quiz

Contradiction proof shuru kaise hota hai?

All lectures

  1. Lecture 0: Discrete vs Continuous
  2. Lecture 1: Propositions and Connectives
  3. Lecture 2: Truth Tables, Tautologies and Contradictions
  4. Lecture 3: Logical Equivalence and the Laws of Logic
  5. Lecture 4: Predicate Logic and Quantifiers
  6. Lecture 5: Rules of Inference
  7. Lecture 6: Logical Arguments and Puzzle Solving
  8. Lecture 7: Direct Proof and Proof by Implication
  9. Lecture 8: Proof by Contraposition
  10. Lecture 9: Proof by Contradiction
  11. Lecture 10: Mathematical Induction
  12. Lecture 11: Strong Induction
  13. Lecture 12: Applications of Proofs and Proof Strategy
Admissions Open

Give your child the right start.

Seats are limited. Visit our campus, meet our teachers and see why families trust Startwell Education.