Written and maintained by CASRAI Editorial Board
Last updated
Who this is for: researchers typesetting equations in a manuscript or thesis who need to know when to use align, when to use aligned, and how to line equations up on the & marker. After reading you should be able to choose the right amsmath environment and avoid the common errors.
Short answer: aligned is the content-width variant of align. The amsmath user’s guide says gather, align and alignat produce a structure as wide as the full line, while the variants gathered, aligned and alignedat have a total width equal to their contents, so they can be used as a component inside a containing expression. Use align for a standalone block of aligned equations; use aligned inside equation or another expression, for example under a brace.
What aligned LaTeX is used for in research
Derivations, systems of equations and multi-line definitions in papers and theses need their relation symbols to line up vertically. In amsmath this is done by placing an ampersand (&) at each alignment point. Overleaf’s amsmath documentation describes the align environment as the one that aligns several equations vertically and uses & to set the points where the equations align. For line breaking inside a single long equation, see LaTeX new line in equation: split, multline, align, which does not cover aligned; this page does.
Install or access (official source only)
The environments on this page come from the amsmath package, which you load in the preamble with \usepackage{amsmath}. The amsmath documentation is the User’s Guide for the amsmath Package (version 2.1, AMS/LaTeX Project), published on CTAN at mirrors.ctan.org/macros/latex/required/amsmath/amsldoc.pdf. Overleaf’s documentation page Aligning equations with amsmath shows the same preamble line. Both were checked on 2026-11-07.
Step-by-step: align equations with align and aligned
How do I align in LaTeX?
Load amsmath, then put the equations in an align environment and mark each alignment point with &. This is the example Overleaf gives:
\usepackage{amsmath}
\begin{align*}
2x - 5y &= 8 \\
3x + 9y &= -12
\end{align*}
- Add
\usepackage{amsmath}to the preamble. - Open
\begin{align}(or\begin{align*}for no numbers; Overleaf notes that the asterisk toggles equation numbering). - Write each equation, putting
&at the point that should line up, usually just before the relation symbol. The amsmath guide states that in the alignment structures (split,alignand variants) relation symbols have an&before them but not after. - End each row with
\\except the last, and close the environment. When numbering is on, each row can be labelled individually (Overleaf).
How to use aligned inside another expression
The amsmath guide’s own example puts aligned inside equation* with a right brace and a text label:
\begin{equation*}
\left.\begin{aligned}
B'&=-\partial\times E, \\
E'&=\partial\times B - 4\pi j,
\end{aligned}
\right}
\qquad \text{Maxwell's equations}
\end{equation*}
This is the case align cannot handle: the guide notes that, because align takes the full line width, one cannot readily add parentheses around the entire structure.
align vs aligned: what is the difference?
align is a top-level display environment that fills the line width; aligned shrinks to its contents and sits inside a containing expression such as equation. The table pairs each full-width environment with its content-width variant, as described in the amsmath user’s guide (version 2.1).
| Full line width | Content width (usable inside an expression) | Note from the sources |
|---|---|---|
align |
aligned |
Multiple & alignment columns. |
gather |
gathered |
Overleaf describes gather as centred with no alignment whatsoever. |
alignat |
alignedat |
alignat allows the horizontal space between equations to be controlled. |
split (used inside another display environment) |
aligned or alignedat when more than one column is needed |
split supports only one alignment (&) column. |
Output and how to read it
Each & becomes a vertical alignment point across rows. With align the block spans the line width, and with numbering on every row can carry its own number or label; with align* there are no numbers. With aligned the block is only as wide as its widest content, so it can be wrapped in braces or combined with a side label as in the Maxwell example. Because flalign (“full length alignment”) stretches the space between equation columns to the maximum possible width, it changes the spacing between columns rather than the alignment point itself.
Troubleshooting
- Misplaced
&: place it before the relation symbol, not after it (amsmath guide). - Need two alignment columns inside
split:splitsupports only one, so usealignedoralignedat(amsmath guide).splitmust be used inside an equation environment (Overleaf). - The equation will not break across pages: the amsmath guide lists
split,aligned,gatheredandalignedatas environments that wrap their contents in an unbreakable box, so neither\displaybreaknor\allowdisplaybreakshas any effect on them. - Unwanted space at the left of an
alignedblock: amsmath has package optionsalignedleftspaceyes,alignedleftspacenoandalignedleftspaceyesifnegthat control the space to the left ofalignedandgathered(amsmath guide).
Free alternatives: related amsmath environments
All of these are part of amsmath, which is free to use.
| Environment | What the sources say it does |
|---|---|
align |
Aligns several equations vertically at & (Overleaf). |
aligned |
Content-width version of align for use in a containing expression (amsmath guide). |
split |
Breaks one equation and aligns it in a single column; must be used inside an equation environment (Overleaf, amsmath guide). |
gather |
Centred equations with no alignment (Overleaf). |
alignat |
Like align but lets you control the horizontal space between equations (amsmath guide). |
flalign |
Stretches the space between equation columns to the maximum possible width (amsmath guide). |
For other structured math, see matrix in LaTeX: pmatrix, bmatrix and more, and for finishing a proof see end of proof symbol in LaTeX. If you write with co-authors, LaTeX and Overleaf collaborative writing covers the workflow, and LaTeX bibliography styles explained covers citations. More manuscript-formatting help sits in the scholarly writing hub.
FAQ
How to align right in LaTeX?
In amsmath the alignment point is wherever you place the ampersand (&), so the position of & decides what lines up (Overleaf). The flalign environment stretches the space between equation columns to the maximum possible width (amsmath guide); it changes the spacing between columns, not the alignment point.
What is the difference between align and aligned in LaTeX?
align spans the full line width as a standalone display environment; aligned is only as wide as its contents and is meant to be nested inside another expression (amsmath user’s guide, version 2.1).
What is the symbol ∈ in LaTeX?
The symbol ∈ is typed \in in math mode. Overleaf’s list of Greek letters and math symbols lists \in and \notin under binary operation and relation symbols. In mathematics, ∈ denotes membership of a set, as in x ∈ A.
What is a LaTeX aligned equation?
It is a block of equation rows lined up on & markers using align (full width) or aligned (content width, nested in another expression).
Sources
- AMS/LaTeX Project, User’s Guide for the amsmath Package, version 2.1 (1999-12-13): mirrors.ctan.org/macros/latex/required/amsmath/amsldoc.pdf, checked 2026-11-07.
- Overleaf, Aligning equations with amsmath: overleaf.com/learn/latex/Aligning_equations_with_amsmath, checked 2026-11-07.
- Overleaf, List of Greek letters and math symbols: overleaf.com/learn/latex/List_of_Greek_letters_and_math_symbols, checked 2026-11-07.







