> ## Documentation Index
> Fetch the complete documentation index at: https://resources.latex-cloud-studio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LaTeX Brackets and Parentheses: \left, \right, \big, braces, and large brackets

> Use parentheses, square brackets, curly braces, \left and \right, and manual sizing commands like \big in LaTeX. Includes common fixes.

Use `( )` for ordinary parentheses, `[ ]` for square brackets, and `\{ \}` for curly braces. Use `\left ... \right` when the bracket should grow with the expression, and use `\big`, `\Big`, `\bigg`, or `\Bigg` when you want manual control over bracket size.

<Info>
  **Quick answer**: the most common bracket commands are `()`, `[]`, `\{ \}`, `\langle \rangle`, `\left ... \right`, and `\big( ... \big)`. If LaTeX complains about unbalanced delimiters, check that every `\left` has a matching `\right`.

  **Prerequisites**: Basic LaTeX math mode knowledge. See [Mathematical Expressions](/learn/latex/mathematics/mathematical-expressions) for math mode basics.
</Info>

## Quick answers

| If you need...               | Use                                    |
| ---------------------------- | -------------------------------------- |
| Ordinary parentheses         | `(a+b)`                                |
| Square brackets              | `[a,b]`                                |
| Curly braces in math mode    | `\{x \in A\}`                          |
| Angle brackets               | `\langle u, v \rangle`                 |
| Automatically sized brackets | `\left( \frac{a}{b} \right)`           |
| Manually larger brackets     | `\big( ... \big)` or `\Big( ... \Big)` |
| One visible delimiter only   | `\left.` or `\right.`                  |

## Types of Brackets and Delimiters

### Complete Visual Reference

| Type            | LaTeX Code        | Output               | Common Use        |
| --------------- | ----------------- | -------------------- | ----------------- |
| Parentheses     | `( )`             | $( \, )$             | General grouping  |
| Square brackets | `[ ]`             | $[ \, ]$             | Arrays, intervals |
| Curly braces    | `\{ \}`           | $\{ \, \}$           | Sets, systems     |
| Angle brackets  | `\langle \rangle` | $\langle \, \rangle$ | Inner products    |
| Vertical bars   | `\|` or `\vert`   | $\lvert \, \rvert$   | Absolute value    |
| Double bars     | `\|\|` or `\Vert` | $\lVert \, \rVert$   | Norms             |
| Floor           | `\lfloor \rfloor` | $\lfloor \, \rfloor$ | Floor function    |
| Ceiling         | `\lceil \rceil`   | $\lceil \, \rceil$   | Ceiling function  |

### Basic Examples

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex basic-brackets.tex theme={null}
      \documentclass{article}
      \usepackage{amsmath}
      \begin{document}

      % Parentheses
      $(a + b)$

      % Square brackets  
      $[x, y]$

      % Curly braces (must be escaped)
      $\{z : z > 0\}$

      % Angle brackets
      $\langle u, v \rangle$

      % Absolute value
      $|x - y|$

      % Norm
      $\|v\|$

      % Floor and ceiling
      $\lfloor x \rfloor$ and $\lceil x \rceil$

      \end{document}
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <Card title="Rendered output" icon="eye">
      **Parentheses:** $(a + b)$

      **Square brackets:** $[x, y]$

      **Curly braces:** $\{z : z > 0\}$

      **Angle brackets:** $\langle u, v \rangle$

      **Absolute value:** $|x - y|$

      **Norm:** $\|v\|$

      **Floor and ceiling:** $\lfloor x \rfloor$ and $\lceil x \rceil$
    </Card>
  </Tab>
</Tabs>

## Automatic Delimiter Sizing

### The `\left` and `\right` Commands

LaTeX can automatically size delimiters to match their content using `\left` and `\right`:

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex auto-sizing.tex theme={null}
      \documentclass{article}
      \usepackage{amsmath}
      \begin{document}

      % Without automatic sizing
      $(\frac{1}{2})$

      % With automatic sizing
      $\left(\frac{1}{2}\right)$

      % Works with any delimiter type
      $\left[\frac{x^2}{y}\right]$

      $\left\{\sqrt{\frac{a}{b}}\right\}$

      $\left|\sum_{i=1}^n x_i\right|$

      % Nested fractions
      $\left(\frac{\frac{a}{b}}{\frac{c}{d}}\right)$

      \end{document}
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <Card title="Rendered output" icon="eye">
      **Without sizing:** $(\frac{1}{2})$

      **With sizing:** $\left(\frac{1}{2}\right)$

      **Square brackets:** $\left[\frac{x^2}{y}\right]$

      **Curly braces:** $\left\{\sqrt{\frac{a}{b}}\right\}$

      **Absolute value:** $\left|\sum_{i=1}^n x_i\right|$

      **Nested fractions:** $\left(\frac{\frac{a}{b}}{\frac{c}{d}}\right)$
    </Card>
  </Tab>
</Tabs>

### Important Rules for `\left` and `\right`

<Warning>
  **Critical**: Every `\left` must have a matching `\right` in the same math environment. They must be balanced like opening and closing HTML tags.
</Warning>

#### Invisible Delimiters

Sometimes you need an invisible delimiter to balance the equation:

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex invisible-delimiters.tex theme={null}
      % Using \right. for invisible right delimiter
      $\left\{\begin{array}{ll}
      x + y = 1 \\
      x - y = 0
      \end{array}\right.$

      % Using \left. for invisible left delimiter
      $\left.\frac{dy}{dx}\right|_{x=0}$
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <Card title="Rendered output" icon="eye">
      **System with invisible right delimiter:**
      $\left\{\begin{array}{ll} x + y = 1 \\ x - y = 0 \end{array}\right.$

      **Evaluation bar with invisible left delimiter:** $\left.\frac{dy}{dx}\right|_{x=0}$
    </Card>
  </Tab>
</Tabs>

## Manual Size Control

### Size Commands

When automatic sizing doesn't give the desired result, use manual size commands:

<Info>
  **Delimiter Size Commands (smallest to largest):**

  | Command | Size                   |
  | ------- | ---------------------- |
  | `\big`  | 50% larger than normal |
  | `\Big`  | 2× normal size         |
  | `\bigg` | 2.5× normal size       |
  | `\Bigg` | 3× normal size         |
</Info>

### Size Comparison

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex size-comparison.tex theme={null}
      \documentclass{article}
      \usepackage{amsmath}
      \begin{document}

      % Normal size
      $( \frac{1}{2} )$

      % \big
      $\big( \frac{1}{2} \big)$

      % \Big
      $\Big( \frac{1}{2} \Big)$

      % \bigg
      $\bigg( \frac{1}{2} \bigg)$

      % \Bigg
      $\Bigg( \frac{1}{2} \Bigg)$

      % For opening and closing separately
      $\bigl( x \bigr)$  % 'l' for left, 'r' for right

      \end{document}
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <Card title="Rendered output" icon="eye">
      | Size    | Result                      |
      | ------- | --------------------------- |
      | Normal  | $( \frac{1}{2} )$           |
      | `\big`  | $\big( \frac{1}{2} \big)$   |
      | `\Big`  | $\Big( \frac{1}{2} \Big)$   |
      | `\bigg` | $\bigg( \frac{1}{2} \bigg)$ |
      | `\Bigg` | $\Bigg( \frac{1}{2} \Bigg)$ |
    </Card>
  </Tab>
</Tabs>

### Left and Right Variants

<Tip>
  Use `l` and `r` suffixes for proper spacing: `\bigl(`, `\bigr)`, `\Bigl[`, `\Bigr]`, etc. This ensures correct spacing around the delimiters.
</Tip>

## Advanced Techniques

### Nested Brackets

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex nested-brackets.tex theme={null}
      \documentclass{article}
      \usepackage{amsmath}
      \begin{document}

      % Poor: all brackets same size
      $[1 + [2 + [3 + 4]]]$

      % Better: graduated sizes
      $\Big[1 + \big[2 + [3 + 4]\big]\Big]$

      % Best: automatic sizing
      $\left[1 + \left[2 + \left[3 + 4\right]\right]\right]$

      % Complex nesting
      $\left\{x : \left[a + \left(\frac{b}{c}\right)\right] > 0\right\}$

      \end{document}
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <Card title="Rendered output" icon="eye">
      **Poor (all same size):** $[1 + [2 + [3 + 4]]]$

      **Better (graduated sizes):** $\Big[1 + \big[2 + [3 + 4]\big]\Big]$

      **Best (automatic sizing):** $\left[1 + \left[2 + \left[3 + 4\right]\right]\right]$

      **Complex nesting:** $\left\{x : \left[a + \left(\frac{b}{c}\right)\right] > 0\right\}$
    </Card>
  </Tab>
</Tabs>

### Multi-line Equations with Brackets

For equations that span multiple lines, you need special handling:

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex multiline-brackets.tex theme={null}
      \documentclass{article}
      \usepackage{amsmath}
      \begin{document}

      % Using \right. and \left. for invisible delimiters
      \begin{align}
      f(x) = & \left[ x^2 + 2x \right. \\
             & \left. + 1 \right]
      \end{align}

      % Alternative using \big commands
      \begin{align}
      g(x) = & \Big[ x^3 + 3x^2 \\
             & \phantom{\Big[} + 3x + 1 \Big]
      \end{align}

      % For cases/piecewise functions
      \begin{equation}
      f(x) = \begin{cases}
      x^2 & \text{if } x \geq 0 \\
      -x^2 & \text{if } x < 0
      \end{cases}
      \end{equation}

      \end{document}
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <Card title="Rendered output" icon="eye">
      **Piecewise function with cases:**
      $f(x) = \begin{cases} x^2 & \text{if } x \geq 0 \\ -x^2 & \text{if } x < 0 \end{cases}$
    </Card>
  </Tab>
</Tabs>

### Matrix Delimiters

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex matrix-delimiters.tex theme={null}
      \documentclass{article}
      \usepackage{amsmath}
      \begin{document}

      % Different matrix environments
      $\begin{pmatrix}  % parentheses
      a & b \\
      c & d
      \end{pmatrix}$

      $\begin{bmatrix}  % brackets
      a & b \\
      c & d
      \end{bmatrix}$

      $\begin{Bmatrix}  % braces
      a & b \\
      c & d
      \end{Bmatrix}$

      $\begin{vmatrix}  % vertical bars
      a & b \\
      c & d
      \end{vmatrix}$

      $\begin{Vmatrix}  % double bars
      a & b \\
      c & d
      \end{Vmatrix}$

      \end{document}
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <Card title="Rendered output" icon="eye">
      **pmatrix (parentheses):** $\begin{pmatrix} a & b \\ c & d \end{pmatrix}$

      **bmatrix (brackets):** $\begin{bmatrix} a & b \\ c & d \end{bmatrix}$

      **Bmatrix (braces):** $\begin{Bmatrix} a & b \\ c & d \end{Bmatrix}$

      **vmatrix (vertical bars):** $\begin{vmatrix} a & b \\ c & d \end{vmatrix}$

      **Vmatrix (double bars):** $\begin{Vmatrix} a & b \\ c & d \end{Vmatrix}$
    </Card>
  </Tab>
</Tabs>

## Special Use Cases

### Set Notation

<Tabs>
  <Tab title="Code">
    <CodeGroup>
      ```latex set-notation.tex theme={null}
      \documentclass{article}
      \usepackage{amsmath}
      \begin{document}

      % Basic set
      $A = \{1, 2, 3, 4, 5\}$

      % Set builder notation
      $B = \{x \in \mathbb{R} : x^2 < 4\}$

      % Set with conditions
      $C = \left\{x \in \mathbb{Z} : \begin{array}{l}
      x > 0 \\
      x \text{ is even}
      \end{array}\right\}$

      % Empty set
      $\emptyset = \{\}$

      \end{document}
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Rendered output">
    <Card title="Rendered output" icon="eye">
      **Basic set:** $A = \{1, 2, 3, 4, 5\}$

      **Set builder notation:** $B = \{x \in \mathbb{R} : x^2 < 4\}$

      **Empty set:** $\emptyset = \{\}$
    </Card>
  </Tab>
</Tabs>

### Interval Notation

<CodeGroup>
  ```latex intervals.tex theme={null}
  \documentclass{article}
  \usepackage{amsmath}
  \begin{document}

  % Open interval
  $(a, b)$

  % Closed interval
  $[a, b]$

  % Half-open intervals
  $[a, b)$ and $(a, b]$

  % Infinite intervals
  $(-\infty, a]$ and $[b, \infty)$

  % Union of intervals
  $[0, 1] \cup [2, 3]$

  \end{document}
  ```
</CodeGroup>

### Physics and Engineering

<CodeGroup>
  ```latex physics-brackets.tex theme={null}
  \documentclass{article}
  \usepackage{amsmath}
  \usepackage{physics} % provides \bra, \ket, \braket
  \begin{document}

  % Quantum mechanics bra-ket notation
  $\langle \psi | \phi \rangle$

  % With physics package
  $\bra{\psi}\ket{\phi}$
  $\braket{\psi|\phi}$

  % Commutator
  $[A, B] = AB - BA$

  % Anticommutator  
  $\{A, B\} = AB + BA$

  % Poisson bracket
  $\{f, g\} = \sum_i \left(\frac{\partial f}{\partial q_i}\frac{\partial g}{\partial p_i} - \frac{\partial f}{\partial p_i}\frac{\partial g}{\partial q_i}\right)$

  \end{document}
  ```
</CodeGroup>

## Common Errors and Solutions

<Accordion title="Error: Missing \right. inserted">
  **Problem**: Every `\left` needs a matching `\right`, even across line breaks.

  **Solution**: Use `\right.` for an invisible right delimiter:

  ```latex theme={null}
  \left[ x + y \right.  % End of first line
  \left. + z \right]    % Start of second line
  ```
</Accordion>

<Accordion title="Brackets too large with \left...\right">
  **Problem**: Automatic sizing makes brackets unnecessarily large.

  **Solution**: Use manual sizing instead:

  ```latex theme={null}
  % Instead of
  $\left( \sum_{i=1}^n x_i \right)$

  % Use
  $\bigg( \sum_{i=1}^n x_i \bigg)$
  ```
</Accordion>

<Accordion title="Curly braces not showing">
  **Problem**: `{` and `}` have special meaning in LaTeX.

  **Solution**: Escape them with backslash:

  ```latex theme={null}
  $\{ x : x > 0 \}$  % Correct
  ${ x : x > 0 }$    % Wrong - braces disappear
  ```
</Accordion>

<Accordion title="Mismatched bracket sizes in aligned equations">
  **Problem**: Brackets don't match across aligned lines.

  **Solution**: Use phantom brackets:

  ```latex theme={null}
  \begin{align}
  f(x) = & \Big[ x^2 + 2x \\
         & \phantom{\Big[} + 1 \Big]
  \end{align}
  ```
</Accordion>

## Best Practices

### 1. Choose the Right Delimiter

<Tip>
  **Good Delimiter Choices:**

  * **Parentheses**: General grouping, function arguments
  * **Square brackets**: Matrices, commutators, intervals
  * **Curly braces**: Sets, systems of equations
  * **Angle brackets**: Inner products, averages
  * **Vertical bars**: Absolute values, determinants, norms
</Tip>

### 2. Sizing Guidelines

* Use `\left...\right` for **complex expressions** with varying heights
* Use manual sizing (`\big`, `\Big`, etc.) for **simple expressions**
* Be consistent within the same document
* Don't oversize—readability is key

### 3. Spacing Considerations

<CodeGroup>
  ```latex spacing-examples.tex theme={null}
  % Good spacing with \bigl and \bigr
  $\bigl( x + y \bigr)$

  % Poor spacing with just \big
  $\big( x + y \big)$

  % For better spacing around bars
  $\left\lvert x \right\rvert$  % Better than |x|
  ```
</CodeGroup>

### 4. Semantic Markup

Use meaningful commands when available:

<CodeGroup>
  ```latex semantic-markup.tex theme={null}
  % Instead of manual brackets
  $|| v ||$

  % Use semantic commands
  $\lVert v \rVert$      % Double bars for norm
  $\lvert x \rvert$      % Single bars for absolute value
  $\langle u, v \rangle$ % Angle brackets for inner product
  ```
</CodeGroup>

## Quick Reference Card

| Category        | Commands                     | Result                     |
| --------------- | ---------------------------- | -------------------------- |
| Parentheses     | `( )`                        | $(x)$                      |
| Square brackets | `[ ]`                        | $[x]$                      |
| Curly braces    | `\{ \}`                      | $\{x\}$                    |
| Angle brackets  | `\langle \rangle`            | $\langle x \rangle$        |
| Vertical bars   | `\|` or `\vert`              | $\lvert x \rvert$          |
| Double bars     | `\|\|` or `\Vert`            | $\lVert x \rVert$          |
| Floor           | `\lfloor \rfloor`            | $\lfloor x \rfloor$        |
| Ceiling         | `\lceil \rceil`              | $\lceil x \rceil$          |
| Auto sizing     | `\left( \frac{1}{2} \right)` | $\left(\frac{1}{2}\right)$ |
| Manual sizing   | `\Big( x \Big)`              | $\Big( x \Big)$            |

## Practice in LaTeX Cloud Studio

<CardGroup cols={2}>
  <Card title="Try bracket sizing in the editor" icon="cloud" href="https://app.latex-cloud-studio.com/?utm_source=resources&utm_medium=card&utm_campaign=docs_open_app&utm_content=brackets_parentheses_open_app">
    Test `\left`, `\right`, `\lvert`, and `\lVert` in a live document without leaving the browser.
  </Card>

  <Card title="Write a first project" icon="file-text" href="/learn/latex/how-to/first-project?utm_source=resources&utm_medium=related_guide&utm_campaign=docs_open_app&utm_content=brackets_parentheses_first_project">
    Move from isolated syntax examples to a full document workflow.
  </Card>
</CardGroup>

## Related Topics

<CardGroup cols={2}>
  <Card title="Mathematical Expressions" icon="calculator" href="/learn/latex/mathematics/mathematical-expressions">
    Learn math mode basics and expressions
  </Card>

  <Card title="Matrices Guide" icon="table-cells" href="/learn/latex/mathematics/matrices">
    Complete guide to matrices and arrays
  </Card>

  <Card title="Equations" icon="equals" href="/learn/latex/mathematics/equations">
    Multi-line and numbered equations
  </Card>

  <Card title="Math Symbols" icon="sigma" href="/learn/latex/mathematics/symbols">
    Comprehensive symbol reference
  </Card>
</CardGroup>

<Warning>
  **LaTeX Cloud Studio** automatically handles package loading! The `amsmath` package is pre-loaded, so all bracket commands work immediately without manual package management.
</Warning>
