MHB How to draw large curly brackets?

  • Thread starter Thread starter alexmahone
  • Start date Start date
Click For Summary
SUMMARY

This discussion focuses on formatting piecewise functions using large curly brackets in LaTeX. The correct syntax for displaying the function "g(x) = x if x >= 0 and g(x) = -x for x < 0" is provided using the commands \texttt{\textbackslash left\{ \textbackslash begin\{array\}} and \texttt{\textbackslash begin\{cases\}}. The first method utilizes an array environment, while the second offers a more specialized cases environment for clarity and conciseness. Both methods effectively present the function across two lines.

PREREQUISITES
  • Familiarity with LaTeX syntax
  • Understanding of piecewise functions
  • Knowledge of mathematical formatting in documents
  • Experience with LaTeX environments such as array and cases
NEXT STEPS
  • Explore LaTeX documentation on the array environment
  • Learn about the cases environment in LaTeX
  • Research formatting multi-line equations in LaTeX
  • Practice creating piecewise functions in LaTeX
USEFUL FOR

Mathematicians, educators, students, and anyone involved in typesetting mathematical documents using LaTeX.

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}$
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
5K
Replies
5
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
4
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
5
Views
3K