In logic and mathematics, contraposition, or transposition, refers to the inference of going from a conditional statement into its logically equivalent contrapositive, and an associated proof method known as § Proof by contrapositive. The contrapositive of a statement has its antecedent and consequent negated and swapped.
Conditional statement P → Q {\displaystyle P\rightarrow Q} . In formulas: the contrapositive of P → Q {\displaystyle P\rightarrow Q} is ¬ Q → ¬ P {\displaystyle \neg Q\rightarrow \neg P} .
If P, Then Q. — If not Q, Then not P. "If it is raining, then I wear my coat." — "If I don't wear my coat, then it isn't raining."
The law of contraposition says that a conditional statement is true if, and only if, its contrapositive is true.
Contraposition ( ¬ Q → ¬ P {\displaystyle \neg Q\rightarrow \neg P} ) can be compared with three other operations:
Note that if P → Q {\displaystyle P\rightarrow Q} is true and one is given that Q {\displaystyle Q} is false (i.e., ¬ Q {\displaystyle \neg Q} ), then it can logically be concluded that P {\displaystyle P} must be also false (i.e., ¬ P {\displaystyle \neg P} ). This is often called the law of contrapositive, or the modus tollens rule of inference.