Skip to main content
Building on the math basics, this guide covers advanced equation formatting, multi-line equations, alignment, and professional mathematical typesetting.
Prerequisites: Familiarity with basic math mode ($...$ and \[...\]). See our Mathematics Basics guide if needed.Related topics: Mathematical symbols | Text formatting in math | Cross-referencing equations

Single Equations

Basic Display Equations

Equation Numbering Control

Multi-line Equations

Split Environment

For single equations that are too long:

Multline Environment

For very long single equations:

Aligned Equations

Align Environment

The most versatile environment for multiple equations:

Aligned Within Equation

Equation Arrays

Eqnarray (Deprecated)

Note: eqnarray is deprecated. Use align instead. Shown here for reference only.

Array Environment

For complex layouts:

Cases and Piecewise Functions

Cases Environment

Gathered and Centered Equations

Advanced Alignment

Complex Alignment Patterns

Intertext and Shortintertext

Boxed and Highlighted Equations

Equation Spacing

Manual Spacing in Equations

How to Turn Off Equation Auto Numbering

Every equation, align and gather environment numbers its output automatically. To remove the number, use the starred form of the environment:
  • \begin{equation*} ... \end{equation*} for a single unnumbered equation
  • \begin{align*} ... \end{align*} for unnumbered aligned equations
  • \[ ... \] for a quick unnumbered display
The starred environments need amsmath, which you almost certainly already load. To suppress the number on one line inside a numbered environment, put \nonumber (or \notag) before the line break: x + y &= z \nonumber \\ To stop numbering for a whole document, load amsmath and use the starred forms throughout — there is no global switch, and redefining the equation counter causes more problems than it solves.

Best Practices

Equation guidelines:
  1. Consistency: Use the same alignment style throughout
  2. Readability: Don’t over-align; prioritize clarity
  3. References: Label important equations for cross-referencing
  4. Spacing: Use \, before differentials in integrals
  5. Breaking: Break long equations at operators (+, -, =)
  6. Grouping: Use subequations for related equations

Common Patterns

System of Equations

Derivations

Quick Reference


Next: Explore Mathematical symbols for a comprehensive guide to mathematical notation in LaTeX.