# Math mode, gathering terms using braces

How do I produce a result like this without resorting to using a table? to the left of the braces is the result of a function, to the right are the terms (left column) with the conditions (right column)

-

One approach is with the cases environment from amsmath:

\documentclass{article}
\usepackage{amsmath}
\newcommand{\bla}{\mathit{bla}}
\begin{document}
$\bla = \begin{cases} \bla, & n < 0\\ \bla^2. & n = 0\\ \bla^{-1}, & n > 0. \end{cases}$
\end{document}


There are a few different environments you can use here:

• cases sets both columns in text-style math mode.
• cases* from the mathtools package sets the first column in math mode, and the second column in text mode.
• dcases (also from mathtools) uses display-style math instead. This is useful if one of your definitions has an integral or a fraction in it.
• Finally, dcases* (also from mathtools) sets the first column in display-style math, and the second in text mode.
-

This is a case (pun ;-) for one of the various cases environments, e.g. dcases from mathtools or just cases (already in amsmath)

The relevant text should be put in proper \text{...} command, but this has been omitted here

I used dcases for nicer display (d stands for displaymath here)

\documentclass{article}
\usepackage{mathtools}
\begin{document}

$f = \begin{dcases} a & bla \\ c & blabla \\ e & blabla \\ \end{dcases}$
\end{document}


-