# Why does the $\LaTeX$ cases environment not work?

In the last few days I have twice tried to use \cases in $\LaTeX$ and gotten nowhere. Why does it not work?

Or, if it does, how does it work?

• Would you be so kind as to show how it's not working? That is, is it rendering incorrectly or just not at all? Oct 10, 2012 at 23:14
• It's rendering incorrectly. I can't get multiple lines even when I use \\ to separate them. Oct 10, 2012 at 23:18

Care to share an example, below taken from here appears to be displaying correctly for me here on meta.

\begin{equation*} |x|= \begin{cases} x & \text{if $x≥0$,} \\ -x &\text{if $x\le 0$.} \end{cases} \end{equation*}

Code used to generate this:

\begin{equation*}
|x|=
\begin{cases} x & \text{if $x≥0$,}
\\
-x &\text{if $x\le 0$.}
\end{cases}
\end{equation*}

• Well, I don't know what I was doing wrong; clearly it does work. Thanks Oct 11, 2012 at 9:52
• @PeterFlom see also meta.math.stackexchange.com/questions/5020/… which is full of goodies :) Mar 18, 2014 at 11:01