The LaTeX command for to (→) is \to (right arrow).
\toWriting a paper? The table generator and the BibTeX cleaner are one click away, no account.
| Command | Package | Use it when |
|---|---|---|
\to recommended | none | Limits and function signatures. |
\rightarrow | none | The same arrow, longer name. |
\mapsto | none | Where an element goes: x maps to x squared. |
\longrightarrow | none | A longer arrow. |
\xrightarrow{f} | amsmath | An arrow with a label that stretches to fit. |
Write \to 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.
$f\colon A \to B, \quad x \mapsto x^2$Open this example in the live preview: it renders as you type, with no compiler and no signup.
\rightarrow (→)\mapsto (↦): maps to\circlearrowleft\circlearrowright\xrightarrow{f}\xleftarrow{f}\longrightarrow\longleftarrow\Longrightarrow\leftarrow\rightarrow\leftrightarrow\Leftarrow\Rightarrow\Leftrightarrow\iffArrows in LaTeX: the full table or search all 350+ LaTeX symbols.
Use \to in math mode; it needs no extra package. For example, $f\colon A \to B, \quad x \mapsto x^2$.
None: \to is built into LaTeX, so no extra package is required.
-> typed in a formula prints a minus sign and a greater-than sign.