Proof by Contrapositive
Prove an if-then statement by assuming its conclusion is false and showing that its hypothesis must be false too.
Definition
- 1.Write the contrapositive: negate the hypothesis and the conclusion, then swap them.
- 2.Assume (the conclusion is false).
- 3.Work forward with definitions and algebra, exactly as in a direct proof.
- 4.Arrive at (the hypothesis is false).
- 5.Conclude: the contrapositive is true, so the original statement is true.
Try it now
Worked Examples
Prove: for every integer , if is even, then is even.
Write the contrapositive
Negate both parts and swap them: "if is not even, then is not even" → If is odd, then is odd
Assume the negated conclusion
Assume is odd, so for some integer →
Square and expand
→
Bring it into the form 2m + 1
, and is an integer → is odd
Conclude
We proved " odd odd", the contrapositive of the statement → If is even, then is even
Answer: The contrapositive (if is odd, then is odd) is true, so the original statement is true. Q.E.D.
Common Mistakes
Proving the converse instead of the contrapositive: for "if is even, then is even", assuming is even and showing is even
Why it's wrong: That proves , the converse, which is a different statement. A statement and its converse are not equivalent.
Correct: Negate both parts and swap them: assume is odd () and show is odd ().
Negating " and are odd" as " and are even"
Why it's wrong: The conclusion fails as soon as one of the numbers is even. "Both even" covers only part of the cases, so the proof would be incomplete.
Correct: "Not ( and )" is "not or not ": is even or is even. Then prove every case.
Negating as
Why it's wrong: The value satisfies both and , so is not the opposite of .
Correct: The negation of is , and the negation of is .
Assuming and then hunting for "some contradiction"
Why it's wrong: That mixes two methods. In a proof by contrapositive there is no contradiction: you have one clear target.
Correct: Assume and work until you reach exactly . The search for any contradiction belongs to proof by contradiction.
Interactive Visual
Truth Table
| p | q | p → q | ¬q | ¬p | ¬q → ¬p | p → q ↔ ¬q → ¬p |
|---|---|---|---|---|---|---|
| F | F | T | T | T | T | T |
| F | T | T | F | T | T | T |
| T | F | F | T | F | F | T |
| T | T | T | F | F | T | T |
T= TrueF= False
Interactive Sandbox
Expression Calculator
Try these:
History
No calculations yet
Practice Problems
18 problemsWhich statement is the contrapositive of "If is even, then is even"?
Why It Matters
- It turns vague hypotheses into concrete ones: " is even" is hard to use, " is odd, so " is easy to use
- It handles "or" conclusions neatly: the negation of " or " is the friendly " and "
- It powers classic results: the proof that is irrational starts from the fact that even forces even, which is proven by contrapositive
- It is everyday reasoning: "if the alarm works, it beeps in a test" means "no beep, so the alarm is broken"
- It prepares you for proof by contradiction, the next lesson in this topic, by training you to negate statements correctly
Real World Applications
Quality Control
Inspectors use contrapositive reasoning to rule out cases without weighing every item twice.
Example:
Rule: if a pack of 4 boxes weighs at least 2000 g, then at least one box weighs at least 500 g. Contrapositive: if every box weighs less than 500 g, the pack weighs less than 2000 g.
A machine fills 4 boxes and none of them can hold more than 495 g.
Show with the contrapositive that the pack cannot reach 2000 g.
Step 1: Write the mathematical expression
Largest possible total of the 4 boxes:
Testing Software
Programmers test code with the contrapositive: if the code is correct, a test gives the right output, so a wrong output proves a bug.
Example:
A function should compute . We proved: if is odd, then is odd. Contrapositive: an even must give an even result.
A test calls the function with and the program returns 27.
What should the correct output be, and what does 27 tell you?
Step 1: Write the mathematical expression
Compute the correct value :
Check Digits in Codes
Many codes use a simple rule to catch typing errors. The contrapositive tells you when a code is certainly wrong.
Example:
Rule: if a code is valid, then the sum of its digits is divisible by 9. Contrapositive: if the digit sum is not divisible by 9, the code is not valid.
Someone types the code 4726.
Use the contrapositive to decide whether the code can be valid.
Step 1: Write the mathematical expression
Sum of the digits:
Key Takeaways
- 1A proof by contrapositive proves by proving
- 2It works because a statement and its contrapositive are logically equivalent (identical truth table columns)
- 3Plan: assume the conclusion is false, work forward, reach the hypothesis being false
- 4Choose it when the negated conclusion is concrete, for example " is odd" gives
- 5Negate carefully: "and" becomes "or", "or" becomes "and", becomes
- 6Unlike proof by contradiction, you assume only and aim at one target,
Frequently Asked Questions
Glossary
- Contrapositive
- The statement formed from by negating both parts and swapping them
- Proof by contrapositive
- A proof of that assumes and derives
- Logically equivalent
- Two statements that have the same truth value in every row of the truth table
- Negation
- The statement "not " (), true exactly when is false
- Converse
- The statement ; it is not equivalent to
- Even / odd integer
- An integer of the form (even) or (odd), where is an integer
Formula Card
Contrapositive equivalence
Proving the right side proves the left side
Negating "and"
Not both: at least one fails
Negating "or"
Neither: both fail
Even and odd
The concrete forms you get after negating "even" or "odd"