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?
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?
There are in fact four important differences:
\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.\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.\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.\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.\left( (in #4 in Philipp's answer).
– Hendrik Vogt
Mar 06 '11 at 17:47
\sin(x) without \left and \right.
– Hendrik Vogt
Mar 06 '11 at 17:54
( 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 06 '11 at 18:19
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 .
\(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 06 '11 at 15:33
( with \left(, the spacing is different.
– Philipp
Mar 06 '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.
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.
sin(x) without a backslash is bad practise for sure. Moreover, note that you shouldn't use \begin{huge}.
– Hendrik Vogt
Mar 06 '11 at 17:43
\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 06 '11 at 17:52
sin instead of \sin, the sin is somewhat lessened if one uses \left and \right to size the subsequent parentheses?
– Mico
Oct 26 '14 at 20:08