System of equations in LaTeX
A system of equations with a brace on the left is written with the cases environment from amsmath. The same environment is used for piecewise functions; put the condition text inside \text.
Two equations
\begin{cases} x + y = 5 \\ 2x - y = 1 \end{cases}Piecewise function
|x| = \begin{cases} x & \text{if } x \ge 0 \\ -x & \text{if } x < 0 \end{cases}Common mistakes
- Gluing a brace together from \{ and array: the brace does not grow with the number of equations.
- The word "if" without \text: it is set in italics as two variables.
See also
Don't want to memorize commands?
Draw a formula or paste a screenshot, and CamteX turns it into ready LaTeX.