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 Aksen & Pengubah →

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 poweredTulis LaTeX menggunakan AI

Editor LaTeX AI Terbaik, Alternatif Overleaf

Octree membantu penyelidik dari 15+ universiti menulis kertas penyelidikan dengan lebih cepat menggunakan AI

  • Jana diagram TikZ yang cantik menggunakan AI
  • Muat naik imej dan tukar ke LaTeX dengan lancar
  • Dapatkan bantuan segera untuk menulis dan memformat kertas penyelidikan