Overline in LaTeX (\overline{xyz})

xyz‾\overline{xyz}
LaTeX command
\overline{xyz}
Package
No package needed: built into LaTeX
Mode
Math mode only

Where it is used

Draws a line over an entire expression, for conjugates, closures, repeating decimals or segment names.

Unlike \bar, the \overline rule stretches to the full width of its argument, so it suits \overline{z_1 z_2} = \bar{z}_1 \bar{z}_2, the closure \overline{A \cup B}, Boolean negation \overline{A + B}, the line segment \overline{AB}, and repeating decimals like 0.\overline{3}. Nested overlines stack at increasing heights, which can look uneven next to each other; adding a \vphantom of the tallest content to each helps align them. In text mode an over-rule is not available directly; wrap it in math. Its counterpart for underlining is \underline.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

z1+z2‾=z1‾+z2‾\overline{z_1 + z_2} = \overline{z_1} + \overline{z_2}
\documentclass{article}
\begin{document}
Overline: $\overline{xyz}$

\[ \overline{z_1 + z_2} = \overline{z_1} + \overline{z_2} \]
\end{document}

Related symbols

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

Frequently asked questions

How do I write Overline in LaTeX?
Type \overline{xyz} in math mode, for example $\overline{z_1 + z_2} = \overline{z_1} + \overline{z_2}$. It works in plain LaTeX without loading any package.
Which package do I need for \overline{xyz}?
None. \overline{xyz} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \overline{xyz} in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\overline{xyz}$ in running text.
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

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

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

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