How to Write a System of Equations in LaTeX
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 \\.
Not sure it worked on your document? Paste it into LetX and compile it, free and in the browser.
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.
Related LaTeX fixes
Browse all LaTeX problems & fixes, or start with the LaTeX guide.
Learn the topic properly
Try the fix in LetX
Open the editor, paste your code, and compile in seconds to see the error clear. Free, in your browser.
Open LetX Free