Proof by contrapositive
In logic, the contrapositive of a conditional statement is formed by negating both terms and reversing the direction of inference. More specifically, the contrapositive of the statement "if A, then B" is "if not B, then not A." A statement and its contrapositive are logically equivalent, in the sense that if the statement is true, then its contrapositive is true and vice versa.
In mathematics, proof by contrapositive, or proof by contraposition, is a rule of inference used in proofs, where one infers a conditional statement from its contrapositive. In other words, the conclusion "if A, then B" is inferred by constructing a proof of the claim "if not B, then not A" instead. More often than not, this approach is preferred if the contrapositive is easier to prove than the original conditional statement itself.
Logically, the validity of proof by contrapositive can be demonstrated by the use of the following truth table, where it is shown that p → q and q → p share the same truth values in all scenarios:
p | q | p | q | p → q | q → p |
---|---|---|---|---|---|
T | T | F | F | T | T |
T | F | F | T | F | F |
F | T | T | F | T | T |
F | F | T | T | T | T |