6 Brackets and Parentheses

Brackets and Parentheses

Brackets and parentheses are very common in mathematical formulas.

Ordinary symbols ()[] make parentheses and brackets (2+3)[3+7]. Use \{ and \} for curly braces.

These do not scale with the formula in between. You can control the size of brackets by using \left and \right. This will make the sizes adjust automatically to the formula they enclose.

Examples: 

a) [latex](\frac{x}{y})^3[/latex] non stretchy braces

[latex](\frac{x}{y})^3[/latex]

b)[latex]\left(\frac{x}{y}\right)^3[/latex] stretchy braces when used with \left or \right

[latex]\left(\frac{x}{y}\right)^3[/latex]

Note: The same applies for square brackets [], braces \{ \} and vertical lines | | to name a few.

Exercises

Reproduce the following segment of LaTex output using a display style.

a) \[\left|\frac{1}{s_n} – \frac{1}{s}\right| = \left|\frac{s-s_n}{s_ns}\right|\]

b) \[\text{The dyadic rationals are} \left\{\frac{a}{2^b}\; \middle| \;a, b\; \text{integral}\right\}\]

To fix the spacing around the vertical line, use \; before and after.

HINT (optional): Use \middle to adjust the vertical line inside the brackets.

License

Icon for the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License

Using Latex in Pressbooks Copyright © 2021 by Sanja Krajisnik and Jelena Loncar is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, except where otherwise noted.

Share This Book