How to Write a System of Equations in LaTeX
The fix
To write a system of equations in LaTeX, load \usepackage{amsmath}. For a single left brace grouping several equations, use the cases environment; for several separately numbered equations aligned at the equals sign, use align. Align at & and end rows with \\.
Example
\usepackage{amsmath}
% Braced system:
\[
\begin{cases}
x + y = 2 \\
x - y = 0
\end{cases}
\]
% Aligned and numbered:
\begin{align}
2x + y &= 5 \\
x - 3y &= -2
\end{align}Frequently asked questions
How do I get a left brace around the system?
Use the cases environment from amsmath — it draws the brace automatically. For a taller custom brace, use \left\{ ... \right. around an array.
Should I use align or cases?
Use cases for one braced group presented as a set; use align when each equation should sit on its own line, aligned at = and individually numbered.
Try the fix in LetX
Open the editor, paste your code, and compile in 1 second to see the error clear — free, in your browser.
Open LetX Free