Extra \right
This error happens when typesetting math if the \right command is used but the corresponding \left is missing. This article talks about common causes of this error and how to fix them.
Brief introduction to the \left
and \right
commands
The \left
and \right
commands typeset dynamically-sized delimiters and must be used together, within mathematical material, in the form
\[\verb'\left'\thinspace\textit{delim}_{\thinspace\text{L}}\quad\textit{math expression}\quad \verb'\right'\thinspace\textit{delim}_{\thinspace\text{R}}\]
where \(\textit{delim}_{\thinspace\text{L}}\) and \(\textit{delim}_{\thinspace\text{R}}\) are delimiters used to enclose your \(\textit{math expression}\). Typically, \(\textit{delim}_{\thinspace\text{L}}\) and \(\textit{delim}_{\thinspace\text{R}}\) are one of the characters () [] | \| \{ \}
or the dot ‘.
’, which is used as a “blank delimiter”.
Example
Here is an example using \left
and \right
to typeset parentheses which fully enclose a fraction:
\[
\left(\frac{x}{y} \right)
\]
This code produces \[\left(\frac{x}{y}\right)\]
If you don’t use the \left
and \right
commands when placing delimiters, including parentheses, those delimiters will not fully enclose the mathematical expression; for example, writing
\[
(\frac{x}{y})
\]
produces this
\[(\frac{x}{y})\]
Causes of this error and some solutions
Forgetting to include a \left
command
This error typically arises when writing a \right
command but forgetting to include the corresponding \left
, as shown in the example below:
\[
\pi =
( \int_{-\infty}^{+\infty} e^{-x^2} dx \right)
\]
Open this error-generating example in Overleaf
This example generates the following error:
Add the missing \left
to fix this error by writing
\[
\pi =
\left( \int_{-\infty}^{+\infty} e^{-x^2} dx \right)
\]
which produces the following output
\[ \pi = \left( \int_{-\infty}^{+\infty} e^{-x^2} dx \right) \]
Using a blank delimiter
If you would like to typeset a \right
delimiter only, use a ‘.
’ character as the \left
delimiter by writing \left.
, which does not typeset a delimiter character. The following example uses a .
delimiter within an aligned
environment provided by the amsmath
package:
\documentclass{article}
\usepackage{amsmath} % Required to use the aligned environment
\begin{document}
\[
\left.\begin{aligned}
dF &= 0,\\
d^{\dagger} F &= 0,
\end{aligned}
\ \right\}
\qquad \text{Maxwell's equations}
\]
\end{document}
This example typesets the following expression:
\[\left.\begin{aligned} dF &= 0,\\d^{\dagger} F &= 0,\end{aligned}\ \right\}\qquad \text{Maxwell's equations}\]
Overleaf guides
- Creating a document in Overleaf
- Uploading a project
- Copying a project
- Creating a project from a template
- Using the Overleaf project menu
- Including images in Overleaf
- Exporting your work from Overleaf
- Working offline in Overleaf
- Using Track Changes in Overleaf
- Using bibliographies in Overleaf
- Sharing your work with others
- Using the History feature
- Debugging Compilation timeout errors
- How-to guides
- Guide to Overleaf’s premium features
LaTeX Basics
- Creating your first LaTeX document
- Choosing a LaTeX Compiler
- Paragraphs and new lines
- Bold, italics and underlining
- Lists
- Errors
Mathematics
- Mathematical expressions
- Subscripts and superscripts
- Brackets and Parentheses
- Matrices
- Fractions and Binomials
- Aligning equations
- Operators
- Spacing in math mode
- Integrals, sums and limits
- Display style in math mode
- List of Greek letters and math symbols
- Mathematical fonts
- Using the Symbol Palette in Overleaf
Figures and tables
- Inserting Images
- Tables
- Positioning Images and Tables
- Lists of Tables and Figures
- Drawing Diagrams Directly in LaTeX
- TikZ package
References and Citations
- Bibliography management with bibtex
- Bibliography management with natbib
- Bibliography management with biblatex
- Bibtex bibliography styles
- Natbib bibliography styles
- Natbib citation styles
- Biblatex bibliography styles
- Biblatex citation styles
Languages
- Multilingual typesetting on Overleaf using polyglossia and fontspec
- Multilingual typesetting on Overleaf using babel and fontspec
- International language support
- Quotations and quotation marks
- Arabic
- Chinese
- French
- German
- Greek
- Italian
- Japanese
- Korean
- Portuguese
- Russian
- Spanish
Document structure
- Sections and chapters
- Table of contents
- Cross referencing sections, equations and floats
- Indices
- Glossaries
- Nomenclatures
- Management in a large project
- Multi-file LaTeX projects
- Hyperlinks
Formatting
- Lengths in LaTeX
- Headers and footers
- Page numbering
- Paragraph formatting
- Line breaks and blank spaces
- Text alignment
- Page size and margins
- Single sided and double sided documents
- Multiple columns
- Counters
- Code listing
- Code Highlighting with minted
- Using colours in LaTeX
- Footnotes
- Margin notes
Fonts
Presentations
Commands
Field specific
- Theorems and proofs
- Chemistry formulae
- Feynman diagrams
- Molecular orbital diagrams
- Chess notation
- Knitting patterns
- CircuiTikz package
- Pgfplots package
- Typesetting exams in LaTeX
- Knitr
- Attribute Value Matrices
Class files
- Understanding packages and class files
- List of packages and class files
- Writing your own package
- Writing your own class