A biconditional statement says “p if and only if q”: that the two statements have the same truth value. This lesson defines the biconditional p ↔ q and its truth table, proves that it is the conjunction of a conditional and its converse, shows how to prove one by proving two directions, and separates the “if” of mathematics from the “if” of everyday speech.
“If and only if”
Lesson 1.6 (Converse, inverse and contrapositive) showed that a conditional and its converse are different statements, and that sometimes both are true. The connective of this lesson says exactly that.
Let p and q be statements. The biconditional statement p ↔ q is the statement “p if and only if q”. It is true when p and q have the same truth value, and false otherwise.[1]
Biconditionals are also called bi-implications[1] or equivalences.[3] “If and only if” is abbreviated iff: “p iff q”.[4]
| Row | p | q | p ↔ q |
|---|---|---|---|
| 1 | T | T | T |
| 2 | T | F | F |
| 3 | F | T | F |
| 4 | F | F | T |
Find the truth value of each biconditional.
- “24 is a multiple of 8 if and only if 24 is even.” 24 = 3 × 8 and 24 = 12 × 2: both parts true, so the biconditional is true.
- “9 is a perfect square if and only if 9 is even.” 9 = 3 × 3 is a perfect square, but 9 is odd: the values differ, so it is false.
- “7 is even if and only if 7 > 9.” Both parts are false: they have the same value, so the biconditional is true.
- “0 is positive iff 0 is negative.” 0 is neither, so both parts are false, and the biconditional is true.
Answer: T, F, T, T. The third and fourth are the edge case: a biconditional of two false statements is true, because it claims only that the two have the same truth value.
A true biconditional does not say that its parts are true. “7 is even iff 7 > 9” is true, and both of its parts are false. To learn that q is true from a true p ↔ q, one must also know that p is true.
Two conditionals in one
The name says what the connective is: a pair of conditionals. p ↔ q may be read as short for (p → q) ∧ (q → p), a conditional together with its converse, and the name “biconditional” records that it stands for two conditionals.[5]
For all statements p and q, p ↔ q has the same truth value as (p → q) ∧ (q → p).
Compare the columns, row by row, using the tables of → (lesson 1.5) and ∧ (lesson 1.3). Row 1, both true: both conditionals are true, so the conjunction is true, and so is p ↔ q. Row 2, p true and q false: p → q is false, so the conjunction is false, and so is p ↔ q. Row 3, p false and q true: now q → p is false, so the conjunction is false, and so is p ↔ q. Row 4, both false: both conditionals have false hypotheses, so both are true, the conjunction is true, and so is p ↔ q. The columns agree in all four rows.[6]
| Row | p | q | p → q | q → p | (p → q) ∧ (q → p) | p ↔ q |
|---|---|---|---|---|---|---|
| 1 | T | T | T | T | T | T |
| 2 | T | F | F | T | F | F |
| 3 | F | T | T | F | F | F |
| 4 | F | F | T | T | T | T |
This explains the words. “p if q” is q → p, and “p only if q” is p → q (lesson 1.5, Conditional statements). So “p if and only if q” claims both.[7] The same pair of claims is expressed in several ways:[8]
- “p is necessary and sufficient for q”, or “p is a necessary and sufficient condition for q”;
- “if p then q, and conversely”;
- “p exactly when q”; “p iff q”.
“Necessary and sufficient” combines the two readings of lesson 1.5: “p is sufficient for q” is p → q and “p is necessary for q” is q → p. A condition that is both is a complete test.[10]
The Theorem also says how to prove a biconditional: prove the two conditionals p → q and q → p separately.[11] They are called its two directions. To show that a biconditional is false, one counterexample to either direction is enough.
Prove that for every whole number n: n + 3 is even if and only if n is odd.
- (→) Suppose n + 3 is even: n + 3 = 2 × k for a whole number k. Since n + 3 ≥ 3, k ≥ 2. Then n = 2 × k − 3 = 2 × (k − 2) + 1, with k − 2 a whole number, so n is odd (Even and odd numbers).
- (←) Suppose n is odd: n = 2 × k + 1. Then n + 3 = 2 × k + 4 = 2 × (k + 2), which is even.
- Both directions are proved, so by the Theorem the biconditional is true for every whole number n.
Answer: proved. Check with n = 5: 5 is odd and 5 + 3 = 8 = 4 × 2 is even; with n = 0: 0 is not odd and 0 + 3 = 3 is not even, so both parts are false and the biconditional is true.
For integers x, decide “x × x = 25 if and only if x = 5”, and correct it.
- (←) “If x = 5, then x × x = 25” is true: 5 × 5 = 25.
- (→) “If x × x = 25, then x = 5” is false: (−5) × (−5) = 25 by the sign rules (Sign rules), but −5 ≠ 5. So the biconditional is false.
- A corrected statement: “x × x = 25 iff x = 5 or x = −5”. (←) Both values give 25. (→) For the integers from −4 to 4, x × x is at most 4 × 4 = 16; for x ≥ 6 or x ≤ −6 it is at least 6 × 6 = 36. So an integer with x × x = 25 is 5 or −5.
Answer: the first statement is false because of x = −5; the corrected one is true. One failing direction makes a biconditional false.
Which direction fails?
- Round
- 1
- Score
- 0
- Streak
- 0
Is this biconditional true for every whole number n from 1 to 24? If not, which direction fails? Tap numbers to see p and q for them.
Under each tapped number: the truth value of p, then that of q.
The biconditional and the exclusive or
The biconditional is true when p and q agree; the exclusive or of lesson 1.3 (Conjunction and disjunction) is true when exactly one of them is true, that is, when they disagree.
(1) p ↔ q is true exactly when p ⊕ q is false: it has the same truth value as ¬(p ⊕ q). (2) p ↔ q has the same truth value as (p ∧ q) ∨ (¬p ∧ ¬q).
(1) In each row, either p and q have the same value, and then p ↔ q is true and p ⊕ q is false, or they have different values, and then p ↔ q is false and p ⊕ q is true. So the two always have opposite values.
(2) (p ∧ q) ∨ (¬p ∧ ¬q) is true exactly when one of its parts is true: p ∧ q, both true, or ¬p ∧ ¬q, both false. That is exactly when p and q have the same value, when p ↔ q is true.[12]
| p | q | p ⊕ q | ¬(p ⊕ q) | (p ∧ q) ∨ (¬p ∧ ¬q) | p ↔ q |
|---|---|---|---|---|---|
| T | T | F | T | T | T |
| T | F | T | F | F | F |
| F | T | T | F | F | F |
| F | F | F | T | T | T |
Part (2) reads in words: “p iff q” means “both, or neither”. In the figure above, the biconditional is true for the numbers that are both even and multiples of 3, and for those that are neither.
“If” in mathematics and in everyday speech
Biconditionals are not always stated in full. In everyday speech, “if” often stands for “if and only if”, and the converse is understood without being said.[13] A sign that says “if you are over 12, the ticket costs $8” suggests that younger visitors pay something else, although it does not say so.
In mathematics this blurring is never allowed. A biconditional is always stated with “iff”, “if and only if” or “necessary and sufficient”, and an “if … then” statement is never read as a biconditional.[14]
A Definition on this site is not an “if … then” statement about things already known: it gives a new word its meaning. When a definition is worded with “if”, as the definition of “logically equivalent” in lesson 1.8 (Logical equivalence) is, the new word applies exactly when the condition holds.
A textbook states: “a whole number is a multiple of 4 if it is a multiple of 8”. A student concludes that 12, which is not a multiple of 8, is not a multiple of 4. Find the error.
- “q if p” is p → q: the statement is “if n is a multiple of 8, then n is a multiple of 4”.
- The student used “if n is not a multiple of 8, then n is not a multiple of 4”: the inverse, which says the same as the converse (lesson 1.6). Together with the statement it would make the biconditional, which was never claimed.
- The biconditional is false: 12 = 3 × 4 is a multiple of 4, and 12 = 1 × 8 + 4 is not a multiple of 8.
Answer: the statement is a conditional, true for every whole number; the student read it as a biconditional, which is false because of 12.
When ↔ is combined with other connectives, the brackets decide the meaning. In Rosen’s convention ↔ comes last of all the connectives, after →,[16] but this site writes the brackets.
A theorem saying that several statements are equivalent is sometimes written p ↔ q ↔ r, meaning that p, q and r all have the same truth value.[17] Show that this meaning is not the formula (p ↔ q) ↔ r.
- “All have the same value” is (p ↔ q) ∧ (q ↔ r): the first agrees with the second, and the second with the third.
- Take p false, q false, r true. Then p ↔ q is true, and (p ↔ q) ↔ r is T ↔ T, which is true.
- But q ↔ r is false, so (p ↔ q) ∧ (q ↔ r) is false: the three values are not all the same.
Answer: the two readings differ in this row, so a chain of ↔ written without brackets is ambiguous. Write “p, q and r are equivalent” or (p ↔ q) ∧ (q ↔ r) for the first meaning.
Lesson 1.8 (Logical equivalence) makes precise when two formulas say the same thing, and shows that this happens exactly when their biconditional is true in every row. Proving “if and only if” statements is a lesson of the unit Proof, “Proving ‘if and only if’ statements”.
MathWorld reports that J. H. Conway believed the abbreviation “iff” to come from P. Halmos, and quotes Halmos: “To the best of my knowledge, I did invent the silly thing, but I wouldn’t swear to it in a court of law.”[18] According to Jeff Miller’s list of the earliest uses of logical symbols, the double arrow ↔ for equivalence was apparently first used in 1933, by Albrecht Becker.[19]
Exercises
Find the truth values: (1) 9 is odd iff 9 is prime. (2) 4 + 5 = 10 iff 3 > 7. (3) 16 is a perfect square iff 16 is even. (4) 1 is prime iff 1 is even.
▸ Show solution
- 9 = 4 × 2 + 1 is odd (T), but 9 = 3 × 3 is not prime (F): different values, false.
- Since 4 + 5 = 9, “4 + 5 = 10” is F, and 3 > 7 is F: same values, true.
- 16 = 4 × 4 is a perfect square and 16 = 8 × 2 is even: both T, true.
- 1 is not prime (a prime is greater than 1) and 1 is odd, so both parts are F: true.
For which whole numbers n from 1 to 12 is “n is a multiple of 3 if and only if n is odd” true?
▸ Show solution
The multiples of 3 from 1 to 12 are 3, 6, 9, 12; the odd numbers are 1, 3, 5, 7, 9, 11. The biconditional is true where both hold (3, 9) or neither holds (2, 4, 8, 10).
So it is true for 2, 3, 4, 8, 9, 10 and false for 1, 5, 6, 7, 11, 12.
Write with “iff”: (1) “Being even is necessary and sufficient for n + 3 to be odd.” (2) “x + 4 = 10 exactly when x = 6.” Is the second true for every number x?
▸ Show solution
- “n is even iff n + 3 is odd”, that is, p ↔ q with p: n is even and q: n + 3 is odd.
- “x + 4 = 10 iff x = 6”. It is true for every number x: if x + 4 = 10 then x = 10 − 4 = 6, and 6 + 4 = 10.
Prove that a whole number n is a multiple of 10 if and only if its last digit is 0. Is “n is a multiple of 5 iff its last digit is 0” also true?
▸ Show solution
(→) A multiple of 10 is 10 × k, and its last digit is 0, because multiplying by 10 writes a 0 after the digits of k (Divisibility rules). (←) A number whose last digit is 0 is 10 times the number formed by its other digits.
Both directions hold, so the biconditional is true for every whole number n.
The second biconditional is false. Its direction “if n is a multiple of 5, then its last digit is 0” fails for n = 15: 15 = 3 × 5 is a multiple of 5, but its last digit is 5. (The other direction holds: a number whose last digit is 0 is a multiple of 10, so of 5.) One failing direction is enough.
Show with a truth table that (p ↔ q) ∧ p has the same truth value as p ∧ q in every row. What does this say about learning q from a true biconditional?
▸ Show solution
Columns p, q, p ↔ q, (p ↔ q) ∧ p, p ∧ q. p ↔ q is T, F, F, T. The conjunction with p (T, T, F, F) is T ∧ T = T, F ∧ T = F, F ∧ F = F, T ∧ F = F: the column T, F, F, F, which is the column of p ∧ q.
| Row | p | q | p ↔ q | (p ↔ q) ∧ p | p ∧ q |
|---|---|---|---|---|---|
| 1 | T | T | T | T | T |
| 2 | T | F | F | F | F |
| 3 | F | T | F | F | F |
| 4 | F | F | T | F | F |
So knowing both p ↔ q and p is the same as knowing both p and q: a true biconditional, together with the truth of one part, gives the truth of the other part, as the Caution in section 1 says.
Compare (p ↔ q) ↔ r and p ↔ (q ↔ r) with a truth table. Does either of them mean “p, q and r all have the same truth value”?
▸ Show solution
The table of (p ↔ q) ↔ r and p ↔ (q ↔ r) has 8 rows. Both columns are T, F, F, T, F, T, T, F: they agree in every row, so the grouping of a chain of ↔ does not change its truth value.
| Row | p | q | r | (p ↔ q) ↔ r | p ↔ (q ↔ r) |
|---|---|---|---|---|---|
| 1 | T | T | T | T | T |
| 2 | T | T | F | F | F |
| 3 | T | F | T | F | F |
| 4 | T | F | F | T | T |
| 5 | F | T | T | F | F |
| 6 | F | T | F | T | T |
| 7 | F | F | T | T | T |
| 8 | F | F | F | F | F |
But neither is “all three have the same value”: in row 7 (p F, q F, r T) both are T, while the three values are not all equal, as the last example of the lesson showed.
Summary
- The biconditional p ↔ q, “p if and only if q” (“p iff q”), is true exactly when p and q have the same truth value, both true or both false.
- p ↔ q has the same truth value as (p → q) ∧ (q → p): a conditional and its converse. It is proved by proving both directions, and refuted by one counterexample to either.
- “Necessary and sufficient”, “exactly when” and “if …, and conversely” also express a biconditional.
- p ↔ q is the negation of the exclusive or p ⊕ q, and means “both, or neither”, (p ∧ q) ∨ (¬p ∧ ¬q).
- In mathematics “if” never means “if and only if”. Chains of ↔ need brackets, and “all equivalent” is (p ↔ q) ∧ (q ↔ r).
Sources
- 1.Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Biconditionals”, Definition 6), p. 10 (the whole topic: pp. 10).
“Let p and q be propositions. The biconditional statement p ↔ q is the proposition “p if and only if q.” The biconditional statement p ↔ q is true when p and q have the same truth values, and is false otherwise. Biconditional statements are also called bi-implications.”
Used for: the definition of the biconditional p ↔ q and its truth table; biconditionals are also called bi-implications. - 2.Donna Kirk and others, Contemporary Mathematics (OpenStax, Rice University, 2023).Chapter 2, “Logic”, section 2.4, “Truth Tables for the Conditional and Biconditional”: “Use and Apply the Biconditional to Construct a Truth Table”, p. 90 (the whole topic: pp. 90–91).
“is true whenever the truth value of the hypothesis matches the truth value of the conclusion, otherwise it is false.”
Used for: a biconditional is true when the truth values of its two parts match, and false otherwise. - 3.Eric W. Weisstein, “Biconditional”, MathWorld, Wolfram Research.
“It is also called an equivalence.”
Used for: the biconditional is also called an equivalence. - 4.Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 52 (the whole topic: pp. 52).
“The phrase if and only if occurs so often in mathematics that there is a common abbreviation for it, iff.”
Used for: “if and only if” is abbreviated “iff”. - 5.Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 52 (the whole topic: pp. 52).
“You can think of P ↔ Q as just an abbreviation for the formula (P → Q) ∧ (Q → P). A statement of the form P ↔ Q is called a biconditional statement, because it represents two conditional statements.”
Used for: p ↔ q can be thought of as an abbreviation of (p → q) ∧ (q → p); it is called biconditional because it represents two conditionals. - 6.Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Biconditionals”), p. 10 (the whole topic: pp. 10).
“Note that p ↔ q has exactly the same truth value as (p → q) ∧ (q → p).”
Used for: the Theorem: p ↔ q has the same truth value as (p → q) ∧ (q → p) (also in the table caption). - 7.Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 52 (the whole topic: pp. 52).
“Because Q → P can be written “P if Q” and P → Q can be written “P only if Q,” P ↔ Q means “P if Q and P only if Q,” and this is often written “P if and only if Q.””
Used for: “p if q” is q → p and “p only if q” is p → q, so “p if and only if q” claims both. - 8.Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Biconditionals”), p. 10 (the whole topic: pp. 10).
“There are some other common ways to express p ↔ q: “p is necessary and sufficient for q” “if p then q, and conversely” “p iff q.” “p exactly when q.””
Used for: other ways to express p ↔ q: “p is necessary and sufficient for q”, “if p then q, and conversely”, “p iff q”, “p exactly when q”. - 9.Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 52 (the whole topic: pp. 52).
“Another statement that means P ↔ Q is “P is a necessary and sufficient condition for Q.””
Used for: “p is a necessary and sufficient condition for q” means p ↔ q. - 10.Eric W. Weisstein, “Iff”, MathWorld, Wolfram Research.
“Iff means that a condition is both necessary and sufficient.”
Used for: “iff” means that a condition is both necessary and sufficient. - 11.Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).Chapter 3, “Proofs”, section 3.4, “Proofs Involving Conjunctions and Biconditionals”, p. 126 (the whole topic: pp. 124–127).
“To prove a goal of the form P ↔ Q: Prove P → Q and Q → P separately.”
Used for: a biconditional is proved by proving its two conditionals separately. - 12.Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).Chapter 1, “The Foundations: Logic and Proofs”, section 1.3, “Propositional Equivalences” (1.3.2, “Logical Equivalences”, Table 8), p. 29 (the whole topic: pp. 27–29).
“p ↔ q ≡ (p ∧ q) ∨ (¬p ∧ ¬q)”
Used for: p ↔ q has the same truth value as (p ∧ q) ∨ (¬p ∧ ¬q) (part 2 of the Proposition; the sign ≡ is defined in lesson 1.8). - 13.Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.3, “Conditional Statements”: “Implicit Use of Biconditionals”), p. 10 (the whole topic: pp. 10).
“In particular, the “if and only if” construction used in biconditionals is rarely used in common language. Instead, biconditionals are often expressed using an “if, then” or an “only if” construction.”
Used for: in everyday speech “if” often stands for “if and only if”, and the converse is understood without being said. - 14.Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 53 (the whole topic: pp. 52–53).
“Such a blurring of the distinction between if and iff is never acceptable in mathematics.”
Used for: in mathematics the blurring of “if” and “iff” is never allowed. - 15.Daniel J. Velleman, How to Prove It: A Structured Approach (2nd ed., Cambridge University Press, 2006).Chapter 1, “Sentential Logic”, section 1.5, “The Conditional and Biconditional Connectives”, p. 53 (the whole topic: pp. 53).
“You should never interpret an if-then statement in mathematics as a biconditional statement, the way you might in everyday speech.”
Used for: in mathematics an “if … then” statement is never read as a biconditional; biconditionals are stated with “iff” or “necessary and sufficient” (the sentence before). - 16.Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).Chapter 1, “The Foundations: Logic and Proofs”, section 1.1, “Propositional Logic” (1.1.5, “Precedence of Logical Operators”), p. 11 (the whole topic: pp. 11).
“We will use parentheses when the order of the conditional operator and biconditional operator is at issue, although the conditional operator has precedence over the biconditional operator.”
Used for: in Rosen’s convention ↔ comes last, after →; Rosen too writes the brackets. - 17.Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).Chapter 1, “The Foundations: Logic and Proofs”, section 1.7, “Introduction to Proofs” (1.7.7, “Proofs by Contradiction”: “Proofs of Equivalence”), p. 92 (the whole topic: pp. 92–93).
“Such a theorem states that propositions p1, p2, p3, … , pn are equivalent. This can be written as p1 ↔ p2 ↔ ⋯ ↔ pn, which states that all n propositions have the same truth values”
Used for: a theorem that several statements are equivalent is sometimes written p ↔ q ↔ r, meaning that all of them have the same truth value. - 18.Eric W. Weisstein, “Iff”, MathWorld, Wolfram Research.
“To the best of my knowledge, I did invent the silly thing, but I wouldn't swear to it in a court of law.”
Used for: MathWorld reports that J. H. Conway believed the word “iff” originated with P. Halmos (the sentence before), and quotes Halmos’s statement. - 19.Jeff Miller, “Earliest Uses of Symbols of Set Theory and Logic”, MacTutor History of Mathematics Archive, University of St Andrews.Section “Equivalence”. mathshistory.st-andrews.ac.uk/Miller/mathsym/set · open at the quoted passage.
“The double arrow symbol ↔ for the logical equivalence was apparently first used in 1933 by Albrecht Becker”
Used for: according to Jeff Miller’s list, the double arrow ↔ was apparently first used for equivalence in 1933, by Albrecht Becker.