How can I write an equation with one curly brace ({
), and on the right-hand side next to the curly, two statements in two different lines?

- 3,666
- 9
- 25
- 39

- 4,791
- 10
- 40
- 56
-
6Why is this question in stackoverflow rather than in tex.stackexchange ? Though it is answered there: http://tex.stackexchange.com/questions/9065/large-braces-for-specifying-values-of-variables-by-condition – Vincent Fourmond Jan 15 '17 at 14:28
6 Answers
You can try the cases
env in amsmath.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
f(x)=\begin{cases}
1, & \text{if $x<0$}.\\
0, & \text{otherwise}.
\end{cases}
\end{equation}
\end{document}
-
3@Lucho Is it possible to have two different numbers to these two equations on the right? – MLT Jan 07 '14 at 15:23
That can be achieve in plain LaTeX without any specific package.
\documentclass{article}
\begin{document}
This is your only binary choices
\begin{math}
\left\{
\begin{array}{l}
0\\
1
\end{array}
\right.
\end{math}
\end{document}
This code produces something which looks what you seems to need.
The same example as in the @Tombart can be obtained with similar code.
\documentclass{article}
\begin{document}
\begin{math}
f(x)=\left\{
\begin{array}{ll}
1, & \mbox{if $x<0$}.\\
0, & \mbox{otherwise}.
\end{array}
\right.
\end{math}
\end{document}
This code produces very similar results.

- 1,049
- 11
- 11
-
2This solution gives an output identycal to the `cases` environment of `amsmath`, except for a slightly smaller curly brace, which sometimes can be an advantage. – mmj Jan 27 '16 at 10:44
To answer also to the comment by @MLT, there is an alternative to the standard cases
environment, not too sophisticated really, with both lines numbered. This code:
\documentclass{article}
\usepackage{amsmath}
\usepackage{cases}
\begin{document}
\begin{numcases}{f(x)=}
1, & if $x<0$\\
0, & otherwise
\end{numcases}
\end{document}
produces
Notice that here, math must be delimited by \(...\)
or $...$
, at least on the right of &
in each line (reference).

- 6,455
- 5
- 45
- 52
-
1So numcases is basically an extension to cases? That's very useful! – Zelphir Kaltstahl Feb 25 '16 at 13:45
Are you looking for
\begin{cases}
math text
\end{cases}
It wasn't very clear from the description. But may be this is what you are looking for http://en.wikipedia.org/wiki/Help:Displaying_a_formula#Continuation_and_cases

- 2,578
- 18
- 18
-
As @Lucho indicated you need \usepackage{amsmath}, but I assume you are using it anyways. The packages amsmath, amssymb and amsthm are hard to do without when typesetting math. – srean Oct 26 '10 at 20:10
Or this:
f(x)=\begin{cases}
0, & -\pi\leqslant x <0\\
\pi, & 0 \leqslant x \leqslant +\pi
\end{cases}

- 17,750
- 17
- 113
- 128
-
6
-
1This uses the cases package. Which is described in better detail provided by @MattAllegro. – lilott8 Oct 11 '19 at 21:40
Here is a way to manually control the size of brace, if cases
or \left\{
doesn't provide suitable brace size you want.
\begin{math}
\biggl\{
\begin{array}{l}
statement1\\
statement2
\end{array}
\end{math}
You can choose among \bigl\{
\Bigl\{
\biggl\{
\Biggl\{
to adjust brace size from the smallest to the largest.
From left to right: cases
\left\{
biggl\{
Bigl\{

- 1