16.2.5.1 \left & \right

Synopsis:

\left delimiter1 ... \right delimiter2

Make matching parentheses, braces, or other delimiters. LaTeX makes the delimiters tall enough to just cover the size of the formula that they enclose.

This makes a unit vector surrounded by parentheses tall enough to cover the entries.

\begin{equation}
  \left(\begin{array}{c}
    1   \\
    0   \\
  \end{array}\right)
\end{equation}

See Delimiters, for a list of the common delimiters.

Every \left must have a matching \right. In the above example, leaving out the \left( gets the error message ‘Extra \right’. Leaving out the \right) gets ‘You can't use `\eqno' in math mode’.

However, delimiter1 and delimiter2 need not match. A common case is that you want an unmatched brace, as below. Use a period, ‘.’, as a null delimiter.

\begin{equation}
  f(n)=\left\{\begin{array}{ll}
                1             &\mbox{--if \(n=0\)} \\
                f(n-1)+3n^2   &\mbox{--else}       
       \end{array}\right.
\end{equation}

Note that to get a curly brace as a delimiter you must prefix it with a backslash, \{ (see Reserved characters). (The packages amsmath and mathtools allow you to get the above construct through in a cases environment.)

The \left ... \right pair make a group. One consequence is that the formula enclosed in the \left ... \right pair cannot have line breaks in the output. This includes both manual line breaks and LaTeX-generated automatic ones. In this example, LaTeX breaks the equation to make the formula fit the margins.

Lorem ipsum dolor sit amet
\( (a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z) \)

But with \left and \right

Lorem ipsum dolor sit amet
\( \left(a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z\right) \)

LaTeX won’t break the line, causing the formula to extend into the margin.

Because \left ... \right make a group, all the usual grouping rules hold. Here, the value of \testlength set inside the equation will be forgotten, and the output is ‘1.2pt’.

\newlength{\testlength} \setlength{\testlength}{1.2pt}
\begin{equation}
  \left( a+b=c \setlength{\testlength}{3.4pt} \right)
  \the\testlength
\end{equation}

The \left ... \right pair affect the horizontal spacing of the enclosed formula, in two ways. The first is that in \( \sin(x) = \sin\left(x\right) \) the one after the equals sign has more space around the x. That’s because \left( ... \right) inserts an inner node while ( ... ) inserts an opening node. The second way that the pair affect the horizontal spacing is that because they form a group, the enclosed subformula will be typeset at its natural width, with no stretching or shrinking to make the line fit better.

TeX scales the delimiters according to the height and depth of the enclosed formula. Here LaTeX grows the brackets to extend the full height of the integral.

\begin{equation}
  \left[ \int_{x=r_0}^{\infty} -G\frac{Mm}{r^2}\, dr \right] 
\end{equation}

Manual sizing is often better. For instance, although below the rule has no depth, TeX will create delimiters that extend far below the rule.

\begin{equation}
  \left( \rule{1pt}{1cm} \right)
\end{equation}

TeX can choose delimiters that are too small, as in \( \left| |x|+|y| \right| \). It can also choose delimiters that are too large, as here.

\begin{equation}
  \left( \sum_{0\leq i<n} i^k \right)
\end{equation}

A third awkward case is when a long displayed formula is on more than one line and you must match the sizes of the opening and closing delimiter; you can’t use \left on the first line and \right on the last because they must be paired.

To size the delimiters manually, see \bigl, \bigr, etc..


Unofficial LaTeX2e reference manual