About

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 environment is provided by the package to typeset cases (e.g. piecewise function definitions) in math. The package introduces extensions, e.g. the cases* and dcases environments.

Example usage:

\[|x| = \begin{cases}
    x,  & x \ge 0\\
    -x, & x   < 0.
\end{cases}
\]

enter image description here

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 dcases environment sets the first column in display-style math, rather than text-style math.
  • The rcases environment typesets the brace on the right, rather than the left.
  • You can combine any of these, e.g. drcases typesets the brace on the right and uses display math, and drcases* additionally sets the second column in text style.
history | excerpt history