How to draw large curly brackets?

  • Context:
  • Thread starter Thread starter alexmahone
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 10K views
alexmahone
Messages
303
Reaction score
0
How can I write "g(x) = x if x >= 0 and g(x) = -x for x < 0" on 2 lines using large curly brackets?
 
Physics news on Phys.org
Alexmahone said:
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. $
 
That's exactly what I meant. Thanks!
 
There is also a more specialized cases environment:
$\begin{cases}
x&\text{if }x\ge0\\
-x&\text{if }x<0
\end{cases}$