Underbrace in LaTeX (\underbrace{x+y}_{\text{sum}})

x+y⏟sum\underbrace{x+y}_{\text{sum}}
LaTeX command
\underbrace{x+y}_{\text{sum}}
Package
Add to your preamble:\usepackage{amsmath}
Mode
Math mode only

Where it is used

Puts a curly brace under an expression, with a label set through a subscript beneath it.

Textbooks use \underbrace to explain pieces of an equation, such as marking \underbrace{\frac{1}{2}mv^2}_{\text{kinetic}} in an energy balance or counting terms in a product. The label goes in a subscript right after the command; use \text for words and \scriptstyle content for short math. The brace stretches to the exact width of its argument. Nested or overlapping braces need care: you can underbrace part of an expression that is already overbraced, but braces cannot cross each other. Like \overbrace, it is best in display math.

Minimal compilable example

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

E=12mv2⏟kinetic+mghE = \underbrace{\tfrac{1}{2} m v^2}_{\text{kinetic}} + mgh
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Underbrace: $\underbrace{x+y}_{\text{sum}}$

\[ E = \underbrace{\tfrac{1}{2} m v^2}_{\text{kinetic}} + mgh \]
\end{document}

Related symbols

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

Frequently asked questions

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

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

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

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