Line Arrow (over AB) in LaTeX (\overleftrightarrow{AB})

AB↔\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.

AB↔∥CD↔\overleftrightarrow{AB} \parallel \overleftrightarrow{CD}
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Line Arrow (over AB): $\overleftrightarrow{AB}$

\[ \overleftrightarrow{AB} \parallel \overleftrightarrow{CD} \]
\end{document}

Related symbols

All التشكيل والمعدّلات →

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.
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

أفضل محرر LaTeX بالذكاء الاصطناعي، بديل Overleaf

يساعد Octree الباحثين من أكثر من 15 جامعة على كتابة أوراق البحث بشكل أسرع باستخدام الذكاء الاصطناعي

  • أنشئ رسوم TikZ جميلة باستخدام الذكاء الاصطناعي
  • ارفع صورة وحولها إلى LaTeX بسلاسة
  • احصل على مساعدة فورية في كتابة وتنسيق أوراق البحث