Large brackets in LaTeX (left, right, big)

\left( and \right) make a pair of brackets as tall as the formula between them. They work with every delimiter, for example [ ], \{ \}, | | and \langle \rangle. \big, \Big, \bigg and \Bigg set four fixed sizes.

Preamble

The snippets on this page need these lines before \begin{document}:

\usepackage{mathtools}

Brackets that grow with the content

Every \left needs a \right in the same formula. The two delimiters need not be of the same kind: \left[ 0, 1 \right) is allowed. Braces are written \{ and \}.

\[
  \left( \frac{a}{b} \right)^2
  \qquad
  \left[ \sum_{i=1}^{n} x_i \right]
  \qquad
  \left\{ \frac{1}{n} \right\}
  \qquad
  \left\langle \frac{a}{b}, c \right\rangle
\]
Change the formula

The preview is drawn in your browser by KaTeX, which knows the common math commands. The editor compiles the formula with pdfTeX.

(ab)2[∑i=1nxi]{1n}⟨ab,c⟩\left( \frac{a}{b} \right)^2 \qquad \left[ \sum_{i=1}^{n} x_i \right] \qquad \left\{ \frac{1}{n} \right\} \qquad \left\langle \frac{a}{b}, c \right\rangle

Open this formula in the editor

A bracket on one side only

A dot in place of the delimiter makes an invisible partner: \left. pairs with \right|, and \left\{ pairs with \right..

\[
  \left. \frac{df}{dx} \right|_{x=0}
\]
Change the formula

The preview is drawn in your browser by KaTeX, which knows the common math commands. The editor compiles the formula with pdfTeX.

dfdx∣x=0\left. \frac{df}{dx} \right|_{x=0}

Open this formula in the editor

A scaled line in the middle

\middle| between \left and \right scales the bar to the same height as the outer brackets. It adds no space of its own, so put \, on both sides.

\[
  \left\{ x \in M \,\middle|\, \frac{x}{2} > 1 \right\}
\]
Change the formula

The preview is drawn in your browser by KaTeX, which knows the common math commands. The editor compiles the formula with pdfTeX.

{x∈M | x2>1}\left\{ x \in M \,\middle|\, \frac{x}{2} > 1 \right\}

Open this formula in the editor

Fixed sizes

\bigl, \Bigl, \biggl and \Biggl open a bracket in four growing sizes; the versions ending in r close it, and \bigm| sets a bar in the middle. Use them when \left and \right pick a size that is too large, for example around a sum with limits, or for nested brackets of the same height.

\[
  \Biggl( \biggl( \Bigl( \bigl( x \bigr) \Bigr) \biggr) \Biggr)
  \qquad
  \bigl( f(x) + g(x) \bigr)^2
\]
Change the formula

The preview is drawn in your browser by KaTeX, which knows the common math commands. The editor compiles the formula with pdfTeX.

((((x))))(f(x)+g(x))2\Biggl( \biggl( \Bigl( \bigl( x \bigr) \Bigr) \biggr) \Biggr) \qquad \bigl( f(x) + g(x) \bigr)^2

Open this formula in the editor

Define a bracket command

\DeclarePairedDelimiter{\name}{left}{right} from mathtools defines a command with three forms: \name{...} uses the normal size, \name*{...} uses \left and \right, and \name[\big]{...} uses a fixed size.

Complete document:

\documentclass{article}
\usepackage{mathtools}
\DeclarePairedDelimiter{\paren}{(}{)}
\DeclarePairedDelimiter{\set}{\{}{\}}
\begin{document}
\[
  \paren{x}
  \qquad
  \paren*{\frac{a}{b}}
  \qquad
  \set[\big]{1, 2, 3}
\]
\end{document}
Result
The compiled example

Open in the editor

Pitfalls

Compiled with pdfLaTeX from TeX Live 2023.

Related pages