Knowledge base dedicated to Linux and applied mathematics.
Home > Latex > FAQ > Latex - FAQ > Latex symbol if and only if / equivalence
All the versions of this article: <English> <français>
How to write if and only if symbol / equivalence in Latex ? In mathematics, if and only if (iff) is a biconditional logical connective between statements, where either both statements are true or both are false.
You do not have to use any package:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\begin{document}
\noindent
A $\Leftrightarrow$ B \\
C $\Longleftrightarrow$ D
\end{document}
For a short if and only if, use \Leftrightarrow:
A $\Leftrightarrow$ B
For a long if and only if, use \Longleftrightarrow:
C $\Longleftrightarrow$ D
If you want to see all type of Latex arrows, have a look to https://www.math-linux.com/latex-26/faq/latex-faq/article/latex-arrows