How to draw large curly brackets?

  • Context: MHB 
  • Thread starter Thread starter alexmahone
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around formatting mathematical expressions, specifically how to represent a piecewise function using large curly brackets in LaTeX. The focus is on the presentation of the function g(x) defined differently based on the value of x.

Discussion Character

  • Technical explanation

Main Points Raised

  • One participant asks how to write the piecewise function "g(x) = x if x >= 0 and g(x) = -x for x < 0" on two lines using large curly brackets.
  • Another participant provides a LaTeX code snippet that formats the function using large curly brackets and a specific array structure.
  • A third participant confirms that the provided solution meets their needs.
  • A later reply introduces an alternative method using a specialized cases environment in LaTeX for the same piecewise function.

Areas of Agreement / Disagreement

Participants appear to agree on the methods presented for formatting the piecewise function, with no significant disagreement noted.

Contextual Notes

None noted.

Who May Find This Useful

Individuals interested in typesetting mathematical expressions, particularly in LaTeX, may find this discussion beneficial.

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
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
5
Views
3K