# How to draw large curly brackets?

#### Alexmahone

##### Active member
How can I write "g(x) = x if x >= 0 and g(x) = -x for x < 0" on 2 lines using large curly brackets?

#### earboth

##### Active member
How can I write "g(x) = x if x >= 0 and g(x) = -x for x < 0" on 2 lines using large curly brackets?
If I understand your question correctly you mean (maybe) this(?):

$g(x) = \left\{ \begin{array}{rcl} x\ &if& \ x\geq 0 \\ -x\ &if& \ x<0\end{array} \right.$

#### Alexmahone

##### Active member
That's exactly what I meant. Thanks!

#### Evgeny.Makarov

##### Well-known member
MHB Math Scholar
There is also a more specialized cases environment:
$\begin{cases} x&\text{if }x\ge0\\ -x&\text{if }x<0 \end{cases}$