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 poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기