FANDOM


The cases environment renders multiple lines with an extensible left curly-brace. It can be used for piecewise-defined functions. For this to work, you must have \usepackage{amsmath} in the preamble.


LaTeX markup... ...results in: ...is used for:
f(n) = \begin{cases} n/2 &\mbox{if } n \equiv 0 \\
(3n +1)/2 & \mbox{if } n \equiv 1 \end{cases} \pmod{2}.
$ f(n) = \begin{cases} n/2 &\mbox{if } n \equiv 0 \\ (3n +1)/2 & \mbox{if } n \equiv 1 \end{cases} \pmod{2}. $ function defined piecewise