\iff if and only if (⟺) in LaTeX
| Command | \iff |
|---|---|
| Mode | math |
| Package | none, part of LaTeX |
| Unicode | ⟺ U+27FA |
| Kind | Arrows |
| Also called | equivalent |
\iff typesets the symbol “if and only if” (⟺). It is an arrow.
Try it
Open this formula in the editor The preview is drawn in your browser by KaTeX, which knows the common math commands. The editor compiles the formula with pdfTeX.
Example
\documentclass{article}
\begin{document}
\( A \iff B \)
\end{document}Compiled with pdfLaTeX from TeX Live 2023.
How to use it
\iff works only in math mode. In running text, put it between $...$ or \(...\). Outside math mode LaTeX stops with Missing $ inserted. The command is part of LaTeX; you need no package.
About arrows
Arrow names are built from parts: left, right, up or down for the direction, a capital first letter for a double line, and long for a longer shaft. Arrows are spaced like relation symbols. An arrow with text above it is \xrightarrow{text} from amsmath.