LatexNotes

Long arrows (⟶ ⟹) in LaTeX

\longrightarrow and \Longrightarrow draw elongated single and double arrows (⟶ and ⟹), the extended versions of \rightarrow and \Rightarrow, used when a standard arrow reads too cramped, such as under a label or inside a diagram.

LaTeX command

\longrightarrow

Not the symbol you meant? Draw it to find the command →

The meaning is identical to the shorter \to / \rightarrow and \Rightarrow, the extra length is purely visual, giving room for text placed above or below the arrow, or for lining several arrows up in a sequence of steps or a commutative diagram.

The amsmath command \xrightarrow{text} builds a properly centred, automatically stretching labelled arrow, for instance in a reaction scheme or a chain of implications with an intermediate justification, and is generally preferable to manually stacking text over a bare \longrightarrow.

\longmapsto is the long form of \mapsto, useful when defining a function and wanting extra breathing room between the input and output expressions, , particularly when either side is itself a longer expression.

Other forms

\longmapstolong maps-to (⟼)
\Longrightarrowlong double (⟹)

Examples

$A \longrightarrow B$

a long single arrow

$x \xrightarrow{f} y$

a long arrow labelled with a function name

$P \Longrightarrow Q$

a long double-line implication arrow

$x \longmapsto x^2$

a long maps-to arrow defining a function

Tips and common mistakes

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's the difference between \rightarrow and \longrightarrow?

They mean the same thing; \longrightarrow simply draws a longer arrow, useful for fitting a label above it or for visual spacing in a diagram.

How do I put text above an arrow in LaTeX?

Use \xrightarrow{\text{label}} (from amsmath), which stretches the arrow automatically to fit the label.

What is \longmapsto used for?

A long 'maps to' arrow, typically when defining a function, e.g. , chosen over \mapsto when extra spacing is wanted.

Does \Longrightarrow mean something different from \Rightarrow?

No, both mean logical implication; \Longrightarrow is only the longer-drawn version of the same symbol.

See also