LaTeX has dozens of special mathematical symbols. A few of them, such as +,-, <, and >, are produced by typing the corresponding keyboard characters. Others are obtained with LaTeX commands as the case with arrow symbols which is the purpose of this post!
- Default LaTeX arrow symbols.
- amssymb LaTeX arrow symbols.
- Arrow in a mathematical mode.
- Alternate commands for simple arrows.
- Long LaTeX arrows.
- Text above and below arrows.
Arrow LaTeX Symbols
In LaTeX, by default different types of arrow symbols are available. Arrows can be used in equations, text, pictures, and so on. Here is a list of arrow LaTeX commands that can be used without loading any package:
Description | LaTeX command | Output |
---|---|---|
Left Arrow, Right arrow | \leftarrow, \rightarrow | \(\leftarrow\), \(\rightarrow\) |
Double Left Arrow, Double right arrow | \Leftarrow, \Rightarrow | \(\Leftarrow\), \(\Rightarrow\) |
Long double Left Arrow | \Longleftarrow | \(\Longleftarrow\) |
Long Left Arrow | \longleftarrow | \(\longleftarrow\) |
Long Right Arrow | \longrightarrow | \(\longrightarrow\) |
Long Double Right Arrow | \Longrightarrow | \(\Longrightarrow\) |
Left and right arrow | \leftrightarrow | \(\leftrightarrow\) |
Long left and right arrow | \longleftrightarrow | \(\longleftrightarrow\) |
If and only if arrow | \Leftrightarrow | \(\Leftrightarrow\) |
Long If and only if arrow | \Longleftrightarrow | \(\Longleftrightarrow\) |
Upward Arrow, Down arrow | \uparrow, \downarrow | \(\uparrow\), \(\downarrow\) |
Double Upward Arrow | \Uparrow | \(\Uparrow\) |
Long Upward Arrow | \big\uparrow | \(\big\uparrow\) |
Double Downward Arrow | \Downarrow | \(\Downarrow\) |
Long Downward Arrow | \big\downarrow | \(\big\downarrow\) |
Upward Downward Arrow | \updownarrow | \(\big\updownarrow\) |
Long Upward Downward Arrow | \big\updownarrow | \(\big\updownarrow\) |
Double side Upward Downward Arrow | \Updownarrow | \(\Updownarrow\) |
Long Double side Upward Downward Arrow | \big\Updownarrow | \(\big\Updownarrow\) |
Arrow LaTeX symbols provided by amssymb
The following multitude of arrow symbols require an additional package called amssymb
:
Description | LaTeX command | Output |
---|---|---|
Twin Head Arrow | \twoheadleftarrow | \(\twoheadleftarrow\) |
Lesh Arrow | \Lsh | \(\Lsh\) |
Twin Left Arrow | \leftleftarrows | \(\leftleftarrows \) |
Twin Up Arrow | \upuparrows | \(\upuparrows \) |
Twin Down Arrow | \downdownarrows | \(\downdownarrows \) |
Opposite Direction Arrow | \rightleftarrows | \(\rightleftarrows \) |
Large Left, Right Arrow | \Lleftarrow, \Rrightarrow | \( \Lleftarrow\), \(\Rrightarrow\), |
Left Arrow With tail | \leftarrowtail | \( \leftarrowtail\) |
Right Arrow with tail | \rightarrowtail | \( \rightarrowtail\) |
Squig (leads to Right) Arrow | \rightsquigarrow | \( \rightsquigarrow\) |
Squig Arrow(both direction) | \leftrightsquigarrow | \( \leftrightsquigarrow\) |
Loop Arrow (Left) | \looparrowleft | \( \looparrowleft\) |
Loop Arrow (Right) | \looparrowright | \( \looparrowright\) |
Circle Arrow (Left) | \circlearrowleft | \(\circlearrowleft \) |
Circle Arrow (Right) | \circlearrowright | \( \circlearrowright\) |
Curve Arrow (Left) | \curvearrowleft | \( \curvearrowleft\) |
Curve Arrow(Right) | \curvearrowright | \(\curvearrowright \) |
(Not) Left, Right Arrow | \nleftarrow,\nrightarrow | \(\nleftarrow \), \(\nrightarrow \) |
We can use the LaTeX arrow symbol both in mathematical formulas and text mode, even in pictures and margin indicators.
Arrow in Mathematical Formulas
We can use various types of arrows in mathematical mode in LaTeX in a pretty straightforward way. We only need to declare the appropriate arrow commands. Here is an example:
% Arrow in mathematical formulas \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} z &\Rightarrow r + f(b_y) \\ & \Rightarrow r + f(c_y) \end{align*} \end{document}
Output of the Equation:
Use of alternate commands of ← , → , and ⇔
The arrow symbols ← and → can also be referred to under the names \to
and \gets
. Another command ⇔ can be replaced by \iff
. Here is an example that uses \to
instead of \leftarrow
in an equation:
% \to, \gets and \iff commands \documentclass{article} \usepackage{amsmath} \begin{document} % Use of \to command $$f(c) \to 2x+1$$ % display style one way $$f(c) \rightarrow 2x+1$$ %display style other way % Use of \gets command $$f(c) \gets 2x+1$$ %display style one way $$f(c) \leftarrow 2x+1$$ %display style other way % Use of \iff command $$f(c+a) \iff f(c)+f(a)$$ %display style one way $$f(c+a) \Longleftrightarrow f(c)+f(a)$$ %display style other way \end{document}
Output:
Long LaTeX Arrows in Mathematical Mode
amsmath package of LaTeX offers a bunch of commands to generate “Extra Long Arrows” for combining with mathematical expressions. Here are the commands of lengthening arrows on the top of any math expressions pointing towards left, right, and both directions:
% Long arrows in latex (over) \documentclass{article} \usepackage{amsmath} \begin{document} $$\overleftarrow{(\alpha+\beta)}$$ $$\overrightarrow{(\eta-\epsilon)}$$ $$\overleftrightarrow{(\mu+\zeta)}$$ \end{document}
Compiling this code yields:
Besides, the following commands refer to the extended arrows under any math expressions (change over prefix by under prefix):
% Long arrows in latex (under) \documentclass{article} \usepackage{amsmath} \begin{document} $$\underleftarrow{(\alpha+\beta)}$$ $$\underrightarrow{(\eta-\epsilon)}$$ $$\underleftrightarrow{(\mu+\zeta)}$$ \end{document}
Compiling this code yields:
The lower arrows are usually too close to the math expressions, as is seen on the above equations. To avoid these issues, you need to add a \rule to push them downward as shown below:
% Long arrows in latex (under) \documentclass{article} \usepackage{amsmath} \begin{document} $\underrightarrow{\rule[-4pt]{0pt}{2pt}{PQ}}= \underrightarrow{\rule[-4pt]{0pt}{2pt}{QS}}+ \underrightarrow{\rule[-4pt]{0pt}{2pt}{RS}}+ \underrightarrow{\rule[-4pt]{0pt}{2pt}{QR}}$ \end{document}
Output:
Text above and below arrows
The package mathtools offers more possibilities for combining arrows and text labels.
At this level, we reached the end of this post. I hope you find it useful ???