latex symbol for "if and only if"
LaTeX defines \to
as \rightarrow
:
\let\to\rightarrow % fontmath.ltx
The other direction is \gets
:
\let\gets\leftarrow
For \leftrightarrow
you can define your own command, e.g. \biconditional
:
\documentclass{article}
\let\biconditional\leftrightarrow
\begin{document}
\[ A \to B \biconditional C \gets D \]
\[ A \rightarrow B \leftrightarrow C \leftarrow D \]
\[ A \longrightarrow B \longleftrightarrow C \longleftarrow D \]
\[ A \Rightarrow B \Leftrightarrow C \Leftarrow D \]
\[ A \Longrightarrow B \Longleftrightarrow C \Longleftarrow D \]
\[ B \iff C \]
\end{document}
Remarks:
\iff
adds some extra space (fromfontmath.ltx
):\DeclareRobustCommand\iff{\;\Longleftrightarrow\;}
The example also shows some other arrow variants.
You can use \Leftrightarrow
or \Longleftrightarrow
\documentclass{article}
\begin{document}
$ \Leftrightarrow \Longleftrightarrow $
\end{document}
You might want to also bookmark this: https://oeis.org/wiki/List_of_LaTeX_mathematical_symbols
Double line:
\iff
(=\Leftrightarrow
) or\longLeftrightarrow
or\xLeftrightarrow
(extensible, load themathtools
package)
Single line:
\leftrightarrow
or\longleftrightarrow
or\xleftrightarrow
(extensible, load themathtools
package)