Curly Braces in LaTeX (\left\{ x \right\})
- LaTeX command
\left\{ x \right\}- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Curly braces that stretch to the content height, for set-builder notation and grouped definitions.
Braces must be escaped as \{ and \} because bare braces are LaTeX grouping characters and print nothing. With \left\{ ... \right\} they grow around tall content such as \left\{ \frac{p}{q} : q \neq 0 \right\}. For a set-builder bar that also grows, use \middle| between them. For piecewise definitions, the cases environment already draws the left brace, so you do not need \left\{ ... \right. by hand. In text mode, use \textbraceleft or simply \{ inside math.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\usepackage{amssymb}
\begin{document}
Curly Braces: $\left\{ x \right\}$
\[ \left\{ x \in \mathbb{R} \;\middle|\; x^2 < 2 \right\} \]
\end{document}Related symbols
- Vertical Bar
\left| x \right| - Square Brackets
\left[ x \right] - Big Parentheses
\Big( x \Big) - Parentheses
\left( x \right) - Bigg Parentheses
\Bigg( x \Bigg) - Double Brackets
\llbracket x \rrbracket
Frequently asked questions
- How do I write Curly Braces in LaTeX?
- Type \left\{ x \right\} in math mode, for example $\left\{ x \in \mathbb{R} \;\middle|\; x^2 < 2 \right\}$. It works in plain LaTeX without loading any package.
- Which package do I need for \left\{ x \right\}?
- None. \left\{ x \right\} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \left\{ x \right\} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\left\{ x \right\}$ in running text.
Math poweredWrite LaTeX using AI
Best AI LaTeX Editor, Overleaf Alternative
Octree helps researchers from 15+ universities write research papers faster using AI
- Generate beautiful TikZ diagrams using AI
- Upload image and convert it to LaTeX seamlessly
- Get instant assistance with writing and formatting research papers