“If” states an implication; “if and only if” states an equivalence. An implication says that one condition is sufficient for another. An equivalence says that each condition is sufficient for the other.

Recognising that difference prevents common errors in solving equations and reading theorems. A correct forward argument does not automatically justify running it backwards.

On this page

Identify the antecedent and consequent

In p⇒qp\Rightarrow q, p is the antecedent and q is the consequent. The implication rules out the case in which p is true but q is false. It does not assert p, and it does not say that q is true only when p is true.

For integers n, “if n is divisible by 4, then n is even” is a universal conditional claim. To verify it, write n=4kn=4k for some integer k. Then n=2(2k)n=2(2k), and 2k2k is an integer, so n is even.

The example n=8 illustrates the implication. The arbitrary-integer argument proves it. The integer 6 does not refute it because its antecedent, divisibility by 4, is false.

Three related statements are easy to confuse with the original.

Converse, inverse and contrapositive: reference table
Name Symbolic form Divisibility example
Original p⇒qp\Rightarrow q Divisible by 4 implies even
Converse q⇒pq\Rightarrow p Even implies divisible by 4
Inverse ¬p⇒¬q\neg p\Rightarrow\neg q Not divisible by 4 implies not even
Contrapositive ¬q⇒¬p\neg q\Rightarrow\neg p Not even implies not divisible by 4

The original and contrapositive are logically equivalent. The converse and inverse are equivalent to each other, but generally not to the original. In the example, n=6 refutes both the converse and inverse. The original and contrapositive remain true.

Reverse and negate both sides for the contrapositive

Two separate equivalence pairsAn implication is equivalent to its contrapositive. Its converse is equivalent to its inverse. The two rows need not be equivalent to each other.Originalp ⇒ qContrapositive¬q ⇒ ¬p⇔Converseq ⇒ pInverse¬p ⇒ ¬q⇔No equivalence between the rows in general
The double arrows connect only statements with the same complete truth table.
Diagram explanation and exact data

At p=false and q=true, the original and contrapositive are true, while the converse and inverse are false. This assignment separates the two equivalence classes.

Reverse and negate both sides for the contrapositive: exact reference data
p q Original / contrapositive Converse / inverse
True True True True
True False False True
False True True False
False False True True

Calling a statement the “inverse” of an implication is a logic convention; it is not the same topic as an Inverse Function.

Necessary and sufficient conditions

When p⇒qp\Rightarrow q, p is sufficient for q, and q is necessary for p. Divisibility by 4 is sufficient to establish evenness. Evenness is necessary for divisibility by 4, but does not establish it by itself.

“p only if q” means p⇒qp\Rightarrow q. “p if q” means q⇒pq\Rightarrow p. Reading these as separate sentences helps:

  • “n is divisible by 4 only if n is even” puts divisibility by 4 first.
  • “n is even if n is divisible by 4” expresses the same implication with the clauses reversed in English.

For a real equation, a condition such as x≠0x\ne0 may be necessary for a division step to be legal. Stating that condition does not solve the equation; it identifies where a proposed operation is permitted.

Negate the implication, not just its conclusion

The negation of p⇒qp\Rightarrow q is p∧¬qp\land\neg q. To refute a universal conditional, find a permitted case satisfying the hypothesis and violating the conclusion.

For example, the claim “if an integer is even, then it is divisible by 4” is refuted by n=6: evenness holds and divisibility by 4 fails. An odd integer would not test the relevant condition.

By contrast, p⇒¬qp\Rightarrow\neg q is not the negation of the original implication. It is another implication that remains true whenever p is false. Correct negation is essential in Proof by Contradiction.

A biconditional requires both directions

Write p⇔qp\Leftrightarrow q for “p if and only if q”. Its content is the pair of implications

p⇔q≡(p⇒q)∧(q⇒p).p\Leftrightarrow q\quad\equiv\quad(p\Rightarrow q)\land(q\Rightarrow p).

For integers, “n is odd if and only if n2n^2 is odd” is true. The forward direction follows by writing n=2k+1n=2k+1 and expanding:

(2k+1)2=2(2k2+2k)+1.(2k+1)^2=2(2k^2+2k)+1.

This has the form of an odd integer. For the reverse direction, use the contrapositive: if n is even, write n=2kn=2k. Then n2=2(2k2)n^2=2(2k^2) is even. Therefore an odd square cannot come from an even integer, and every integer is either even or odd.

The two directions use different arguments. Combining them establishes the equivalence; proving only the expansion would not have been enough.

Equivalent equations preserve all and only the solutions

For real x, subtracting the same number from both sides or multiplying both sides by a non-zero constant produces an equivalent equation. Squaring both sides gives a forward implication, but may not preserve the reverse direction.

For instance,

x=3⇒x2=9,x=3\quad\Rightarrow\quad x^2=9,

but x2=9x^2=9 also allows x=−3x=-3. The equivalence is

x2=9⇔(x=3∨x=−3).x^2=9\quad\Leftrightarrow\quad(x=3\lor x=-3).

On the restricted domain x≥0x\ge0, the simpler equivalence x2=9⇔x=3x^2=9\Leftrightarrow x=3 is valid. The extra domain condition is doing mathematical work. It must not disappear midway through a derivation.

Another useful equivalence is the zero-product property for real numbers: ab=0ab=0 is equivalent to a=0a=0 or b=0b=0. It does not justify declaring a factor zero when the product is some other number.

Chains of implications and conditional conclusions

If p⇒qp\Rightarrow q and q⇒rq\Rightarrow r, then p⇒rp\Rightarrow r. For example, divisibility by 12 implies divisibility by 4, which implies evenness. That chain proves the forward conclusion, not its converse.

A conclusion can be conditionally established without establishing its assumption. Proving “if this figure is a square, then its diagonals have equal length” does not prove that the figure is a square. In applications, identify which hypotheses have actually been given or verified.

The distinction also separates logical sufficiency from causal explanation. A theorem about number properties describes necessary relationships. It is not claiming that one number property physically causes another.

Practice questions

  1. State the contrapositive of “If n is divisible by 6, then n is divisible by 3”.
  2. Is the converse true for all integers? Give evidence that settles the question.
  3. Over the real numbers, is x2=16x^2=16 equivalent to x=4x=4? State a correct equivalence.
Check your answers
  1. “If n is not divisible by 3, then n is not divisible by 6.” It reverses the direction and negates both conditions.
  2. No. The integer 3 is divisible by 3 but not by 6. One valid counterexample refutes the universal converse.
  3. No, because −4 is also a solution. The correct equivalence is x2=16⇔(x=4∨x=−4)x^2=16\Leftrightarrow(x=4\lor x=-4), or x2=16⇔x=4x^2=16\Leftrightarrow x=4 on the restricted domain x≥0x\ge0.

Related topics

Use Mathematical Proof to turn these logical structures into complete arguments. Direct Proof develops forward reasoning, while Proof by Contradiction and Mathematical Induction address other proof structures.

Sources and further reading