Brackets in LaTeX: Curly Braces, Angle Brackets and Sizing
Type ( ) and [ ] directly; print curly braces with \{ and \}. In math mode use \langle and \rangle for angle brackets. Put \left and \right before a pair to size it automatically, or choose matching \bigl and \bigr sizes manually. Load amsmath for the matrix and alignment examples below.
Updated November 28, 2026
Need a copyable command rather than a sizing tutorial? Use the bracket symbol lookup.
Choose the delimiter, not a look-alike character
Parentheses and square brackets work in both ordinary text and mathematics. Braces are different: unescaped { and } group source without printing anything. Use \{ and \} when the reader should see the braces. The math-only synonyms \lbrace and \rbrace are useful in delimiter definitions. In text, \textbraceleft and \textbraceright also print braces, including inside typewriter text.
Angle brackets are \langle and \rangle, not the less-than and greater-than characters. The latter are relations, so their spacing and shapes are wrong for an inner product. Likewise, use \lfloor and \rfloor for floor, and \lceil and \rceil for ceiling. Copying a visually similar Unicode character into pdfLaTeX can produce an unsupported-character error or a text glyph that cannot grow as a mathematical delimiter.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Text braces: \{example\}.
\[
(a+b)\quad [a,b]\quad \{1,2,3\}\quad
\langle u,v\rangle\quad \lfloor x\rfloor\quad \lceil x\rceil
\]
\end{document}Use bars according to their mathematical role
For an absolute value, use \lvert x\rvert; for a norm, use \lVert x\rVert. These opening and closing forms tell TeX how to space adjacent material, especially a leading minus sign. A plain vertical bar does not express that opening or closing role. For a relation inside set-builder notation, use \mid instead: it receives relation spacing rather than delimiter spacing.
The same distinction matters in conditional probability and inner products. A bar can separate two arguments without enclosing either one. If it must grow alongside an automatically sized outer pair, \middle| supplies the scalable middle delimiter; spacing around it may still need attention. Choose the meaning first, then the command, instead of fixing every bar with arbitrary spaces.
Size tall contents with left and right
Put \left immediately before the opening delimiter and \right immediately before its closing partner. LaTeX measures the enclosed material and chooses a delimiter size. Fractions, arrays and stacked expressions are common reasons to do this. The two shapes need not match: \left( ... \right] is valid for a half-open interval. Matching means a balanced command pair, not identical punctuation.
A dot after either command means an invisible delimiter. This is useful for an evaluation bar: \left. supplies the otherwise missing opening partner. The dot is syntax, not a printed decimal point. A missing partner can trigger “Missing \right. inserted” or another grouping error, so inspect the nearest pair before adding closing braces elsewhere in the document.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\left(\frac{a}{b}\right)
\quad \left\{\frac{a}{b}\right\}
\quad \left\langle\frac{a}{b},c\right\rangle
\quad \left.\frac{\partial f}{\partial x}\right|_{x=0}
\]
\end{document}Prefer manual sizes for nesting and line breaks
The manual sizes are \big, \Big, \bigg and \Bigg, in increasing order. Use their l and r forms for opening and closing delimiters, such as \Bigl[ and \Bigr]. A middle relation can use the m form, as in \bigm|. These sizes do not require a balanced command pair, although the mathematics should still have the intended opening and closing brackets.
Automatic sizing can make brackets around a display-style sum unexpectedly tall because the limits contribute to its height. It can also make nested levels look too similar. Manual sizes let the outer grouping be visibly larger than the inner grouping without forcing every bracket to cover the tallest subscript. Inspect the actual font and display rather than treating a particular size as a universal rule.
A \left and \right pair cannot cross a row break or alignment cell boundary in align. Use manual sizes across a continuation, as below. Alternatively close a row with \right. and reopen with \left., but those two pairs are measured independently and may have different heights. Source newlines alone do not split a display; the alignment environment controls the rows.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
F(x) &= \Bigl[(x+1)^2+(x+2)^2\\
&\qquad {}+(x+3)^2\Bigr].
\end{align*}
\end{document}Keep interval and set notation unambiguous
Intervals can mix round and square ends because the ends communicate inclusion or exclusion. Ordinary-sized brackets usually suffice for short endpoints. In conventions that write an open interval with reversed square brackets, preserve the author's notation rather than converting the shapes merely to satisfy an imagined matching rule. TeX's delimiter-pair requirement is separate from the mathematical convention.
For a set of real numbers, put the condition after \mid and load amssymb if you use \mathbb{R}. Thin spaces just inside the braces can improve legibility but do not change the set. Curly braces are also called accolades in some languages; they still require escaping. A square bracket after a command accepting optional arguments may be parsed as an option, so group literal bracketed text when necessary.
\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
\[
[0,1)\qquad
\{\,x\in\mathbb{R}\mid x>0\,\}\qquad
\langle u\mid v\rangle
\]
\end{document}Let matrix and cases environments supply their brackets
The amsmath matrix family handles bracket sizes automatically. Use pmatrix for parentheses, bmatrix for square brackets, Bmatrix for braces, vmatrix for single bars and Vmatrix for double bars. Plain matrix supplies no surrounding delimiters. Inside each environment, ampersands separate columns and double backslashes separate rows. Do not add another bracket pair unless you really need an outer grouping.
For an augmented matrix, an array gives explicit column specifications and a vertical separator. For a piecewise function, cases supplies a growing left brace and two columns: the value and its condition. Conditions containing words belong in \text. Ordinary cases uses text-style fractions; mathtools supplies dcases for display-style entries and rcases for a right-side brace.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
A=\begin{bmatrix}1&2\\3&4\end{bmatrix},
\qquad
f(x)=\begin{cases}x^2&\text{if }x\geq0,\\-x&\text{if }x<0.\end{cases}
\]
\[
\left[\begin{array}{cc|c}1&0&a\\0&1&b\end{array}\right]
\]
\end{document}Define reusable absolute values and norms
Mathtools provides \DeclarePairedDelimiter so that an absolute value or norm has one command rather than two manually repeated endpoints. The ordinary form uses natural-sized delimiters, the starred form sizes automatically, and an optional size selects a manual size. Keeping all three choices available is useful because a definition that looks good inline may need a different size in a display.
Choose macro names that your template has not already defined. Loading another package that also supplies \abs or \norm can produce a command-already-defined error. Do not silence that error by changing package order blindly: decide which implementation you intend to use. For annotations underneath or above expressions, use \underbrace with a subscript or \overbrace with a superscript instead of a vertical delimiter.
\documentclass{article}
\usepackage{mathtools}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\begin{document}
\[
\abs{-x}\quad \abs*{\frac{a}{b}}\quad \norm[\Big]{v}
\quad \underbrace{x+\cdots+x}_{n\text{ terms}}
\]
\end{document}Diagnose delimiter errors without changing the formula
Start with the first error in the log. “Missing delimiter” often means a sizing command was followed by something that is not a delimiter: \left cannot be followed directly by a fraction or an ordinary letter. “Missing $ inserted” usually points to a math-only command used in text. An unmatched brace can also hide the true boundary of a formula, so reduce the failing display to a small example before changing several unrelated lines.
A successful compile does not establish correct spacing. Check negative values inside bars, the heights of nested brackets and whether a continuation still communicates the same grouping. Compare the standalone example with the final document class, especially in narrow columns. Copy only the needed package declarations into your preamble and only the mathematical body into an existing document; do not nest a complete example's document environment inside your paper.
When collaborating across engines, command-based delimiters are the portable choice. LuaLaTeX and XeLaTeX with unicode-math support Unicode mathematical delimiters, but that is a separate font and engine setup, not a reason to paste arbitrary look-alikes into a pdfLaTeX project. Keep the document's compiler choice consistent and retain the original notation while repairing its source.
Frequently asked questions
How do I write curly brackets in LaTeX?
Use \{ and \} in text or math. Bare braces group source without printing. In math, \left\{ ... \right\} makes a growing pair; cases supplies a left brace for alternatives.
Why do my angle brackets have too much space?
Use \langle and \rangle rather than < and >. The latter are relation symbols, not opening and closing delimiters, so they receive different spacing.
How do I fix a bracket across two equation lines?
Use manual sizes such as \Bigl( and \Bigr) across the rows. A \left and \right pair must stay within its alignment cell; invisible partners work but size each row independently.
Should every bracket use left and right?
No. Natural-sized brackets are often best for short inline expressions. Use automatic sizing for tall contents and manual sizes when nesting or multiline alignment needs consistent heights.
Documentation and related guides
Use the package authors' documentation for supported commands, options and font-dependent behavior:
- Matrix environments and column alignment
- Cases and piecewise functions
- Multiline equations
- Escaping special characters
Test a complete example with LaTeX Preview, then check it in the final document class. The class, math font and available column width can change the result.
Try the notation in your document
Open Octree to edit LaTeX and compile a PDF. Copy the example into a small document first, then transfer the relevant packages and formulas into your paper.
Open Octree