Lowercase arrow commands give single-line arrows for limits, functions and sequences. Capitalised commands give double-line arrows for logical implication. \to and \gets are short aliases for the two most common. amsmath adds the extensible \xrightarrow for labelled arrows.
All ways to write it
| Command | Use | Package | Copy |
|---|---|---|---|
\rightarrow | → (also \to) | none | |
\leftarrow | ← (also \gets) | none | |
\leftrightarrow | ↔ | none | |
\Rightarrow | ⇒ implies | none | |
\Leftarrow | ⇐ | none | |
\Leftrightarrow | ⇔ if and only if | none | |
\mapsto | ↦ maps to | none | |
\longrightarrow | ⟶ long form | none | |
\implies | ⟹ with spacing | amsmath | |
\iff | ⟺ with spacing | amsmath | |
\uparrow | ↑ | none | |
\downarrow | ↓ | none | |
\nearrow | ↗ | none | |
\hookrightarrow | ↪ injection | none | |
\twoheadrightarrow | ↠ surjection | amssymb | |
\xrightarrow{f} | labelled arrow | amsmath |
Commands marked with a package need that \usepackage line in a LaTeX document.
Example
f\colon A \to B, \quad x \mapsto x^2, \qquad \lim_{n \to \infty} a_n = LA function declaration, a mapping rule and a limit.
Questions
What is the difference between \rightarrow, \to and \implies?
\to is identical to \rightarrow. \implies is a double arrow with extra space on each side, meant for logical implication between statements.
How do I put text on an arrow?
\xrightarrow{\text{label}} from amsmath. \xleftarrow exists too, and both take an optional lower label in square brackets.
Related symbols
- Implies ⟹
\implies - Limit lim
\lim_{x \to a} f(x) - Infinity ∞
\infty
Using arrows in Confluence
Confluence Cloud has no built-in LaTeX. With LaTeX Math for Confluence you add a math macro to any page, type \rightarrow and it renders inline or as a block, with a live preview while you edit. Every command on this page renders there without extra packages.