Try the code and the simulations beside the lesson.
What you will be able to do
write the converse, the inverse and the contrapositive of a conditional;
decide which of them say the same thing;
use the contrapositive to read and check a statement.
Turning a statement around
Take the true statement "If a number is divisible by 6, then it is divisible by 3". There are three ways to rearrange it.
Converse: swap the parts. "If a number is divisible by 3, then it is divisible by 6." False: 9 is divisible by 3 but not by 6.
Inverse: negate both parts. "If a number is not divisible by 6, then it is not divisible by 3." False: 9 again.
Contrapositive: swap and negate. "If a number is not divisible by 3, then it is not divisible by 6." True.
In symbols, for p⇒q:
converse: q⇒p;
inverse: ∼p⇒∼q;
contrapositive: ∼q⇒∼p.
Which ones say the same thing?
Here is each row for p, q, as a list. Each row gives the statement, the converse, the inverse and the contrapositive.
T, T: T, T, T, T.
T, F: F, T, T, F.
F, T: T, F, F, T.
F, F: T, T, T, T.
The statement and the contrapositive agree in every row. The converse and the inverse agree in every row. So
p⇒q≡∼q⇒∼p;
q⇒p≡∼p⇒∼q.
The inverse is the contrapositive of the converse. That is why those two match.
A square with a statement at each corner. Top left: p implies q, the statement. Top right: q implies p, the converse. Bottom left: not p implies not q, the inverse. Bottom right: not q implies not p, the contrapositive. The top and bottom edges are labelled swap, the left and right edges negate both, and the two diagonals are drawn dashed and labelled equivalent, one joining the statement to the contrapositive and the other joining the converse to the inverse.
The picture puts the four statements at the corners of a square. Statements on the same diagonal are equivalent.
Seeing it with sets
Let P be the set of things for which p is true, and Q the set for which q is true. "p⇒q" says that P sits inside Q.
A large oval labelled Q with a smaller oval labelled P drawn completely inside it. A dot inside P is marked 'p and q both true'. A dot inside Q but outside P is marked 'q true, p false'. A dot outside Q is marked 'q false, so p false'.
Now look at a point outside Q. It cannot be in P, because all of P is inside Q. That is the contrapositive: not in Q implies not in P. A point inside Q but outside P shows why the converse can fail.
Why the contrapositive is useful
Sometimes the contrapositive is easier to check. Take "if n2 is even, then n is even", for whole numbers n. Its contrapositive is "if n is odd, then n2 is odd". Write n=2k+1. Then n2=4k2+4k+1, which is odd. So the contrapositive is true, and so is the statement. The next course uses this as a method of proof.
Negating compound statements: a summary
∼(p∧q)≡∼p∨∼q;
∼(p∨q)≡∼p∧∼q;
∼(p⇒q)≡p∧∼q;
∼(p⇔q)≡p⇔∼q.
Do not confuse the negation with the contrapositive. The contrapositive says the same as the statement. The negation says the opposite.
Practise with new numbers
Try it in Python
The program builds the four related statements as functions and checks which pairs agree on all four rows.
Common mistakes
Taking the converse as true because the statement is true. "Divisible by 6 implies divisible by 3" is true, but its converse is false.
Mixing up the inverse and the contrapositive. The contrapositive swaps and negates. The inverse only negates.
Calling the contrapositive the negation. The contrapositive is equivalent to the statement, the negation is its opposite.
Forgetting to negate correctly inside. The contrapositive of "if x>2 then y≤5" is "if y>5 then x≤2".
. A statement and its contrapositive are equivalent, and so are the converse and the inverse, but a statement and its converse need not be. The contrapositive is the tool behind many proofs.
about 25 min1 simulation1 practice question1 Python program5 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.