Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
In LaTeX scientific publishing, dissertation formatting, and mathematical manuscript preparation, the flalign (“full-length align”) environment provided by the American Mathematical Society’s amsmath package typesets multi-line and multi-column mathematical equations that stretch horizontally across the full line width of the text column. Unlike the standard align environment, which centers equation blocks between margins, flalign expands the elastic space between equation columns so that the outermost elements anchor flush against the left and right page margins.
This guide explains how to format multi-column derivations, force individual equations flush-left using trailing ampersands, suppress and customize line numbers with flalign* and \tag, and resolve common compiler diagnostics. For centered multi-line displays, see our guides on aligned in LaTeX and multiline equations in LaTeX.
What it is used for in research
In academic writing across mathematics, physics, engineering, and quantitative social sciences, equation layouts must balance typographic clarity with strict journal page-budget constraints. The flalign environment serves several distinct structural functions in research manuscripts:
- Full-width multi-column equation arrays: When presenting systems of interrelated equations—such as state-space equations, coordinate transformations, or systems of differential equations—researchers often place multiple formulas on the same line.
flaligndistributes these equation pairs evenly across the text column, maximizing page space. - Margin-anchored conditions and annotations: Manuscripts frequently require a mathematical formula on the left margin paired with a domain restriction, statistical assumption, or step justification anchored flush against the right margin (for example, stating
\forall x \in \mathbb{R}or citing a lemma).flalignpushes these annotations to the opposite margin without manual spacing commands. - Flush-left derivations in centered papers: Most academic journals center displayed math by default. However, when an author needs a specific multi-step proof or piecewise derivation to align flush with the left text margin without altering global document settings via align LaTeX left options,
flalign*provides a self-contained, block-level solution. - Managing wide formulas within column widths: In two-column research formats (such as IEEE, ACM, or Elsevier conference proceedings), horizontal margins are constrained. Using
flalignallows authors to utilize the full available LaTeX linewidth, preventing wide expressions from causing overfull horizontal boxes.
How to install or access it
The flalign environment is part of the American Mathematical Society’s amsmath package suite, which is included in all standard TeX distributions maintained by the TeX Users Group (TUG):
- TeX Live (Comprehensive TeX System): The official multi-platform distribution maintained by TUG (tug.org/texlive) for Linux, macOS (MacTeX), and Windows. TeX Live bundles the required LaTeX math collection by default.
- MiKTeX: An open-source TeX distribution for Windows, macOS, and Linux (miktex.org) featuring automated on-the-fly package installation.
- Overleaf: An online collaborative cloud LaTeX authoring platform (overleaf.com) that operates TeX Live cloud compilers without requiring local installation.
To use flalign in your research paper, load the amsmath package in your document preamble before \begin{document}:
\usepackage{amsmath}
If your manuscript also uses advanced mathematical symbols, calligraphic characters, or blackboard bold fonts, load amssymb alongside amsmath:
\usepackage{amsmath}
\usepackage{amssymb}
Step-by-step task
Follow these procedures to typeset full-length aligned equations, format dual-margin proofs, and control line numbers in LaTeX.
1. Load the amsmath package
Create a minimal working document and ensure amsmath is declared in the preamble:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
% Equations will be placed here
\end{document}
2. Typeset a basic full-length multi-column equation
To place multiple aligned equations side by side across the entire page width, separate each equation column with an ampersand (&) and end each row with a double backslash (\\):
\begin{flalign}
a &= b & c &= d & e &= f \\
a' &= b' & c' &= d' & e' &= f'
\end{flalign}
In amsmath, alignment columns are processed in alternating pairs of right-aligned and left-aligned components. For k column pairs, exactly 2k – 1 ampersands are placed on each row. The flalign environment stretches the space between these columns to fill the full text width, while leaving sufficient margin room for the automatic equation numbers on the right.
3. Push equations flush against the left margin
If you want a single equation or a column of equations to sit strictly against the left page margin in an otherwise centered document, use the unnumbered flalign* environment with a leading and a trailing ampersand:
\begin{flalign*}
& f(x) = \alpha x^2 + \beta x + \gamma & \\
& g(x) = 2\alpha x + \beta &
\end{flalign*}
The leading ampersand (&) places the formula at the start of the first alignment column, while the trailing ampersand (&) creates an empty second column. Because flalign stretches the inter-column space to the maximum possible width, all elastic whitespace is pushed to the right, locking the mathematical expressions flush against the left text margin.
4. Format side-by-side equations with right-anchored conditions
Research papers frequently require an equation anchored on the left margin paired with a textual note or condition anchored on the right margin. Use double ampersands (&&) to jump to the rightmost column pair, and wrap prose in \text{...}:
\begin{flalign}
& \nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0} && \text{Gauss's Law} \label{eq:gauss} \\
& \nabla \cdot \mathbf{B} = 0 && \text{Gauss's Law for Magnetism} \label{eq:gauss_mag}
\end{flalign}
This syntax positions Maxwell’s equations on the left text boundary while placing the descriptive names flush against the right margin, directly adjacent to the equation numbers.
5. Control equation numbering, tags, and cross-references
Manage numbering and equation labels across your derivations using amsmath control commands:
- Unnumbered blocks: Use
\begin{flalign*} ... \end{flalign*}to suppress numbering across all lines in the environment. - Selective line suppression: In a numbered
flalignblock, insert\notagimmediately before the newline command (\\) on lines that should not receive an equation number. - Custom equation tags: Override the automatic counter with
\tag{label}(which prints parentheses, e.g.,(A.1)) or\tag*{label}(which prints literal text without parentheses). - Referencing: Attach a
\label{key}to any numbered line and cite it in the manuscript text using\eqref{key}. For detailed referencing rules, consult our guide on equation label in LaTeX.
\begin{flalign}
E &= mc^2 \label{eq:einstein} \\
p &= \hbar k \notag \\
S &= k_B \ln \Omega \tag{Boltzmann} \label{eq:entropy}
\end{flalign}
Output and how to read it
When LaTeX compiles a document containing flalign, it calculates the horizontal bounding box for the entire math display and sets spacing according to specific structural rules:
- Left margin positioning: The first column aligns flush with the left margin (indentation of
0pt). If an equation has a leading ampersand (& f(x)), the left-hand symbol begins directly at the margin line. - Dynamic inter-column glue: Unlike
align, which uses a fixed horizontal gap between equation pairs,flalignconverts inter-column space into stretchable glue (similar to\hfill). This glue expands evenly across all column gaps to ensure the array spans 100% of the printable width. - Equation number margin reserve: If equation numbers are active (or if custom tags are set via
\tag), LaTeX reserves horizontal space at the right margin (or left margin if theleqnoclass option is set). The rightmost equation column will stretch only until it meets this reserved boundary, preventing text-number collisions.
To verify the visual output in your compiled PDF, confirm that expressions do not overlap with line numbers. If a row contains an exceptionally wide formula and multiple columns, LaTeX may be forced to place the equation number on a separate line below the math to prevent collision.
Troubleshooting
Diagnose and resolve the four most frequent compilation issues encountered when using flalign:
1. Environment flalign undefined
Error message: ! LaTeX Error: Environment flalign undefined.
Cause: The document attempted to open \begin{flalign} without loading the amsmath package in the preamble.
Fix: Add \usepackage{amsmath} to your document preamble before \begin{document}.
2. Paragraph ended before flalign was complete
Error message: ! Paragraph ended before \flalign was complete.
Cause: An empty line was left inside the flalign or flalign* block. In LaTeX, display math environments do not permit blank lines (which signify paragraph breaks).
Fix: Remove the blank line. If you need visual separation in your TeX source code, use a comment line containing only a percent sign (%). For vertical spacing in the compiled PDF, add an optional length to the line break, such as \\[6pt].
3. flalign centers instead of aligning flush left
Symptom: The equation block appears centered on the page rather than flush with the left text margin.
Cause: The single equation row is missing a trailing ampersand. With only one column defined and no secondary column anchor, flalign behaves identically to a centered display.
Fix: Insert an ampersand before the equation and an extra trailing ampersand at the end of each row: & y = mx + b & \\. The trailing ampersand instantiates an empty column on the right, forcing all elastic space to the right side of the page.
4. Package amsmath Error: Multiple \tag
Error message: Package amsmath Error: Multiple \tag.
Cause: More than one \tag command was placed on a single row of the equation array.
Fix: Ensure each row contains at most one \tag{...} or \tag*{...} declaration, positioned immediately before the newline command (\\) or the closing \end{flalign}.
Free alternatives
Compare standard amsmath display math environments to determine which alignment structure best suits your research manuscript:
| Environment or Command | Package Source | Horizontal Spacing Behavior | Equation Numbering | Primary Research Use Case |
|---|---|---|---|---|
flalign / flalign* |
amsmath |
Stretches columns to fill full line width; outer elements flush with margins | Each row numbered; suppressed with * or \notag |
Multi-column equation arrays spanning full page width, or single derivations forced flush left |
align / align* |
amsmath |
Centers the equation block as a unified group; fixed gap between column pairs | Each row numbered; suppressed with * or \notag |
Standard multi-line mathematical proofs and derivations sharing a common relation symbol |
alignat / alignat* |
amsmath |
Explicit horizontal spacing between column pairs; takes explicit column-count argument | Each row numbered; suppressed with * or \notag |
Systems of equations requiring custom, tight, or zero-width inter-column spacing |
gather / gather* |
amsmath |
Centers each equation line independently; no horizontal column alignment | Each row numbered; suppressed with * or \notag |
Consecutive related formulas that do not share an equal sign or alignment anchor |
split |
amsmath (subordinate) |
Inherits container width; aligns around ampersand within a single equation number | Single equation number for entire block | A single long formula broken across multiple lines inside an equation or gather block |
fleqn class option |
LaTeX2e Kernel | Forces all displayed formulas in the document flush left with indent \mathindent |
Standard numbering | Global manuscript formatting required by specific journal styles (e.g., IEEE, ACM) |
FAQ
What is the difference between align and flalign in LaTeX?
The standard align environment centers the entire block of aligned equations horizontally between the margins and maintains a fixed space between column pairs. In contrast, flalign (“full-length align”) stretches the space between equation columns to the maximum possible width, forcing the outermost columns to sit flush against the left and right page margins.
How do I make flalign flush left without centering?
To make a single equation or derivation align strictly against the left margin, place an ampersand (&) at the start of your formula and an extra trailing ampersand (&) at the end of each row before the newline (\\). The trailing ampersand creates an empty right-hand column that absorbs all stretchable glue, anchoring the formula to the left boundary.
How do I hide equation numbers in flalign?
To suppress equation numbers across the entire block, use the starred variant \begin{flalign*} ... \end{flalign*}. To hide the number on a specific individual line within a numbered flalign environment, insert the command \notag before the row break (\\).
Can I use flalign inside an equation or subequations block?
You can enclose flalign within a \begin{subequations} ... \end{subequations} environment to give each line a sub-lettered number (such as 1a, 1b). However, you cannot nest flalign inside an equation environment; flalign is a standalone top-level display math environment.
Why does flalign require trailing ampersands?
In amsmath, alignment columns are parsed in pairs of right-aligned and left-aligned components. When you write a formula without a trailing ampersand, LaTeX sees only one column pair and distributes the margin space equally on both sides. Adding a trailing ampersand informs LaTeX that a second column exists, prompting the layout engine to place all expansion glue between the two columns.
Sources
- American Mathematical Society. User’s Guide for the amsmath Package (Version 2.1). Comprehensive TeX Archive Network (CTAN): ctan.org/pkg/amsmath. Direct documentation: latex-project.org/help/documentation/amsldoc.pdf. Verified 2026-11-08.
- TeX Users Group (TUG). TeX Live: Comprehensive TeX System. URL: tug.org/texlive/. Verified 2026-11-08.
- Overleaf Documentation. Aligning equations with amsmath. URL: overleaf.com/learn/latex/Aligning_equations_with_amsmath. Verified 2026-11-08.







