Skip to content

Converse, inverse and contrapositive: how to write each, which are equivalent, and how to prove by contrapositive

The contrapositive of “if p, then q” is “if not q, then not p”, and it is always true or false together with the original statement. The converse (“if q, then p”) and the inverse (“if not p, then not q”) can differ from the original, but they always agree with each other.

This guide shows how to write all three, why only the contrapositive keeps the meaning, what changes when a statement contains “and”, “or”, “all” or “none”, and how to use the contrapositive in a proof. Every claim about equivalence links to a free checker that shows the truth table.

The four forms at a glance

Start from a conditional statement, “if p, then q”, written p → q. The part after “if” is the hypothesis, also called the antecedent. The part after “then” is the conclusion, also called the consequent.

FormSymbolsIn wordsHow it is builtAlways has the same truth value as p → q?
Conditional (the original)p → qIf p, then q.
Converseq → pIf q, then p.Swap the two parts.No
Inverse¬p → ¬qIf not p, then not q.Negate both parts.No
Contrapositive¬q → ¬pIf not q, then not p.Swap and negate.Yes

The same four forms with a statement from geometry:

FormStatementTrue or false
ConditionalIf a quadrilateral is a square, then it is a rectangle.True
ConverseIf a quadrilateral is a rectangle, then it is a square.False: a 2 × 1 rectangle is not a square.
InverseIf a quadrilateral is not a square, then it is not a rectangle.False: the same 2 × 1 rectangle.
ContrapositiveIf a quadrilateral is not a rectangle, then it is not a square.True

To remember them: the converse swaps, the inverse negates, and the contrapositive does both. The four forms make two pairs that always share a truth value: the conditional with its contrapositive, and the converse with the inverse. The inverse is the contrapositive of the converse, which is why those two always agree.

How to write the converse, inverse and contrapositive

1. Put the statement in if–then form. Many statements hide their conditional:

You readAs an if–then statement
All squares are rectangles.If a shape is a square, then it is a rectangle.
q whenever p. q if p.If p, then q.
p only if q.If p, then q. (Not “if q, then p”.)
p implies q. p is sufficient for q.If p, then q.
q is necessary for p.If p, then q.
No reptiles are mammals.If an animal is a reptile, then it is not a mammal.
You cannot enter unless you have a ticket.If you do not have a ticket, then you cannot enter.

“Only if” is easy to reverse; the page on necessary and sufficient conditions shows the two readings side by side.

2. Name the hypothesis and the conclusion. In “if a number is divisible by 6, then it is divisible by 3”, p is “a number is divisible by 6” and q is “it is divisible by 3”.

3. Rearrange.

  • Converse: “If a number is divisible by 3, then it is divisible by 6.” False: 9 is divisible by 3 but not by 6.
  • Inverse: “If a number is not divisible by 6, then it is not divisible by 3.” False: 9 again.
  • Contrapositive: “If a number is not divisible by 3, then it is not divisible by 6.” True.

4. Negate each part with care. The negation of “x > 3” is “x ≤ 3”, not “x < 3”. The negation of “all students passed” is “not all students passed”, meaning at least one did not; it is not “no student passed”. The negation of “A and B” is “not A or not B”, and the negation of “A or B” is “not A and not B”: these are De Morgan's laws. The swap is mechanical; the negation is where the care goes.

Why the contrapositive is equivalent: the truth table

A conditional p → q is false in exactly one situation: the hypothesis is true and the conclusion is false. In every other situation it is true, including when the hypothesis is false (a vacuous truth). Here are all four forms on the four possible rows. Row 0 has every input false, as in Tangibool's tools.

Truth table: p → q, Converse q → p, Inverse ¬p → ¬q, Contrapositive ¬q → ¬p
#pqp → qConverse q → pInverse ¬p → ¬qContrapositive ¬q → ¬p
0FALSEFALSETRUETRUETRUETRUE
1FALSETRUETRUEFALSEFALSETRUE
2TRUEFALSEFALSETRUETRUEFALSE
3TRUETRUETRUETRUETRUETRUE

Computed by the Tangibool engine

The conditional and its contrapositive have the same column, T, T, F, T, so they are logically equivalent: each is true exactly when the other is. Both fail only on row 2, where p is true and q is false. For the contrapositive, that row reads “not q is true and not p is false”: the same failure, seen from the other end.

The converse and the inverse share a different column, T, F, T, T. They fail on row 1, where q is true and p is false, so either can be false while the original is true. On row 2 it is the other way round.

Check each pair yourself. Each link opens the equivalence checker with the two formulas filled in and runs it:

The same result without a table: p → q can be rewritten as ¬p ∨ q (implication elimination). Rewrite ¬q → ¬p the same way and you get ¬¬q ∨ ¬p. Double negation turns that into q ∨ ¬p, and the commutative law turns it into ¬p ∨ q: the original again. The truth table generator shows (p → q) ↔ (¬q → ¬p) true on every row, a tautology.

When the converse or inverse is true anyway

“Not equivalent” does not mean “false”. It means the converse's truth value does not follow from the original's, so it has to be checked on its own. Sometimes it is true:

  • “If n is odd, then n² is odd” is true, and so is its converse, “if n² is odd, then n is odd”.
  • The Pythagorean theorem says that in a right triangle with legs a and b and hypotenuse c, a² + b² = c². Its converse is also true: a triangle whose sides satisfy a² + b² = c² has a right angle opposite the side c.
  • “If an angle measures 90°, then it is a right angle” and its converse are both true, because together they are the definition of a right angle.

When a conditional and its converse are both true, they can be joined into a biconditional, “p if and only if q”, written p ↔ q. Definitions are biconditionals, which is why their converses hold. The contrapositive of a biconditional, ¬p ↔ ¬q, is equivalent to it as well; the biconditional page has its truth table.

Contrapositives of statements with “and”, “or”, “all” and “none”

Textbook examples use a single p and a single q. Real statements often have several conditions, and that is where contrapositives go wrong. When you negate a part that contains “and” or “or”, the connective flips.

StatementContrapositiveA common wrong version
If A and B, then C.If not C, then not A or not B.If not C, then not A and not B.
If A or B, then C.If not C, then not A and not B.If not C, then not A or not B.
If A, then B and C.If not B or not C, then not A.If not B and not C, then not A.
If A, then B or C.If not B and not C, then not A.If not B or not C, then not A.

An example with numbers. “If a whole number is even and greater than 2, then it is not prime” is true. Its contrapositive is “if a whole number is prime, then it is odd or it is at most 2”, which is also true, because 2 is the only even prime. The wrong version, “if a whole number is prime, then it is odd and at most 2”, is false: 3 is prime and greater than 2.

The equivalence checker gives the same verdicts on the pattern. (A and B) → C against ¬C → (¬A ∨ ¬B) is equivalent. (A and B) → C against ¬C → (¬A ∧ ¬B) is not, and the counterexample is A false, B true, C false. In the example, that row is a number that is not even, is greater than 2, and is prime: 3. The other two patterns check out the same way: (A or B) → C and A → (B or C).

“All” and “none” statements work the same way once they are written as conditionals:

  • “All S are P” means “if something is an S, then it is a P”. Its contrapositive is “if something is not a P, then it is not an S”. “All squares are rectangles” becomes “anything that is not a rectangle is not a square”.
  • “No S are P” means “if something is an S, then it is not a P”. Its contrapositive is “if something is a P, then it is not an S”. “No reptiles are mammals” becomes “no mammals are reptiles”.

“Some S are P” is not a conditional, so it has no contrapositive in this sense.

Examples

Each row gives a conditional with its converse, inverse and contrapositive, marked true (✓) or false (✗). The conditional and its contrapositive always share a mark, and so do the converse and the inverse.

Geometry

ConditionalConverseInverseContrapositive
✓ If two angles are vertical angles, then they are congruent.✗ If two angles are congruent, then they are vertical angles.✗ If two angles are not vertical angles, then they are not congruent.✓ If two angles are not congruent, then they are not vertical angles.
✓ If two lines in a plane are perpendicular, then they intersect.✗ If two lines in a plane intersect, then they are perpendicular.✗ If two lines in a plane are not perpendicular, then they do not intersect.✓ If two lines in a plane do not intersect, then they are not perpendicular.
✓ If a quadrilateral is a square, then it has four right angles.✗ If a quadrilateral has four right angles, then it is a square.✗ If a quadrilateral is not a square, then it does not have four right angles.✓ If a quadrilateral does not have four right angles, then it is not a square.
✓ If an angle measures 90°, then it is a right angle.✓ If an angle is a right angle, then it measures 90°.✓ If an angle does not measure 90°, then it is not a right angle.✓ If an angle is not a right angle, then it does not measure 90°.
✓ If a triangle has three congruent sides, then it has three congruent angles.✓ If a triangle has three congruent angles, then it has three congruent sides.✓ If a triangle does not have three congruent sides, then it does not have three congruent angles.✓ If a triangle does not have three congruent angles, then it does not have three congruent sides.

Numbers and algebra

For whole numbers n and real numbers x:

ConditionalConverseInverseContrapositive
✓ If n is divisible by 6, then n is divisible by 3.✗ If n is divisible by 3, then n is divisible by 6. (n = 9)✗ If n is not divisible by 6, then n is not divisible by 3. (n = 9)✓ If n is not divisible by 3, then n is not divisible by 6.
✓ If x = 2, then x² = 4.✗ If x² = 4, then x = 2. (x = −2)✗ If x ≠ 2, then x² ≠ 4. (x = −2)✓ If x² ≠ 4, then x ≠ 2.
✓ If n is odd, then n² is odd.✓ If n² is odd, then n is odd.✓ If n is even, then n² is even.✓ If n² is even, then n is even.
✗ If n is odd, then n is prime. (n = 9)✗ If n is prime, then n is odd. (n = 2)✗ If n is even, then n is not prime. (n = 2)✗ If n is not prime, then n is even. (n = 9)

The last row is a reminder that the contrapositive is not automatically true: it is false exactly when the original is.

Everyday statements

ConditionalConverseInverseContrapositive
✓ If an animal is a dog, then it is a mammal.✗ If an animal is a mammal, then it is a dog.✗ If an animal is not a dog, then it is not a mammal.✓ If an animal is not a mammal, then it is not a dog.
✓ If it is raining, then the ground is wet. (Taken as true.)✗ If the ground is wet, then it is raining. (A sprinkler.)✗ If it is not raining, then the ground is not wet. (A sprinkler.)✓ If the ground is not wet, then it is not raining.

Code, testing and data

Programmers meet contrapositives whenever they check a rule:

  • A permission rule. “If the user is an admin, then the delete button is shown.” Its contrapositive is “if the delete button is not shown, then the user is not an admin”, so a test that finds the button hidden from an admin has found a bug. The converse, “if the button is shown, the user is an admin”, is a different rule: it fails if document owners also see the button.
  • A function's contract. “If the input is valid, then the function returns no error.” Its contrapositive is “if the function returns an error, then the input was not valid”. The converse, “no error means the input was valid”, does not follow: a function can accept bad input without complaint, and that needs its own test.
  • A data check. “Every paid order has a payment ID” is “if an order is paid, then it has a payment ID”. Its contrapositive, “if an order has no payment ID, then it is not paid”, is the same rule, and often the easier query: list the orders without a payment ID and confirm that none is marked as paid.

LSAT-style conditional statements

LSAT logical reasoning questions often hide a conditional in words like “only”, “unless”, “no” and “without”. Write the conditional first, then take its contrapositive; the converse and the inverse are the usual trap answers.

SentenceAs a conditionalContrapositive (follows)Trap (does not follow)
Only members can vote.If someone votes, they are a member.If someone is not a member, they cannot vote.If someone is a member, they can vote. (Converse.)
No reptiles are mammals.If an animal is a reptile, it is not a mammal.If an animal is a mammal, it is not a reptile.If an animal is not a reptile, it is a mammal. (Inverse.)
You cannot enter unless you have a ticket.If you do not have a ticket, you cannot enter.If you entered, you have a ticket.If you have a ticket, you can enter. (Inverse.)
No one gets a bonus without a review.If someone gets a bonus, they had a review.If someone had no review, they get no bonus.If someone had a review, they get a bonus. (Converse.)

The page on “unless” covers both readings of “A unless B”: as a claim it is “if not B, then A”, and as an admission rule it is “A and not B”.

Proof by contrapositive

To prove “if P, then Q”, you can prove “if not Q, then not P” instead. The two are logically equivalent, as the truth table above shows, so a proof of one is a proof of the other. This is called proof by contrapositive, or proof by contraposition.

It helps when “not Q” gives you something concrete to work with and P does not. The template:

Suppose not Q. [Steps.] Therefore not P. Since “if not Q, then not P” is the contrapositive of “if P, then Q”, the original statement holds.

Example 1. For every integer n, if n² is even, then n is even.

Starting from “n² is even” gives little to work with. The contrapositive is: if n is odd, then n² is odd.

Suppose n is odd, so n = 2k + 1 for some integer k. Then n² = 4k² + 4k + 1 = 2(2k² + 2k) + 1, which is odd. So if n is odd, n² is odd, and by contraposition, if n² is even, then n is even.

Example 2. For every integer n, if 5n + 3 is even, then n is odd.

The contrapositive is: if n is even, then 5n + 3 is odd.

Suppose n is even, so n = 2k for some integer k. Then 5n + 3 = 10k + 3 = 2(5k + 1) + 1, which is odd. By contraposition, if 5n + 3 is even, then n is odd.

Example 3, with a compound conclusion. For all real numbers x and y, if x + y ≥ 2, then x ≥ 1 or y ≥ 1.

The negation of “x ≥ 1 or y ≥ 1” is “x < 1 and y < 1”: the “or” becomes “and”, and each “≥” becomes “<”. So the contrapositive is: if x < 1 and y < 1, then x + y < 2.

Suppose x < 1 and y < 1. Adding the two inequalities gives x + y < 2. By contraposition, if x + y ≥ 2, then x ≥ 1 or y ≥ 1.

Contrapositive or contradiction?

A proof by contradiction assumes P and not Q together and looks for any contradiction. A proof by contrapositive assumes only not Q and aims for one particular result, not P. Every proof by contrapositive can be rewritten as a proof by contradiction (assume P and not Q, derive not P, and P and not P contradict each other), but the contrapositive version has a fixed target, which makes it easier to plan and to check.

The same idea as an argument is modus tollens: from “if p, then q” and “not q”, conclude “not p”. The argument validity checker reports that the conclusion follows.

Common mistakes

  1. Treating the converse as true because the original is. From “if it rains, the ground is wet” and “the ground is wet”, concluding “it rained” is the fallacy called affirming the consequent. The argument checker reports that the conclusion does not follow, with the counterexample p = F, q = T: the ground is wet and it did not rain.
  2. Treating the inverse as true because the original is. From “if it rains, the ground is wet” and “it is not raining”, concluding “the ground is not wet” is denying the antecedent. The checker gives the same counterexample.
  3. Negating only one part. “If not q, then p” and “if q, then not p” are not any of the four forms.
  4. Negating “and”, “or” and “all” word by word. “Not (A and B)” is “not A or not B”, and “not all passed” is “at least one did not pass”. The NOT over AND page shows the row where the word-by-word version fails.
  5. Mixing up the inverse with the negation. The negation of “if p, then q” is “p and not q”, the one situation in which the conditional fails. It is not “if not p, then not q”. The negation of “if it rains, the match is cancelled” is “it rains and the match is not cancelled”. ¬(p → q) against p ∧ ¬q is equivalent; ¬(p → q) against the inverse is not.
  6. Reading “only if” backwards. “p only if q” is p → q, so its contrapositive is “if not q, then not p”, not “if not p, then not q”.

Check your own statements

You can check any statement of this kind in the browser, without an account:

  1. Give each part a letter, for example p for “the number is divisible by 6” and q for “it is divisible by 3”.
  2. Open the equivalence checker. Type the original in the first box and the form you want to test in the second: p -> q and NOT q -> NOT p.
  3. The checker says whether the two are equivalent. If they are not, it shows a counterexample, an assignment that makes one true and the other false, which you can translate back into words.

Write NOT, AND, OR, -> and <->, or the symbols ¬, ∧, ∨, → and ↔. A single &, a ~ or the arrow => is rejected with a message naming the form to use, because each means something else in some programming languages. Geometry textbooks often write the negation of p as ~p; type it as NOT p. For an argument with premises and a conclusion, such as modus tollens or the fallacies above, use the argument validity checker.

Frequently asked questions

What is a contrapositive?

The contrapositive of “if p, then q” is “if not q, then not p”: swap the hypothesis and the conclusion, and negate both. It always has the same truth value as the original statement.

Is the contrapositive always true?

No. It is true exactly when the original is true. “If a whole number is odd, then it is prime” is false, because 9 is odd and not prime, and so is its contrapositive, “if a whole number is not prime, then it is even”: 9 again.

Why is the contrapositive logically equivalent to the original?

Both are false in the same single situation, when the hypothesis is true and the conclusion is false, and true in all the others. The truth table above shows it row by row.

What is the law of contrapositive?

The rule that a conditional statement and its contrapositive are either both true or both false. In arguments it appears as modus tollens.

What is the difference between the converse and the contrapositive?

The converse only swaps the parts: “if q, then p”. The contrapositive swaps them and negates both: “if not q, then not p”. The contrapositive always matches the original; the converse may not.

What is a converse statement?

The converse of “if p, then q” is “if q, then p”. In geometry, the converse of “if two angles are vertical angles, then they are congruent” is “if two angles are congruent, then they are vertical angles”, which is false.

What is an inverse statement?

The inverse of “if p, then q” is “if not p, then not q”. It is equivalent to the converse, not to the original. Here “inverse” has nothing to do with inverse functions.

What does contrapositive mean in geometry?

The same as in logic. Geometry courses use contrapositives to restate theorems, as in “if two angles are not congruent, then they are not vertical angles”, and in indirect proofs. They often write negation with a tilde, so the contrapositive of p → q appears as ~q → ~p.

How do you remember converse, inverse and contrapositive?

Converse: swap. Inverse: negate. Contrapositive: swap and negate. Then remember the pairs: the original goes with the contrapositive, and the converse goes with the inverse.

What is the contrapositive of a biconditional?

The contrapositive of “p if and only if q” is “not p if and only if not q”, and the two are equivalent.

Written by Muaz Notiar. The Tangibool engine (semantics tangibool-semantics/1, engine 1.0.0) computed the truth table marked “Computed by the Tangibool engine”, and the 16 tool results the guide links to were re-run through the tools' own code in the build of and match what the text says. © 2026 Foreranger LTD.