Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What is the difference between ( and \left( in LaTeX? Sometimes, when the content is small, it does not seem to matter which pair I use.

What is the best practice when it comes to which parentheses use?

share|improve this question
    
possible duplicate of What is the correct way to do delimiters? –  Caramdir Mar 6 '11 at 17:49

4 Answers 4

up vote 63 down vote accepted

There are in fact four important differences:

  1. \left( ... \right) etc. scales according to the height and depth of its contents. This scaling is "dumb" in the sense that it will always take the full height and depth into account (how much of the expression is covered is controlled by \delimitershortfall and \delimiterfactor): for example, in \left( \rule{1cm}{1cm} \right), the parentheses reach far below the square. A more relevant example is \left( \sum_a^b \right) where the parentheses also cover the sum limits. The simple delimiters ( and ) and also the manually-sized delimiters \big( etc. don't scale.
  2. \left ... \right forms a group: if you say \newlength\mylength \[ \left( \mylength=1cm \right) \the\mylength \] you get 0.0pt because the value was reset. More importantly, you cannot have line breaks inside \left ... \right groups, neither manual nor automatic ones, without special trickery. Any \left needs a matching \right.
  3. Some characters produce different glyphs when being applied to \left etc. For example, < produces a less-than sign, while \left< produces an angle bracket. \big etc. use the same interpretation as \left (because they use \left internally). Technically, \left uses the delimiter code, while unadorned characters use the mathematical code.
  4. The spacing is different. Technically, \left ... \right inserts an inner node, while ( inserts an opening node. This becomes visible in $\sin()$ vs. $\sin\left(\right). Therefore you can never simply replace ( by \left( and vice versa, you always have to check whether the spacing comes out right. An automatic solution to this issue is offered in Spacing around \left and \right, but the spacing within \left...\right can still be different as explained in this answer.
share|improve this answer
3  
Thanks! When would you use ( instead of \left(? –  Tim N Mar 6 '11 at 17:37
1  
@Tim: Because you might not like the spacing with \left( (in #4 in Philipp's answer). –  Hendrik Vogt Mar 6 '11 at 17:47
4  
@Hendrik: Yes, but when does that happen? I don't like to choose what looks nice. That is the job of LaTeX. –  Tim N Mar 6 '11 at 17:49
4  
@Tim: Using ( has the advantage that you know what happens; it will never scale without your explicit request. Auto-scaled delimiters often tend to be too large. Usually I use \left only in displayed equations (like jrhorn424), and then only if the enclosed expression is long and complex enough so I know the small parentheses wouldn't look good. During proofreading, I regularly insert manual spacing and delimiter sizing commands. At the moment TeX's mathematical typesetting engine just isn't smart enough to produce adequate results in all cases. –  Philipp Mar 6 '11 at 18:19
1  
@TimN: It's not totally the job of LaTeX to choose what looks nice. For example, if you want a table, you don't just write aligned columns of text in the input; you use a tabular, and you tell it how to center each column. The job of LaTeX is to give you the tools to choose what looks nice, since many things (like delimiter sizing or math symbol spacing) are almost impossible to do automatically correctly in every case. TeX does have defaults for these things, particularly spacing, but in the TeXbook, even Knuth devotes some time to showing the need to tweak these defaults. –  Ryan Reich Jun 23 '12 at 17:11

There is a "big" difference: \left( is used to adapt the size of the delimiters to the size of the characters in the math expression. You can try

\[ (\frac{x^2}{y^3}) \]

and

\[ \left(\frac{x^2}{y^3}\right) \]

and with \{

\left\{
  \begin{array}{rcr}
    x+2y & = & -1 \\
    -x+4y & = & 0 \\
  \end{array}
\right.

The delimiters can be : () [] | \| \{ \} or the dot .

share|improve this answer
    
So when the content is simple and small, are they exactly identical? –  Tim N Mar 6 '11 at 15:29
1  
Logically, yes. jrhorn424 writes : "in inline math you can use a simple (", because the height of the line is (must be) always the same. \(is useful in the mode display mathand the size of the delimiters is adapted to size of the characters. If you want a big delimiters with normal characters in the expression, you need to use \bigor \Biglike jrhorn424 says. –  Alain Matthes Mar 6 '11 at 15:33
5  
It's better to use the "l" and "r" variants for \big, \Big, \bigg, and \Bigg, as in \bigl[... \bigr], since \big creates an Ord atom whereas \bigl and \bigr create suitable Open and Close atoms. –  Gonzalo Medina Mar 6 '11 at 15:41
    
@Gonzalo: Interesting, I never used these variants and I note your remark ! –  Alain Matthes Mar 6 '11 at 16:02
2  
@Tim: No, see my answer. There are other important differences. Even if you only compare ( with \left(, the spacing is different. –  Philipp Mar 6 '11 at 17:29

I don't know what objective "best practice" there is, but I always use \left( when in math environments, and ( when not. This is because, as you probably know \left and \right macros scale things nicely, which isn't an issue in prose, but can be an issue when punctuation is used in other contexts.

I also use the former in inline-math environments, since scaling is an issue there as well.

Note that you will probably want to use \bigl[...\bigr] or \Bigl[...\Bigr] for larger square brackets (or parentheses) when you are grouping terms without fractions, especially across several lines.

share|improve this answer
11  
It's better to use the "l" and "r" variants for \big, \Big, \bigg, and \Bigg, as in \bigl[... \bigr], since \big creates an Ord atom whereas \bigl and \bigr create suitable Open and Close atoms. –  Gonzalo Medina Mar 6 '11 at 15:40
    
@Gonzalo: Thanks for the tip. I've changed my answer to reflect your suggestion. Could you point me to a reference on the difference between Ord atoms and Open and Close? –  jrhorn424 Mar 7 '11 at 0:09
1  
The TeXbook. Chapter 17, page 158, for a definition and classification of atoms; Chapter 18, page 170, for spacing between atoms, and page 171 for \bigl, \bigr, \bigm, \big and spacing. –  Gonzalo Medina Mar 7 '11 at 12:46
    
@Gonzalo: I'll add those to my wishlist. Thanks! –  jrhorn424 Mar 8 '11 at 20:36

Not mentioned here is the spacing around delimiters. Compile the following example

\begin{Huge}
  \mbox{}\\
  $sin(x)cos(y)$\\
  $sin\left(x\right)cos\left(y\right)$\\
  $\sin(x)\cos(y)$\\
  $\sin\left(x\right)\cos\left(y\right)$\\
\end{Huge}

Investigating output you will certainly discover lot of interesting! From my point of view, using \left .. \right is good practise, at least, together with log-type functions.

share|improve this answer
5  
Writing sin(x) without a backslash is bad practise for sure. Moreover, note that you shouldn't use \begin{huge}. –  Hendrik Vogt Mar 6 '11 at 17:43
1  
\left and \right has their uses, but I usually advise users to be careful with their use. Often manyally scaling provide a better look. Often 'left and \right become excesive, e.g. if used inline, og around say \sum_k –  daleif Mar 6 '11 at 17:52
    
this is a really great suggestion. I hadn't noticed this issue before. –  jrhorn424 Mar 7 '11 at 0:13
    
@jrnorn424: I wrote sin without slash just to show how spacing of delemeters with simple varaibles differs from log-type functions. –  Igor Kotelnikov Mar 7 '11 at 3:20
    
So, is your point that if one commits the sin [pun intended] of writing sin instead of \sin, the sin is somewhat lessened if one uses \left and \right to size the subsequent parentheses? –  Mico Oct 26 at 20:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.