Right arrow (→) in LaTeX
\rightarrow (or its alias \to) typesets a rightward arrow →, used for functions, limits, sequences and mappings.
LaTeX command
\rightarrowNot the symbol you meant? Draw it to find the command →
The rightward arrow shows up in several distinct mathematical roles. In function notation, f : declares that f maps elements of A to elements of B. In limits, or describes a variable approaching a value. In sequences and processes, it can show one state evolving into the next.
\to is simply a shorter alias for \rightarrow, producing an identical glyph; most authors use \to in running text and limits for brevity, and \rightarrow when spelling things out feels clearer, such as in a labelled diagram. Neither is more correct than the other.
For showing exactly where an element goes under a function, use \mapsto instead of \rightarrow: reads 'x maps to x squared', pairing naturally with the function declaration f : \mathbb{R} \to \mathbb{R},\ . Reserve \rightarrow for the domain-to-codomain statement and \mapsto for the specific rule.
Other forms
\toalias, common in limits\leftarrowleft (←)\leftrightarrowboth ways (↔)\mapstomaps to (↦)Examples
$f : A \to B$a function from A to B
$x \mapsto x^2$the squaring map, paired with \mapsto not \to
$\lim_{x \to \infty} \frac{1}{x} = 0$x approaching infinity in a limit
$n \to \infty$a sequence index tending to infinity
$f : \mathbb{R} \to \mathbb{R}, \quad x \mapsto x^2$a full function declaration combining \to and \mapsto
Tips and common mistakes
- Use
\to(shorthand) or\rightarrow(full name) interchangeably, they produce the same arrow; pick one convention and keep it consistent within a document. - Use
\rightarrowfor the domain-to-codomain statement, f : , and\mapstofor the explicit rule on elements, (x); mixing them up is a very common notational slip. - In limits, always attach the arrow to the variable and its target directly under
\lim:\lim_{x \to a}f(x), not as separate floating symbols. - Do not use
\rightarrowfor logical implication, use\impliesor\Rightarrowinstead; the plain arrow is reserved for functions, limits and mappings in most conventions. - For a longer, more visually prominent arrow, for instance over a long label or in a commutative diagram, use
\longrightarrowinstead.
Working from handwritten notes?
LatexNotes turns a photo or PDF of handwritten mathematics into clean, compilable LaTeX - graphs and all. Free to try, no sign-up.
Convert your maths to LaTeX →FAQ
What is the difference between \to and \rightarrow?
None visually or semantically, \to is simply a shorter alias for \rightarrow, and both produce the identical → glyph. \to is more common in limits and inline text purely because it is quicker to type.
What is the difference between \to and \mapsto?
\to connects a domain and codomain, as in f : , describing where a function's inputs and outputs live in general. \mapsto shows the specific rule applied to an individual element, as in , showing exactly what happens to x.
How do I write a limit with an arrow in LaTeX?
Use \lim_{x \to a} f(x), placing the variable and its target inside the subscript of \lim, connected by \to.
How do I get a longer arrow?
Use \longrightarrow instead of \rightarrow; it produces a stretched-out version of the same arrow, useful for labelled arrows or commutative diagrams.