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 poweredAIでLaTeXを書く

最高のAI LaTeXエディタ、Overleaf代替

Octreeは15以上の大学の研究者がAIを使って論文をより速く書くのを支援

  • AIで美しいTikZダイアグラムを生成
  • 画像をアップロードしてシームレスにLaTeXに変換
  • 論文の執筆とフォーマットに即座にサポートを取得