Skip to content
latexci
PreviewDiffWord → LaTeXBibTeXSymbolsTableTemplatesAcademics
Sign inFree
PreviewDiffWord → LaTeXBibTeXSymbolsTableTemplatesAcademicsFree
Discord community ↗GitHub ↗
Sign in
LaTeX symbols›Arrows›If and only if

If and only if in LaTeX

The LaTeX command for iff (⟺) is \iff (if and only if (wide)).

  ⟺  \iff⟺
\iff
Arrows · Unicode ⟺ (U+27FA) · no package needed

Writing a paper? The table generator and the BibTeX cleaner are one click away, no account.

Which command should you use?

CommandPackageUse it when
\iff recommendednone"If and only if": a long double arrow with extra space on both sides. Built into LaTeX.
\Leftrightarrow noneShorter double arrow, common inside formulas.
\Longleftrightarrow noneSame arrow as \iff, without the added spacing.
\text{iff} amsmathThe abbreviation spelled out.
Table 1. Ways to write iff in LaTeX. Every line was compiled with pdfLaTeX (TeX Live 2026) loading only the package shown.
Common mistake. \iff needs no package: it is defined in LaTeX itself as \;\Longleftrightarrow\;, which is why it looks wider than \Longleftrightarrow.

How to type If and only if

Write \iff inside math mode, that is between $…$ for inline math or in a \[ … \] or equation block for display math. It is part of core LaTeX math, so no extra package is required.

Example
$x^2 = 1 \iff x = \pm 1$x2=1  ⟺  x=±1x^2 = 1 \iff x = \pm 1x2=1⟺x=±1

Open this example in the live preview: it renders as you type, with no compiler and no signup.

Often confused with

  • Double left-right arrow \Leftrightarrow (⇔): if and only if
  • Implies \implies (⟹): implies (wide)
  • Implies arrow \Rightarrow (⇒): implies

Related Arrows symbols

→\to←\leftarrow→\rightarrow↔\leftrightarrow⇐\Leftarrow⇒\Rightarrow⇔\Leftrightarrow⟹\implies↑\uparrow↓\downarrow↕\updownarrow↗\nearrow↘\searrow↙\swarrow

Arrows in LaTeX: the full table or search all 350+ LaTeX symbols.

FAQ

How do you write iff (⟺) in LaTeX?

Use \iff in math mode; it needs no extra package. For example, $x^2 = 1 \iff x = \pm 1$.

Which package provides \iff?

None: \iff is built into LaTeX, so no extra package is required.

What is the most common mistake with iff in LaTeX?

\iff needs no package: it is defined in LaTeX itself as \;\Longleftrightarrow\;, which is why it looks wider than \Longleftrightarrow.

latexci

Free LaTeX tools for researchers and students, in any browser. No paid plan, no advertising.

Star on GitHubBuy me a coffee

Tools

Live PreviewBibTeX ToolsDOI → BibTeXarXiv → BibTeXPubMed → BibTeXISBN → BibTeXLaTeX DiffWord → LaTeXSymbol SearchTable GeneratorTemplatesCV Generator

Learn

Academics hubLife after OverleafFreeGitHub

Community

DiscordGitHub IssuesFeature Requests

© 2026 latexci. By Sitraka Forler, sitraka.lu

PrivacyTerms