Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical Supply Distributor100,000+ medical supplies. 48-hour critical dispatch.Ships from 8 regional U.S. hubs. Net-30 terms for verified institutional accounts.Shop lac.us CodeCASRAIlac.us

Aligned in LaTeX: align vs aligned in amsmath

How align and aligned differ in amsmath, how to place the & marker, and how to fix common errors, with the in symbol explained.

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*}
  1. Add \usepackage{amsmath} to the preamble.
  2. Open \begin{align} (or \begin{align*} for no numbers; Overleaf notes that the asterisk toggles equation numbering).
  3. 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, align and variants) relation symbols have an & before them but not after.
  4. 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: split supports only one, so use aligned or alignedat (amsmath guide). split must be used inside an equation environment (Overleaf).
  • The equation will not break across pages: the amsmath guide lists split, aligned, gathered and alignedat as environments that wrap their contents in an unbreakable box, so neither \displaybreak nor \allowdisplaybreaks has any effect on them.
  • Unwanted space at the left of an aligned block: amsmath has package options alignedleftspaceyes, alignedleftspaceno and alignedleftspaceyesifneg that control the space to the left of aligned and gathered (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

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Aligned in LaTeX: align vs aligned in amsmath

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →