> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/latex-errors/06-extra-right.md).

# 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](#using-a-blank-delimiter)”.

### Example

Here is an example using `\left` and `\right` to typeset parentheses which fully enclose a fraction:

```latex
\[
  \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

```latex
\[
  (\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:

```latex
\[
\pi =
( \int_{-\infty}^{+\infty} e^{-x^2} dx \right)
\]
```

[Open this **error-generating** example in Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+demonstrating+a+missing+delimiter\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%5B+%0A%5Cpi+%3D+%0A%28+%5Cint_%7B-%5Cinfty%7D%5E%7B%2B%5Cinfty%7D+e%5E%7B-x%5E2%7D+dx+%5Cright%29%0A%5C%5D%0A%5Cend%7Bdocument%7D)

This example generates the following error:

![An image to demonstrate a missing delimiter on LaTeX](/files/sdk9ye1lZ4f5pqBNmtqU)

Add the missing `\left` to fix this error by writing

```latex
\[
\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:

```latex
\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}
```

[Open this example in Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Using+the+dot+delimiter\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamsmath%7D+%25+Required+to+use+the+aligned+environment%0A%0A%5Cbegin%7Bdocument%7D%0A%5C%5B%0A+%5Cleft.%5Cbegin%7Baligned%7D%0A++++++++dF+%26%3D+0%2C%5C%5C%0A++++++++d%5E%7B%5Cdagger%7D+F+%26%3D+0%2C%0A+++++++%5Cend%7Baligned%7D%0A%5C+%5Cright%5C%7D%0A+%5Cqquad+%5Ctext%7BMaxwell%27s+equations%7D%0A%5C%5D%0A%5Cend%7Bdocument%7D)

This example typesets the following expression:

$$\left.\begin{aligned} dF &= 0,\d^{\dagger} F &= 0,\end{aligned}\ \right}\qquad \text{Maxwell's equations}$$


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/latex-errors/06-extra-right.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
