Mathematical Typesetting
How to Align Equations in LaTeX
When you have multiple related equations, aligning them at the equals sign makes them easier to read. The align environment from amsmath handles this.
Basic align Environment
Use & to mark alignment points and \\ for new lines:
\usepackage{amsmath}
\begin{align}
x + y &= 5 \\
2x - y &= 1
\end{align}Without Equation Numbers
Use align* to suppress numbering:
\begin{align*}
a^2 + b^2 &= c^2 \\
E &= mc^2
\end{align*}Multiple Alignment Points
Add text or multiple alignments:
\begin{align*}
x &= 2 & y &= 3 \\
z &= 5 & w &= 7
\end{align*}Align with Explanation
Add text explanations to equations:
\begin{align*}
x + 2 &= 5 & &\text{(given)} \\
x &= 3 & &\text{(subtract 2)}
\end{align*}💡 Tips
- •Always place & before the = sign for consistent alignment
- •Use \nonumber on specific lines to suppress just that equation's number
- •For single equations, use equation or equation* instead
Try This in Bibby AI
Write LaTeX faster with AI auto-complete and instant compilation.
Start Writing Free