Overbrace in LaTeX (\overbrace{x+y}^{\text{sum}})

x+y⏞sum\overbrace{x+y}^{\text{sum}}
LaTeX command
\overbrace{x+y}^{\text{sum}}
Package
Add to your preamble:\usepackage{amsmath}
Mode
Math mode only

Where it is used

Draws a horizontal curly brace above an expression, with an optional label set via a superscript.

Overbraces annotate parts of a formula, for instance labeling n copies in \overbrace{1 + 1 + \cdots + 1}^{n}, or naming a term in a derivation. The superscript after the command is placed above the brace's tip, and wrapping the label in \text keeps it upright and at a readable size. The brace adds a lot of height, so it belongs in display math; inline it will push lines apart. Combine with \underbrace on the same expression to annotate above and below. For a brace with a label on the side, use \left\{ ... \right. instead.

Minimal compilable example

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

a+a+⋯+a⏞n times=na\overbrace{a + a + \cdots + a}^{n \text{ times}} = na
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Overbrace: $\overbrace{x+y}^{\text{sum}}$

\[ \overbrace{a + a + \cdots + a}^{n \text{ times}} = na \]
\end{document}

Related symbols

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

Frequently asked questions

How do I write Overbrace in LaTeX?
Type \overbrace{x+y}^{\text{sum}} in math mode, for example $\overbrace{a + a + \cdots + a}^{n \text{ times}} = na$. Load amsmath first with \usepackage{amsmath}.
Which package do I need for \overbrace{x+y}^{\text{sum}}?
\overbrace{x+y}^{\text{sum}} needs amsmath: add \usepackage{amsmath} to your preamble before the document starts.
Can I use \overbrace{x+y}^{\text{sum}} in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\overbrace{x+y}^{\text{sum}}$ in running text.
Math poweredاكتب LaTeX باستخدام الذكاء الاصطناعي

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

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

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