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.
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.
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 for math mode basics.
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 \rangleAutomatically 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
\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 }
Rendered output Parentheses: ( a + b ) (a + b) ( a + b ) Square brackets: [ x , y ] [x, y] [ x , y ] Curly braces: { z : z > 0 } \{z : z > 0\} { z : z > 0 } Angle brackets: ⟨ u , v ⟩ \langle u, v \rangle ⟨ u , v ⟩ Absolute value: ∣ x − y ∣ |x - y| ∣ x − y ∣ Norm: ∥ v ∥ \|v\| ∥ v ∥ Floor and ceiling: ⌊ x ⌋ \lfloor x \rfloor ⌊ x ⌋ and ⌈ x ⌉ \lceil x \rceil ⌈ x ⌉
Automatic Delimiter Sizing
The \left and \right Commands
LaTeX can automatically size delimiters to match their content using \left and \right:
\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 }
Rendered output Without sizing: ( 1 2 ) (\frac{1}{2}) ( 2 1 ) With sizing: ( 1 2 ) \left(\frac{1}{2}\right) ( 2 1 ) Square brackets: [ x 2 y ] \left[\frac{x^2}{y}\right] [ y x 2 ] Curly braces: { a b } \left\{\sqrt{\frac{a}{b}}\right\} { b a } Absolute value: ∣ ∑ i = 1 n x i ∣ \left|\sum_{i=1}^n x_i\right| ∣ ∑ i = 1 n x i ∣ Nested fractions: ( a b c d ) \left(\frac{\frac{a}{b}}{\frac{c}{d}}\right) ( d c b a )
Important Rules for \left and \right
Critical : Every \left must have a matching \right in the same math environment. They must be balanced like opening and closing HTML tags.
Invisible Delimiters
Sometimes you need an invisible delimiter to balance the equation:
% 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 } $
Rendered output System with invisible right delimiter:
{ x + y = 1 x − y = 0 \left\{\begin{array}{ll} x + y = 1 \\ x - y = 0 \end{array}\right. { x + y = 1 x − y = 0 Evaluation bar with invisible left delimiter: d y d x ∣ x = 0 \left.\frac{dy}{dx}\right|_{x=0} d x d y x = 0
Manual Size Control
Size Commands
When automatic sizing doesn’t give the desired result, use manual size commands:
Delimiter Size Commands (smallest to largest): Command Size \big50% larger than normal \Big2× normal size \bigg2.5× normal size \Bigg3× normal size
Size Comparison
\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 }
Rendered output Size Result Normal ( 1 2 ) ( \frac{1}{2} ) ( 2 1 ) \big( 1 2 ) \big( \frac{1}{2} \big) ( 2 1 ) \Big( 1 2 ) \Big( \frac{1}{2} \Big) ( 2 1 ) \bigg( 1 2 ) \bigg( \frac{1}{2} \bigg) ( 2 1 ) \Bigg( 1 2 ) \Bigg( \frac{1}{2} \Bigg) ( 2 1 )
Left and Right Variants
Use l and r suffixes for proper spacing: \bigl(, \bigr), \Bigl[, \Bigr], etc. This ensures correct spacing around the delimiters.
Advanced Techniques
Nested Brackets
\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 }
Rendered output Poor (all same size): [ 1 + [ 2 + [ 3 + 4 ] ] ] [1 + [2 + [3 + 4]]] [ 1 + [ 2 + [ 3 + 4 ]]] Better (graduated sizes): [ 1 + [ 2 + [ 3 + 4 ] ] ] \Big[1 + \big[2 + [3 + 4]\big]\Big] [ 1 + [ 2 + [ 3 + 4 ] ] ] Best (automatic sizing): [ 1 + [ 2 + [ 3 + 4 ] ] ] \left[1 + \left[2 + \left[3 + 4\right]\right]\right] [ 1 + [ 2 + [ 3 + 4 ] ] ] Complex nesting: { x : [ a + ( b c ) ] > 0 } \left\{x : \left[a + \left(\frac{b}{c}\right)\right] > 0\right\} { x : [ a + ( c b ) ] > 0 }
Multi-line Equations with Brackets
For equations that span multiple lines, you need special handling:
\documentclass { article }
\usepackage { amsmath }
\begin { document }
% Using \right. and \left. for invisible delimiters
\begin { align }
f(x) = & \left[ x^ 2 + 2 x \right. \\
& \left. + 1 \right]
\end { align }
% Alternative using \big commands
\begin { align }
g(x) = & \Big[ x^ 3 + 3 x^ 2 \\
& \phantom{\Big[} + 3 x + 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 }
Rendered output Piecewise function with cases:
f ( x ) = { x 2 if x ≥ 0 − x 2 if x < 0 f(x) = \begin{cases} x^2 & \text{if } x \geq 0 \\ -x^2 & \text{if } x < 0 \end{cases} f ( x ) = { x 2 − x 2 if x ≥ 0 if x < 0
Matrix Delimiters
\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 }
Rendered output pmatrix (parentheses): ( a b c d ) \begin{pmatrix} a & b \\ c & d \end{pmatrix} ( a c b d ) bmatrix (brackets): [ a b c d ] \begin{bmatrix} a & b \\ c & d \end{bmatrix} [ a c b d ] Bmatrix (braces): { a b c d } \begin{Bmatrix} a & b \\ c & d \end{Bmatrix} { a c b d } vmatrix (vertical bars): ∣ a b c d ∣ \begin{vmatrix} a & b \\ c & d \end{vmatrix} a c b d Vmatrix (double bars): ∥ a b c d ∥ \begin{Vmatrix} a & b \\ c & d \end{Vmatrix} a c b d
Special Use Cases
Set Notation
\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 }
Rendered output Basic set: A = { 1 , 2 , 3 , 4 , 5 } A = \{1, 2, 3, 4, 5\} A = { 1 , 2 , 3 , 4 , 5 } Set builder notation: B = { x ∈ R : x 2 < 4 } B = \{x \in \mathbb{R} : x^2 < 4\} B = { x ∈ R : x 2 < 4 } Empty set: ∅ = { } \emptyset = \{\} ∅ = { }
Interval Notation
\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 }
Physics and Engineering
\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 }
Common Errors and Solutions
Error: Missing \right. inserted
Problem : Every \left needs a matching \right, even across line breaks.Solution : Use \right. for an invisible right delimiter:\left [ x + y \right . % End of first line
\left . + z \right ] % Start of second line
Brackets too large with \left...\right
Problem : Automatic sizing makes brackets unnecessarily large.Solution : Use manual sizing instead:% Instead of
$ \left( \sum _{i= 1 }^n x_i \right) $
% Use
$ \bigg( \sum _{i= 1 }^n x_i \bigg) $
Problem : { and } have special meaning in LaTeX.Solution : Escape them with backslash:$ \{ x : x > 0 \} $ % Correct
$ { x : x > 0 } $ % Wrong - braces disappear
Mismatched bracket sizes in aligned equations
Problem : Brackets don’t match across aligned lines.Solution : Use phantom brackets:\begin { align }
f(x) = & \Big[ x^ 2 + 2 x \\
& \phantom{\Big[} + 1 \Big]
\end { align }
Best Practices
1. Choose the Right Delimiter
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
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
% 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|
4. Semantic Markup
Use meaningful commands when available:
% 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
Quick Reference Card
Category Commands Result Parentheses ( )( x ) (x) ( x ) Square brackets [ ][ x ] [x] [ x ] Curly braces \{ \}{ x } \{x\} { x } Angle brackets \langle \rangle⟨ x ⟩ \langle x \rangle ⟨ x ⟩ Vertical bars | or \vert∣ x ∣ \lvert x \rvert ∣ x ∣ Double bars || or \Vert∥ x ∥ \lVert x \rVert ∥ x ∥ Floor \lfloor \rfloor⌊ x ⌋ \lfloor x \rfloor ⌊ x ⌋ Ceiling \lceil \rceil⌈ x ⌉ \lceil x \rceil ⌈ x ⌉ Auto sizing \left( \frac{1}{2} \right)( 1 2 ) \left(\frac{1}{2}\right) ( 2 1 ) Manual sizing \Big( x \Big)( x ) \Big( x \Big) ( x )
Practice in LaTeX Cloud Studio
Try bracket sizing in the editor Test \left, \right, \lvert, and \lVert in a live document without leaving the browser.
Write a first project Move from isolated syntax examples to a full document workflow.
Mathematical Expressions Learn math mode basics and expressions
Matrices Guide Complete guide to matrices and arrays
Equations Multi-line and numbered equations
Math Symbols Comprehensive symbol reference
LaTeX Cloud Studio automatically handles package loading! The amsmath package is pre-loaded, so all bracket commands work immediately without manual package management.