LaTeX Arrow Commands: 60+ Arrows and Text Over Arrows
November 11, 2026 · 11 min read
LaTeX Arrow Commands: 60+ Arrows, Plus Text Over Arrows
A LaTeX arrow is a math-mode command such as \rightarrow, \Rightarrow or \xrightarrow{f}. The tables below cover right, left, double, vertical, vector and amssymb arrows, with the package each one needs and whether KaTeX renders it. You'll also see how to put text over and under an arrow.
Basic LaTeX Arrow Commands: Right, Left and Both Ways
Every command in this table works in math mode without loading a package, and KaTeX renders all of them. Type them inside $...$ in a .tex file or in Markdown math.
| Command | Output | Package | KaTeX |
|---|---|---|---|
\rightarrow | none | Yes | |
\to | none | Yes | |
\leftarrow | none | Yes | |
\gets | none | Yes | |
\leftrightarrow | none | Yes | |
\longrightarrow | none | Yes | |
\longleftarrow | none | Yes | |
\longleftrightarrow | none | Yes | |
\mapsto | none | Yes | |
\longmapsto | none | Yes | |
\hookrightarrow | none | Yes | |
\hookleftarrow | none | Yes |
\to and \rightarrow print the same glyph, because the LaTeX kernel maps both names to the same character. \gets is the matching alias for \leftarrow. Use \to in limits such as \lim_{x \to 0}, where it reads as "tends to".
For a long arrow in LaTeX, add long to the name. The kernel builds \longrightarrow by joining an extra bar to \rightarrow, so it's the same right arrow with a longer shaft.
How Do You Write a Double Arrow in LaTeX?
A LaTeX double arrow starts with a capital letter. \Rightarrow gives the double-line arrow, while \rightarrow gives the single one. The long forms and \iff are built into the kernel, but \implies and \impliedby need \usepackage{amsmath}.
| Command | Output | Package | KaTeX |
|---|---|---|---|
\Rightarrow | none | Yes | |
\Leftarrow | none | Yes | |
\Leftrightarrow | none | Yes | |
\Longrightarrow | none | Yes | |
\Longleftarrow | none | Yes | |
\Longleftrightarrow | none | Yes | |
\implies | amsmath | Yes | |
\impliedby | amsmath | Yes | |
\iff | none | Yes |
When to Use the Implies Arrow Instead of Rightarrow
The implies arrow in LaTeX isn't just a longer \Rightarrow. amsmath defines \implies as \Longrightarrow with a thick space on each side, and the kernel's \iff does the same with \Longleftrightarrow.
$p \Rightarrow q$ % short arrow, normal spacing
$p \implies q$ % long arrow, wider gaps on both sides
The first line renders as , the second as . We use \implies between whole statements and \Rightarrow everywhere else, such as inside subscripts, where the extra space looks loose. Quantifiers and the other logic commands are in our LaTeX symbols reference.
Up, Down and Diagonal Arrows
A down arrow in LaTeX is \downarrow, and \Downarrow is its double form. All ten commands here are base LaTeX, and KaTeX renders every one.
| Command | Output | Command | Output |
|---|---|---|---|
\uparrow | \Uparrow | ||
\downarrow | \Downarrow | ||
\updownarrow | \Updownarrow | ||
\nearrow | \searrow | ||
\swarrow | \nwarrow |
The vertical arrows are also delimiters, so size commands like \big and \Big work on them. That's handy for a step-by-step derivation set in a one-column array:
$$
\begin{array}{c}
x^2 - 4 = 0 \\
\Big\downarrow \\
x = \pm 2
\end{array}
$$
This renders the equation, a tall down arrow centred beneath it, and the result on the third row.
How Do You Put Text Over an Arrow in LaTeX?
A LaTeX arrow with text over it is an extensible arrow. \xrightarrow{f} puts f above the arrow and stretches the shaft to fit the label. An optional square-bracket argument adds text below, as described in the amsmath user's guide.
$A \xrightarrow{f} B$
$A \xrightarrow[\text{below}]{\text{above}} B$
The first line renders as . The second puts "above" over the arrow and "below" under it. Wrap words in \text so the label sets upright instead of in italic math letters. Our guide to text inside an equation explains how \text handles spaces and fonts.
amsmath only defines \xrightarrow and \xleftarrow. For a double arrow with text, a hooked arrow or a mapping arrow, load mathtools, which follows the same naming scheme:
| Command | Output | Package | KaTeX |
|---|---|---|---|
\xrightarrow | amsmath | Yes | |
\xleftarrow | amsmath | Yes | |
\xRightarrow | mathtools | Yes | |
\xLeftarrow | mathtools | Yes | |
\xleftrightarrow | mathtools | Yes | |
\xLeftrightarrow | mathtools | Yes | |
\xhookrightarrow | mathtools | Yes | |
\xmapsto | mathtools | Yes | |
\xrightleftharpoons | mathtools | Yes | |
\xlongequal | extarrows | Yes |
Every command in this table takes the same optional below argument. KaTeX supports them all without any setup.
Text on a Fixed-Length Arrow
\overset and \stackrel put a label on an ordinary arrow that doesn't stretch. \underset puts it below. \stackrel is base LaTeX, while \overset and \underset come from amsmath.
$A \overset{f}{\rightarrow} B$
$A \stackrel{f}{\rightarrow} B$
$A \underset{g}{\rightarrow} B$
These render as , and . The catch: a long label hangs past the arrow's ends. Use the x-arrows for anything longer than a letter or two. To build and preview a labelled arrow, then export it as PNG or SVG, try the LaTeX equation editor.
Vector Arrows and Arrows Over Letters
A vector arrow in LaTeX is \vec{v}, a small accent sized for one letter. For an arrow over several letters, such as a segment AB, use \overrightarrow, which stretches to cover its argument. \vec{AB} looks wrong because the accent stays short. The demo further down renders \vec{AB} next to \overrightarrow{AB} so you can compare them.
| Command | What it draws | Package | KaTeX |
|---|---|---|---|
\vec{v} | Short arrow accent over one letter | none | Yes |
\overrightarrow{AB} | Right arrow stretched over the argument | none | Yes |
\overleftarrow{AB} | Left arrow stretched over the argument | none | Yes |
\overleftrightarrow{AB} | Two-headed arrow over the argument | amsmath | Yes |
\underrightarrow{AB} | Right arrow under the argument | amsmath | Yes |
\underleftarrow{AB} | Left arrow under the argument | amsmath | Yes |
\underleftrightarrow{AB} | Two-headed arrow under the argument | amsmath | Yes |
\Overrightarrow{AB} | Double-line arrow over the argument | overrightarrow | Yes |
\Overrightarrow draws a double arrow over its argument. KaTeX has it built in, but base LaTeX, amsmath and mathtools don't define it. In a .tex file it needs the little-known overrightarrow package from CTAN, so check your setup has that package before you rely on it.
Dashed, Squiggly and Curved Arrows from amssymb
Load \usepackage{amssymb} for the arrows below. Two exceptions: \leadsto also comes from latexsym, and the two harpoons in the last row are base LaTeX. KaTeX renders every one.
| Command | Output | Command | Output |
|---|---|---|---|
\dashrightarrow | \dashleftarrow | ||
\rightsquigarrow | \leadsto | ||
\curvearrowright | \curvearrowleft | ||
\circlearrowright | \circlearrowleft | ||
\twoheadrightarrow | \rightarrowtail | ||
\rightleftarrows | \rightrightarrows | ||
\nrightarrow | \nRightarrow | ||
\rightharpoonup | \rightleftharpoons |
Looking for a dotted arrow? Neither base LaTeX nor amssymb has one. \dashrightarrow is the closest standard symbol. The dotarrow package on CTAN adds an extensible dotted arrow, \dotarrow, and TikZ can draw any dotted line you want. KaTeX supports neither. Likewise, \curvearrowright and \circlearrowright are fixed glyphs, not curves you can bend between two points.
Which LaTeX Arrows Work in KaTeX and Markdown?
All of them in the tables above. KaTeX has every arrow listed here built in, so you never write a \usepackage line. In fact, KaTeX's supported functions list doesn't include \usepackage at all, and it has no TikZ, tikz-cd or \draw either.
For a simple commutative diagram, KaTeX supports the CD environment, using the same syntax as the amscd package. Each arrow is an @ code: @>>> points right, @<<< left, @VVV down and @AAA up. @= and @| draw horizontal and vertical double lines, and @. leaves a gap. A label after the first >, <, V or A sits above or left of the arrow, and a label after the second sits below or right.
$$
\begin{CD}
A @>f>> B @= B \\
@AgAA @VVhV @| \\
C @<<k< D @>>> E
\end{CD}
$$
This renders a two-by-three grid. Top row: an f arrow from A to B, then a double line to a second B. Middle row: an up arrow from C to A labelled g, a down arrow from B to D labelled h, and a vertical double line from B to E. Bottom row: a left arrow from D to C with k below, and a plain arrow from D to E.
TikZ is where KaTeX stops. Curved arrows between arbitrary points, diagonal arrows in a diagram, bent arrows with labels on each arm and custom arrowheads all need TikZ in a real LaTeX document. Our editor's KaTeX preview can't show them. For flowchart-style boxes and arrows, Mermaid diagrams are a better fit than LaTeX.
Our editor uses $...$ for inline math and $$...$$ for display math. The \(...\) and \[...\] delimiters don't work there. The Markdown equation guide covers the rules. Edit the arrows below and the preview updates as you type:
How Do You Type a LaTeX Arrow Symbol in Running Text?
Arrow commands are math-mode only, so \rightarrow in a plain paragraph gives a "Missing $ inserted" error. Wrap it as $\rightarrow$, or use the text-mode commands \textrightarrow, \textleftarrow, \textuparrow and \textdownarrow. These used to need the textcomp package, but they've been available out of the box since the LaTeX 2020 release. KaTeX doesn't support these text-mode commands, so in Markdown math stick with $\rightarrow$.
If you're writing Markdown without math support, a Unicode character is simpler. Our guide to typing arrow symbols covers the characters, HTML entities and keyboard shortcuts.
A LaTeX arrow comes down to knowing the right command and the package behind it. Base LaTeX covers the plain, long, double and vertical arrows, and amsmath adds \implies and \xrightarrow. Mathtools supplies the other labelled arrows, while amssymb brings the dashed and curved ones. Paste any command from these tables into the editor to check how it renders before it goes into your document.