Line Arrow (over AB) in LaTeX (\overleftrightarrow{AB})
- LaTeX command
\overleftrightarrow{AB}- Package
- Add to your preamble:
\usepackage{amsmath} - Mode
- Math mode only
Where it is used
Draws a double-headed arrow over its argument, the usual notation for the line through points A and B.
School geometry distinguishes three objects built from two points: \overline{AB} for the segment, \overrightarrow{AB} for the ray, and \overleftrightarrow{AB} for the infinite line. The arrow stretches with the content and has heads on both ends. It is also used occasionally for bidirectional relations or two-sided limits. Because it is quite tall, it can collide with the line above in dense paragraphs; display math avoids that. The matching under-arrow version is \underleftrightarrow. Keep the distinction from \overline{AB} in mind, since that one denotes only the finite segment.
Also listed under: 幾何学
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Line Arrow (over AB): $\overleftrightarrow{AB}$
\[ \overleftrightarrow{AB} \parallel \overleftrightarrow{CD} \]
\end{document}Related symbols
- Acute
\acute{x} - Left Vector
\overleftarrow{AB} - Grave
\grave{x} - Wide Vector
\overrightarrow{AB} - Breve
\breve{x} - Vector Arrow
\vec{x}
Frequently asked questions
- How do I write Line Arrow (over AB) in LaTeX?
- Type \overleftrightarrow{AB} in math mode, for example $\overleftrightarrow{AB} \parallel \overleftrightarrow{CD}$. Load amsmath first with \usepackage{amsmath}.
- Which package do I need for \overleftrightarrow{AB}?
- \overleftrightarrow{AB} needs amsmath: add \usepackage{amsmath} to your preamble before the document starts.
- Can I use \overleftrightarrow{AB} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\overleftrightarrow{AB}$ in running text.