This question already has an answer here:

Sometimes in mathematics, when defining a function, I see something like

f(x) = 0 if x is even
       1 if x is odd

where an open brace is used in front of the values 0 and 1. How can I do that in LaTeX?

marked as duplicate by cmhughes, Aditya, Sean Allred, Werner, user11232 Nov 12 '13 at 3:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Take a look here: http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics#The_cases_environment, which perfectly answers your question.

Remember to include the amsmath package in your preamble: \usepackage{amsmath}

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