Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How do I typeset something like, X = 0 if a=1, 1 otherwise, using those huge left braces and specifying each condition in a line?

share|improve this question

2 Answers 2

up vote 23 down vote accepted

The »cases« environment from amsmath does the trick.


      0, & \text{if}\ a=1 \\
      1, & \text{otherwise}
share|improve this answer
x = \begin{cases}
  0, & \text{if } a = 1, \\
  1, & \text{otherwise}.

amsmath is needed for \text.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.