The {cases} environment is provided by the {amsmath} package to typeset cases in math. The {mathtools} package introduces extensions, e.g. the cases* and dcases environments.
The cases environment is provided by the amsmath package to typeset cases (e.g. piecewise function definitions) in math. The mathtools package introduces extensions, e.g. the cases* and dcases environments.
Example usage:
\[|x| = \begin{cases}
x, & x \ge 0\\
-x, & x < 0.
\end{cases}
\]
In addition to the cases environment, there are several related environments made available by the mathtools package.
- The
cases*environment, in which the second column is set in text mode rather than math mode. - The
dcasesenvironment sets the first column in display-style math, rather than text-style math. - The
rcasesenvironment typesets the brace on the right, rather than the left. - You can combine any of these, e.g.
drcasestypesets the brace on the right and uses display math, anddrcases*additionally sets the second column in text style.
