Brackets, such as braces and parentheses, are used to group expressions. Without them it would be a good deal more difficult to understand complicated mathematical expressions.
When working with complicated expressions, it is important for the
brackets to expand to match the size of whatever they contain. In
LaTeX, the way to do that is with matching \left( and
\right) commands. (You can use |, {, }, [, and ] instead of
parentheses. Remember that since braces are used to group in
LaTeX, we have to use \{ and \}.)
Since every \left
needs a matching \right, it is important to have null commands
\left. and \right. which do nothing. Here are some
examples:
$$
\left(
\begin{array}{cc}
1&2\\
3&4\\
\end{array}
\right)
$$
produces
while
$$
|x| =
\left\{
\begin{array}{lr}
-x&x\le 0\\
x&x\ge 0
\end{array}
\right.
$$
produces
Practice: Construct a document containing the following expression: