Necessary vs sufficient: “only if” is not “if”
“A only if B” makes B necessary for A: A -> B. “A if B” makes B sufficient for A: B -> A. The two formulas differ on two rows, and the one word “only” is the whole difference.
The table compares A -> B (A only if B) with B -> A (A if B). On the row A = FALSE, B = TRUE the first holds and the second fails: B happened, A did not, so B was not sufficient. On the row A = TRUE, B = FALSE the first fails: A happened without B, so B was not necessary. The equivalence check reports the first row as the counterexample.
A necessary condition is one that must hold for A to hold; it does not guarantee A. A sufficient condition guarantees A; it need not be the only way. “You may vote only if you are registered” makes registration necessary, and registered people may still be unable to vote for other reasons. “You get the discount if you are a member” makes membership sufficient, and there may be other ways to get it. “If and only if” is both, A <-> B.
In requirements, “only if” is the phrase most often written when “if and only if” was meant, and vice versa. The lesson on necessary and sufficient conditions drills the translations with the argument checker, and the comparison of implication and biconditional sets the three formulas on one table.
a_only_if_b := A -> B · outputa_if_b := B -> A · output Truth table
They differ on this row: #1, #2
| # | A | B | a_only_if_b | a_if_b |
|---|---|---|---|---|
| 0 | FALSE | FALSE | TRUE | TRUE |
| 1 | FALSE | TRUE | TRUE | FALSE |
| 2 | TRUE | FALSE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE | TRUE |
Plain-language reading
Beginnera_only_if_b is true exactly when the following holds: if A is true, then B is true.
In every other case, a_only_if_b is false.
About the operators:
- An “if … then” condition only constrains the case where its “if” part holds: when the “if” part is false, the condition is satisfied whatever the “then” part is. It does not say the reverse.
Intermediatea_only_if_b is true exactly when the following holds: if A is true, then B is true.
In every other case, a_only_if_b is false.
Advanceda_only_if_b is true exactly when the following holds: if A is true, then B is true [material implication →].
In every other case, a_only_if_b is false.
Formal notation: A → B
The common slip
Translating “A only if B” as B -> A because B is mentioned second. The arrow points from the condition that is implied by A to nothing else: “A only if B” says A cannot happen without B, so it is A -> B.
Questions
Is “A unless B” a necessary or a sufficient condition?
Neither phrasing: “A unless B” means A holds when B does not, which is NOT B -> A, or in rule form A AND NOT B for the admitted cases. The pitfall page on “unless” has the table.
How do I say that B is necessary and sufficient?
A <-> B, “A if and only if B”. Both directions hold, so the formula is TRUE exactly when A and B agree.
Related
Guides
Worked examples
Tools
- Logical equivalence checker: two expressions, exact verdict, counterexample
- Truth table generator: any Boolean expression, up to 12 variables, with intermediate columns
Practice
See also
- Implication (→, if–then): truth table and why a false antecedent makes it true
- Biconditional (↔, if and only if): truth table and examples
- A → B does not give B → A
- “Unless” in a rule: AND NOT, not OR
- Lesson 5: If, only if, unless: necessary and sufficient conditions (intermediate, 15 min)
- Implication vs biconditional
- The converse slip: A → B is not B → A
Pitfalls
Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.