Logic & Sets

Biconditional Statement: If and Only If, Explained

A biconditional statement, written p↔qp \leftrightarrow q and read ”pp if and only if qq”, is true exactly when pp and qq have the same truth value: both true or both false. It is the same claim as p→qp \to q and q→pq \to p holding together.

p↔q≡(p→q)∧(q→p)p \leftrightarrow q \equiv (p \rightarrow q) \wedge (q \rightarrow p)

Try it with your numbers

Show every step

That one fact explains the symbol, the truth table, how to write the statement from a conditional and why a single counterexample in either direction breaks it. The sections below turn it into methods you can use on homework and exams.

What is a biconditional statement?

A biconditional joins two statements with the phrase “if and only if”. Texts write it as p↔qp \leftrightarrow q, p⇔qp \Leftrightarrow q or ”pp iff qq”. You will also meet it in disguise: “exactly when”, “just in case”, “is equivalent to”, and ”qq is necessary and sufficient for pp” all say the same thing.

The truth table has only one rule: the output is true when the inputs match.

pp qq p↔qp \leftrightarrow q
T T T
T F F
F T F
F F T

The last row surprises people. When both parts are false, the biconditional is still true, because it only claims that the two parts agree. ”7<37 < 3 if and only if 2+2=52 + 2 = 5” is a true statement, even though nothing connects the halves. Everyday speech suggests a link between the ideas, but logic checks only the truth values. For the other connectives side by side, see truth tables for the five logical connectives.

How does a biconditional split into two conditionals?

Here is the one clean idea behind the whole topic:

p↔q≡(p→q)∧(q→p)p \leftrightarrow q \equiv (p \to q) \wedge (q \to p)

To see why, ask when each piece fails. p→qp \to q is false only in the row where pp is true and qq is false. q→pq \to p is false only where qq is true and pp is false. The “and” fails in exactly those two rows, and those are exactly the rows where pp and qq disagree. What survives is the two matching rows.

The second conditional, q→pq \to p, is the converse of the first, so a biconditional is a conditional plus its converse. If you want the full family, the converse, inverse and contrapositive page lays out all three.

Logic circuits and code use an equivalent form with only “or” and “not”:

(¬p∨q)∧(p∨¬q)(\neg p \vee q) \wedge (p \vee \neg q)

In programming, comparing two Boolean values with == is a biconditional, and in hardware the gate that does it is called XNOR.

Quick check

If pp is true and qq is false, what is the truth value of (p→q)∧(q→p)(p \rightarrow q) \wedge (q \rightarrow p)?

What is the difference between “if” and “only if”?

This is where most students lose points. ”pp if qq” means q→pq \to p. ”pp only if qq” means p→qp \to q. The word “only” points forward to the condition you cannot do without.

Take “A person can run for US President only if they are at least 3535 years old.” Let pp be “can run” and qq be “is at least 3535”. The statement says p→qp \to q: no one under 3535 can run. It does not say the reverse, since a 4040-year-old who was not born in the US still cannot run. Being 3535 is necessary, not sufficient. The phrase “if and only if” bundles both directions: qq is necessary and sufficient for pp.

Translation key

"pp if qq" means q→pq \to p. "pp only if qq" means p→qp \to q. Say both and you have p↔qp \leftrightarrow q.

Contracts and promotions use this logic all the time. “You get the discount if and only if you spend at least $75” promises the discount at $75 and also promises none below it. A store that only says “if” has promised just one direction.

How do you write a biconditional statement from a conditional?

You can write a biconditional only when the conditional and its converse are both true. Follow this routine:

  1. Split the statement into hypothesis and conclusion.
  2. Swap them to form the converse.
  3. Test each direction by hunting for a counterexample.
  4. If both survive, write “hypothesis if and only if conclusion”.

Start with “If two angles are supplementary, then their measures add to 180∘180^\circ.” The converse is “If two angles have measures that add to 180∘180^\circ, then they are supplementary.” Both are true, because this is the definition of supplementary angles (the types of angles page covers the rest of the vocabulary). So you can write: two angles are supplementary if and only if their measures add to 180∘180^\circ.

Now try “If a number is divisible by 44, then it is even.” True. The converse, “If a number is even, then it is divisible by 44”, is false: 66 is even and 6÷46 \div 4 is not a whole number. No biconditional exists here, and writing one would be a false claim.

Notice that step 3 is the real work. Checking the direction you already believe is easy. The converse is the one that hides the counterexample.

When is a biconditional statement true or false?

Evaluate each side separately, then compare. Same value gives true, different values gives false. No other rule is needed.

Many problems state the biconditional as an open sentence and ask where it holds. Test x2=16↔x=4x^2 = 16 \leftrightarrow x = 4 for x∈{−4,0,4}x \in \{-4, 0, 4\}.

  • x=−4x = -4: x2=16x^2 = 16 is true and x=4x = 4 is false. They differ, so the biconditional is false.
  • x=0x = 0: x2=16x^2 = 16 is false and x=4x = 4 is false. They match, so it is true.
  • x=4x = 4: both parts are true, so it is true.

The failure at x=−4x = -4 is a counterexample. It shows that ”x2=16x^2 = 16 if and only if x=4x = 4” cannot be claimed for all real xx, even though it is true at two of the three values. The trap is stopping once you find cases that work. A biconditional offered as a general truth needs every case to match, and one mismatch ends the argument.

A fast mental check: to refute a biconditional, find one case where exactly one side is true. To confirm it, show that no such case exists.

Quick check

Is "7<37 < 3 if and only if 2+2=52 + 2 = 5" true or false?

Biconditional statements in algebra: where equivalence breaks

Solving an equation is a chain of biconditionals. Each step turns an equation into a new one with exactly the same solutions, so the arrow runs both ways. These equivalences are worth knowing by heart:

  • Adding or subtracting the same number: a=b↔a+c=b+ca = b \leftrightarrow a + c = b + c.
  • Multiplying by a nonzero number: a=b↔ac=bca = b \leftrightarrow ac = bc when c≠0c \neq 0.
  • For b>0b > 0, b≠1b \neq 1 and x>0x > 0: log⁡bx=y↔by=x\log_b x = y \leftrightarrow b^y = x (see logarithm rules).
  • A point lies on a line if and only if its coordinates satisfy the equation. The slope-intercept form y=mx+by = mx + b and the point-slope form y−y1=m(x−x1)y - y_1 = m(x - x_1) are two equivalent descriptions of the same line.
  • A 2×22 \times 2 matrix is invertible if and only if its determinant is not 00.
  • A quadratic ax2+bx+c=0ax^2 + bx + c = 0 has two distinct real solutions if and only if b2−4ac>0b^2 - 4ac > 0, which you can practice with quadratic formula problems.

Two moves are only one-way: squaring both sides and multiplying by 00. Squaring gives a=b→a2=b2a = b \to a^2 = b^2, but a2=b2a^2 = b^2 does not give back a=ba = b, since aa could be −b-b. That is how false solutions sneak in.

Solve 2x+3=x\sqrt{2x + 3} = x:

2x+3=x2  ⇒  x2−2x−3=0  ⇒  (x−3)(x+1)=02x + 3 = x^2 \;\Rightarrow\; x^2 - 2x - 3 = 0 \;\Rightarrow\; (x - 3)(x + 1) = 0

So x=3x = 3 or x=−1x = -1. Check each in the original: 9=3\sqrt{9} = 3 works. For x=−1x = -1, 1=1\sqrt{1} = 1, which is not −1-1, so it fails. The answer is x=3x = 3. The squaring step lost the reverse arrow, and the check restores it.

Try this: Start with x=5x = 5 and square both sides to get x2=25x^2 = 25. List every xx that satisfies x2=25x^2 = 25, then say which direction of the arrow between the two equations fails.

How do you prove an if and only if statement?

A proof of ”PP if and only if QQ” has two halves, and each half needs its own argument. Prove P⇒QP \Rightarrow Q, then prove Q⇒PQ \Rightarrow P. Label them so a reader can see both are done. Proving only one direction is half a proof, however convincing it feels.

Prove that an integer nn is odd if and only if n2n^2 is odd.

(⇒\Rightarrow) Suppose nn is odd, so n=2k+1n = 2k + 1 for some integer kk. Then

n2=4k2+4k+1=2(2k2+2k)+1,n^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1,

which has the form 2m+12m + 1, so n2n^2 is odd.

(⇐\Leftarrow) Here the contrapositive is easier: show that if nn is even, then n2n^2 is even. Write n=2kn = 2k. Then n2=4k2=2(2k2)n^2 = 4k^2 = 2(2k^2), which is even. Since ”nn even implies n2n^2 even” is equivalent to ”n2n^2 odd implies nn odd”, the second direction is done.

Both directions hold, so the biconditional is proved. When every step in a derivation is reversible, as with adding cc to both sides, you can instead write one chain of equivalences and skip the two-part structure. Use the two-part method whenever a step, like squaring, runs only one way.

Biconditional statements with sets and Venn diagrams

Set equality is a biconditional in disguise. Two sets are equal if and only if each is a subset of the other:

A=B↔(A⊆B)∧(B⊆A)A = B \leftrightarrow (A \subseteq B) \wedge (B \subseteq A)

Equivalently, x∈Ax \in A if and only if x∈Bx \in B. In a Venn diagram, this is the picture of two circles that coincide exactly. If you need to refresh the symbols, the set notation page covers them.

A neat chain of three equivalent statements appears throughout union and intersection of sets:

A⊆B  ↔  A∩B=A  ↔  A∪B=BA \subseteq B \;\leftrightarrow\; A \cap B = A \;\leftrightarrow\; A \cup B = B

The reason is simple. If every element of AA is in BB, then the intersection keeps all of AA and the union adds nothing to BB. Test it with A={2,4}A = \{2, 4\} and B={1,2,3,4}B = \{1, 2, 3, 4\}. Here A∩B={2,4}=AA \cap B = \{2, 4\} = A and A∪B={1,2,3,4}=BA \cup B = \{1, 2, 3, 4\} = B, as predicted.

This is also a handy way to prove a subset claim: showing A∩B=AA \cap B = A is the same task as showing A⊆BA \subseteq B, and sometimes the equation is easier to verify.

Quick check

If A∩B=AA \cap B = A, what must be true about AA and BB?

What is the negation of a biconditional statement?

The negation of p↔qp \leftrightarrow q is true exactly when pp and qq differ, which is the exclusive or:

¬(p↔q)≡p↔¬q≡(p∨q)∧¬(p∧q)\neg(p \leftrightarrow q) \equiv p \leftrightarrow \neg q \equiv (p \vee q) \wedge \neg(p \wedge q)

For “The light is on if and only if the switch is up”, the negation is “Exactly one of them is true”, or “The light is on if and only if the switch is not up”. The trap is to negate both sides. That changes nothing, because ¬p↔¬q\neg p \leftrightarrow \neg q still asks whether the two parts match, so it is equivalent to p↔qp \leftrightarrow q. Negate one side only.

Chains of biconditionals have a pattern that saves time. (p↔q)↔r(p \leftrightarrow q) \leftrightarrow r is true in exactly the 44 rows where pp, qq, rr contain an even number of false values: none (TTTTTT) or two (TFFTFF, FTFFTF, FFTFFT). In those rows the three pieces agree in the way the formula needs.

Even-falses rule

A chain such as (p↔q)↔r(p \leftrightarrow q) \leftrightarrow r is true exactly when an even number of p,q,rp, q, r are false.

This parity behavior is why XNOR gates appear in error checking and equality tests: they track whether two bits agree.

Practice problems

0 of 5 solved

  1. Write this as a biconditional: "If a whole number is divisible by 55, then its last digit is 00 or 55."

  2. Let pp be true and qq be false. Find the truth values of p↔qp \leftrightarrow q and ¬p↔q\neg p \leftrightarrow q.

  3. Is "x2=49x^2 = 49 if and only if x=7x = 7" true for all real xx? If not, give a counterexample.

  4. How many of the 88 rows in the truth table of (p↔q)↔r(p \leftrightarrow q) \leftrightarrow r are true?

  5. Solve x+6=x\sqrt{x + 6} = x and name the step that is not reversible.

Common questions

What is a biconditional statement in simple terms?

It is a statement of the form "p if and only if q." It claims that p and q are either both true or both false, so each one guarantees the other.

What is the symbol for a biconditional statement?

The symbol is a double-headed arrow, written ↔\leftrightarrow or ⇔\Leftrightarrow. Many texts also abbreviate "if and only if" as "iff."

When is a biconditional statement true?

It is true when both parts have the same truth value, meaning both true or both false. It is false when exactly one part is true.

Is a biconditional the same as a conditional?

No. A conditional p→qp \rightarrow q runs in one direction only. A biconditional claims both p→qp \rightarrow q and its converse q→pq \rightarrow p.

How do you turn a conditional statement into a biconditional?

Write the converse and test it. If both the original and the converse are true, join the hypothesis and conclusion with "if and only if."

Is every definition a biconditional statement?

A good definition is. "A triangle has three sides" works in both directions, so you can state it as "a polygon is a triangle if and only if it has three sides."

Up next