LatexNotes

If and only if (⟺) in LaTeX

\iff prints ⟺, the long double arrow read 'if and only if': the statements on either side are equivalent, each implying the other.

Main page: Implies (⇒) and iff (⇔) in LaTeX →

LaTeX command

\iff

Not the symbol you meant? Draw it to find the command →

Typing up handwritten notes? Convert a whole page of handwriting to LaTeX →

\iff is \Longleftrightarrow with a thick space added on each side, which is why it stands apart from the statements it joins. That is what you want between two whole statements, as in . Inside a tighter formula, or in a list of symbols, the bare arrows \Longleftrightarrow (⟺) and the shorter \Leftrightarrow (⇔) carry the same meaning without the extra space.

Logic courses often write the biconditional connective with the single-line arrow \leftrightarrow, as in , and keep the double arrows for statements about formulas. Follow your course or textbook: all of these arrows are read 'if and only if'.

In definitions and proofs many writers spell it out as 'iff' or 'if and only if'. Inside maths mode, write \text{ iff } so the word is upright and keeps its spaces, or \quad\text{iff}\quad for a wider gap.

Other forms

\Leftrightarrowthe shorter double arrow (⇔)
\Longleftrightarrowthe long arrow without the extra space (⟺)
\leftrightarrowsingle-line arrow (↔), the biconditional in logic
\text{ iff }the word, inside maths

Examples

$x^2 = 1 \iff x = \pm 1$

two equivalent statements

$A \subseteq B \iff A \cap B = A$

an equivalence between set statements

$P \leftrightarrow Q$

the biconditional connective in logic

$a \mid b \text{ iff } b = ka \text{ for some } k \in \mathbb{Z}$

iff as a word in a definition

$(P \Rightarrow Q) \land (Q \Rightarrow P) \iff (P \Leftrightarrow Q)$

the shorter arrow inside a formula, \iff between the halves

Tips and common mistakes

Working from handwritten notes?

LatexNotes turns a photo or PDF of handwritten mathematics into LaTeX, graphs and all. It is built with real pdflatex before you see it, and the .tex file is yours to edit or take to Overleaf. Free to try, no sign-up.

See how handwriting to LaTeX works, step by step, or go from GoodNotes to LaTeX if you write on an iPad (Notability works the same way).

Convert your maths to LaTeX →

FAQ

How do I write if and only if in LaTeX?

Use \iff in maths mode, which prints ⟺ with a space on each side. \Leftrightarrow prints the shorter ⇔.

What is the difference between \iff and \Longleftrightarrow?

They print the same long double arrow. \iff adds a thick space on each side for joining whole statements; \Longleftrightarrow adds none.

Which arrow is the biconditional in logic?

Many logic texts write the connective as \leftrightarrow (↔) and use ⟺ or ⇔ for equivalence between formulas. Use whichever your course uses.

Does \iff need a package?

No. It is part of core LaTeX and is also supported by KaTeX.

See also