Mathwords logoMathwords

Iff (If and Only If) — Definition, Formula & Examples

"Iff" is shorthand for "if and only if," meaning two statements are either both true or both false. When you write "P iff Q," you're saying P and Q always have the same truth value.

The biconditional P    QP \iff Q is the logical connective that is true exactly when PP and QQ have the same truth value. It is logically equivalent to the conjunction of two conditionals: (PQ)(QP)(P \Rightarrow Q) \land (Q \Rightarrow P).

Key Formula

P    Q    (PQ)(QP)P \iff Q \;\equiv\; (P \Rightarrow Q) \land (Q \Rightarrow P)
Where:
  • PP = A proposition (statement that is true or false)
  • QQ = A second proposition
  •     \iff = The biconditional connective, read "if and only if"

How It Works

To prove a statement of the form "P if and only if Q," you must prove two directions. First, assume P is true and show Q follows (the "if P then Q" direction). Second, assume Q is true and show P follows (the "if Q then P" direction). If either direction fails, the biconditional is false. In proofs, you'll often see the two directions labeled ()(\Rightarrow) and ()(\Leftarrow).

Example

Problem: Prove: An integer n is even if and only if n² is even.
Direction 1 (⇒): Assume n is even. Then n = 2k for some integer k, so n² = 4k² = 2(2k²), which is even.
n=2k    n2=4k2=2(2k2)n = 2k \;\Rightarrow\; n^2 = 4k^2 = 2(2k^2)
Direction 2 (⇐): Prove the contrapositive: if n is odd, then n² is odd. Let n = 2k + 1, so n² = 4k² + 4k + 1 = 2(2k² + 2k) + 1, which is odd. Since the contrapositive holds, the original direction holds.
n=2k+1    n2=4k2+4k+1=2(2k2+2k)+1n = 2k+1 \;\Rightarrow\; n^2 = 4k^2 + 4k + 1 = 2(2k^2+2k)+1
Answer: Both directions are proven, so the biconditional is established: n is even iff n² is even.

Why It Matters

Biconditional statements appear throughout geometry (e.g., definitions are always "iff" statements) and algebra proofs. Understanding iff is essential for courses like discrete mathematics, where you routinely prove equivalences between conditions.

Common Mistakes

Mistake: Proving only one direction and claiming the biconditional is proved.
Correction: "P if and only if Q" requires two separate arguments: P ⇒ Q and Q ⇒ P. Showing just one direction proves only a conditional, not a biconditional.