The equals sign dates to 1557; plus and minus go back to the fifteenth century. The arrow — today the most conspicuous symbol in mathematics — only came into general use in the twentieth century. And almost as soon as it arrived, it took over: in category theory the arrows between objects matter more than the objects themselves. This page walks through the roughly forty arrows LaTeX can set, organised around a single idea — the shape of an arrow tells you what it means. Most of the time, the picture makes the choice for you.
Arrows live in math mode
To TeX an arrow is not a picture but a relation, and relations carry a fixed amount of space on either side. That is why writing \to in ordinary text is an error rather than merely ugly: outside math mode the spacing rule simply does not exist. Put it in math mode first, as in $f\colon A \to B$. The naming scheme is relentlessly mechanical — a direction (left, right, up, down) combined with a shape. Capitalise the initial and you get the double-shafted form (\Rightarrow ⇒); prefix long and you get the long one (\longrightarrow ⟶). You can construct the names rather than memorise them.
% a map, and a chain of implications
\[
P \implies Q, \qquad x \to 0, \qquad a_n \to L \;(n \to \infty)
\]Two aliases here are worth knowing the origin of, because then you never forget them. \to is an alias for \rightarrow and \gets for \leftarrow — but the name \gets comes from computer science, not mathematics. x \gets 1 reads “x gets 1”, that is, assignment. Knuth, who wrote TeX, also wrote The Art of Computer Programming, and he carried the vocabulary of algorithms straight into his typesetting system. The second is \iff (⟺). The abbreviation “iff” for “if and only if” was popularised by the mathematician Paul Halmos, who also gave mathematics the hollow square ∎ that closes a proof — still called the Halmos symbol. In practice: the short \to and \gets for maps and limits, and \iff for statements of equivalence.
Horizontal arrows: what the second shaft is for
Horizontal arrows come in a single-shafted family (\leftarrow, \rightarrow, \leftrightarrow) and a double-shafted one (\Leftarrow, \Rightarrow, \Leftrightarrow), each with a long variant. The distinction is not decorative. By a convention readers share, the single shaft → carries mappings between sets or objects, while the double shaft ⇒ carries implication between propositions. So when “f: A → B” and “P ⇒ Q” sit on the same page, the number of strokes alone tells the reader these are statements at different levels. The long forms have a fixed length; they are not the extensible arrows at the end of this page.
| Command | Glyph | Meaning / use |
|---|---|---|
\leftarrow | ← | leftward arrow (same as \gets) |
\gets | ← | alias for \leftarrow; “is assigned” |
\rightarrow | → | rightward arrow (same as \to); maps, etc. |
\to | → | alias for \rightarrow; f\colon A \to B |
\leftrightarrow | ↔ | left-right arrow |
\longleftarrow | ⟵ | long leftward arrow |
\longrightarrow | ⟶ | long rightward arrow |
\longleftrightarrow | ⟷ | long left-right arrow |
\Leftarrow | ⇐ | double-line leftward arrow |
\Rightarrow | ⇒ | double-line rightward arrow; implies |
\Leftrightarrow | ⇔ | double-line left-right arrow; equivalence |
\Longleftarrow | ⟸ | long double-line leftward arrow |
\Longrightarrow | ⟹ | long double-line rightward arrow |
\Longleftrightarrow | ⟺ | long double-line left-right arrow |
\iff | ⟺ | if and only if; \Longleftrightarrow with extra space |
For prose-heavy logic, amsmath adds \implies (⟹) and \impliedby (⟸), which round out the set. They are \Longrightarrow and \Longleftarrow with extra space on both sides — the same spacing \iff uses. Writing a chain as “P \implies Q \iff R” lets the symbols breathe, and that space works like punctuation: even a long formula shows you where to pause. A row of tight \Rightarrow symbols, by contrast, tends to clot.
When the shape is the definition: maps and hooks
From here the arrows become vocabulary. \mapsto (↦) has a vertical bar at its tail and means not “from set A to set B” but “this element goes to that one”. Writing x \mapsto x^2 alongside f\colon \mathbb{R} \to \mathbb{R} separates the map itself from the correspondence of elements within a single line. The notation spread through the works of the collective Bourbaki. The hook on \hookrightarrow (↪) suggests catching hold of something, and it conventionally marks an inclusion — a subset embedded, unchanged, in a larger set. Both are standard LaTeX and need no package.
| Command | Glyph | Meaning / use |
|---|---|---|
\mapsto | ↦ | element maps to; “x ↦ …” |
\longmapsto | ⟼ | long maps-to arrow |
\hookleftarrow | ↩ | left arrow with hook |
\hookrightarrow | ↪ | right arrow with hook; inclusion / injection |
\[
f\colon \mathbb{R} \to \mathbb{R}, \quad x \mapsto x^2,
\qquad \mathbb{Z} \hookrightarrow \mathbb{Q}
\]When you want to state injectivity or surjectivity outright, the shapes become most eloquent. In amssymb, \rightarrowtail (↣) grows a tail at its base and \twoheadrightarrow (↠) doubles its head. The tail reads as “each to its own target” — injective — and the doubled head as “covering everything on the far side” — surjective; an arrow bearing both, ⤖, denotes a bijection. Break an arrow into its three parts (tail, shaft, head) and you can read its meaning straight off the page. The convention is context-dependent, though, so in a paper it is safest to define the symbol once at first use. Do not press \mapsto into service for inclusions, and do not confuse \hookrightarrow with \rightarrowtail.
Vertical and diagonal: the scaffolding of diagrams
Vertical and diagonal arrows come into their own in commutative diagrams. Such diagrams entered serious use in 1945, in the paper where Samuel Eilenberg and Saunders Mac Lane founded category theory, and they established a way of writing mathematics in which objects are vertices and maps are edges. The vertical family is \uparrow, \downarrow, \updownarrow with double-shafted \Uparrow, \Downarrow, \Updownarrow. The four diagonals are \nearrow (↗), \searrow (↘), \swarrow (↙) and \nwarrow (↖) — the names are simply the compass bearings north-east, south-east, south-west and north-west. In analysis, ↗ and ↘ also mark increasing and decreasing convergence. Note that \uparrow and its relatives double as delimiters for \left … \right.
| Command | Glyph | Meaning / use |
|---|---|---|
\uparrow | ↑ | upward arrow |
\downarrow | ↓ | downward arrow |
\updownarrow | ↕ | up-down arrow |
\Uparrow | ⇑ | double-line upward arrow |
\Downarrow | ⇓ | double-line downward arrow |
\Updownarrow | ⇕ | double-line up-down arrow |
\nearrow | ↗ | northeast arrow |
\searrow | ↘ | southeast arrow |
\swarrow | ↙ | southwest arrow |
\nwarrow | ↖ | northwest arrow |
Harpoons and amssymb: what a half-barbed arrow says
A harpoon is an arrow barbed on one side only. Combining an upper and a lower barb, \rightleftharpoons (⇌) is the standard symbol for a reversible reaction or equilibrium in chemistry. The half-barbing is itself the meaning: the two arrows depict the forward and reverse reactions as separate processes, which is not the same as the fully barbed ⇄. If you are setting chemistry seriously, the mhchem package lets you write \ce{A <=> B} and handles coefficients and state symbols for you. Harpoons also turn up in physics, for instance in notation around angular momentum.
| Command | Glyph | Notes |
|---|---|---|
\rightharpoonup | ⇀ | rightward, barb up (standard) |
\rightharpoondown | ⇁ | rightward, barb down (standard) |
\leftharpoonup | ↼ | leftward, barb up (standard) |
\leftharpoondown | ↽ | leftward, barb down (standard) |
\rightleftharpoons | ⇌ | reversible-reaction arrow (standard) |
The decorative arrows — doubled heads, tails, dashes — are not part of standard LaTeX and require \usepackage{amssymb}. The package belongs to a set of fonts and macros produced by the American Mathematical Society to supply symbols that working mathematicians found missing from the math fonts Knuth originally designed. Which is to say: every arrow in the table below exists because someone needed it in a paper.
| Command | Glyph | Meaning / use (amssymb) |
|---|---|---|
\twoheadrightarrow | ↠ | two-headed right arrow; surjection |
\twoheadleftarrow | ↞ | two-headed left arrow |
\rightarrowtail | ↣ | right arrow with tail; injection |
\leftarrowtail | ↢ | left arrow with tail |
\rightrightarrows | ⇉ | two right arrows side by side |
\leftleftarrows | ⇇ | two left arrows side by side |
\rightleftarrows | ⇄ | right-over-left paired arrows |
\rightsquigarrow | ⇝ | squiggly right arrow |
\leftrightsquigarrow | ↭ | squiggly left-right arrow |
\curvearrowright | ↷ | clockwise curved arrow |
\nrightarrow | ↛ | negated (slashed) right arrow |
\nRightarrow | ⇏ | negated double-line right arrow |
Arrows that stretch to fit a label
Every arrow so far has had a fixed length. amsmath provides \xrightarrow{…} and \xleftarrow{…}, whose shaft itself stretches to match the label set above it. Use them when a map deserves a name — A \xrightarrow{\ f\ } B — or when an edge of an exact sequence or commutative diagram needs a condition written on it. The older idiom of stacking text on a fixed-length \longrightarrow with \stackrel still works, but the text overhangs the arrow as soon as it is wider, so the extensible forms are the straightforward choice today.
\usepackage{amsmath} % \xrightarrow, \xleftarrow
% \usepackage{mathtools} % also \xLeftarrow, \xhookrightarrow, \xmapsto
\[
A \xrightarrow{\;f\;} B \xrightarrow{\;g\;} C,
\qquad x \xrightarrow[n\to\infty]{} L
\]Adding the optional argument in square brackets puts a second label below the arrow. Writing \xrightarrow[n \to \infty]{\ a_n\ } places the name of the map above and the condition below, so a statement about a limit or a convergence fits onto a single arrow. Once you are building a full diagram, a dedicated package such as tikz-cd ends up faster, so the practical division is: \xrightarrow when you need one arrow inline, tikz-cd when you are drawing the diagram itself.
In summary, the decision has roughly three steps. For maps and relations, standard LaTeX suffices (\to, \mapsto, \hookrightarrow, \Rightarrow). When the shape itself must carry meaning — injective, surjective, equilibrium — reach for amssymb. When the arrow must carry a label and stretch, use the \xrightarrow family from amsmath. And once you are drawing the diagram itself, move to tikz-cd. Choosing an arrow is also a way of telling the reader, without saying so, which level of the argument they are on.