If and only if

related topics
{math, number, function}
{food, make, wine}
{theory, work, human}
{language, word, form}
{style, bgcolor, rowspan}
{law, state, case}

↔ ⇔ ≡

In logic and related fields such as mathematics and philosophy, if and only if (shortened iff) is a biconditional logical connective between statements. In that it is biconditional, the connective can be likened to the standard material conditional ("only if," equal to "if ... then") combined with its reverse ("if"); hence the name. The result is that the truth of either one of the connected statements requires the truth of the other, i.e., either both statements are true, or both are false. It is controversial whether the connective thus defined is properly rendered by the English "if and only if", with its pre-existing meaning. Of course, there is nothing to stop us stipulating that we may read this connective as "only if and if", although this may lead to confusion.

In writing, phrases commonly used, with debatable propriety, as alternatives to "if and only if" include Q is necessary and sufficient for P, P is equivalent (or materially equivalent) to Q (compare material implication), P precisely if Q, P precisely (or exactly) when Q, P exactly in case Q, and P just in case Q. Many authors regard "iff" as unsuitable in formal writing; others use it freely.[citation needed]

In logic formulae, logical symbols are used instead of these phrases; see the discussion of notation.



The truth table of p ↔ q is as follows:[1]

Note that it is equivalent to that produced by the XNOR gate, and opposite to that produced by the XOR gate.

Full article ▸

related documents
Chomsky hierarchy
Local field
Hahn–Banach theorem
Zorn's lemma
Arithmetic shift
Real analysis
Mathematical singularity
Linear cryptanalysis
Group isomorphism
Dual number
Arithmetic function
Intermediate value theorem
Tree (graph theory)
Five lemma
Mathematical analysis
Pointless topology
Quotient group
Dedekind cut
Robert Langlands
Referential transparency (computer science)
Lagrange inversion theorem