Superscripts and subscripts

superscripts and subscripts are created using the characters ^ and _ respectively

Code Display
a_{n_i} $a_{n_i}$
\\int_{i=1}^n $\int_{i=1}^n$
\\sum_{i=1}^{\\infty} $\sum_{i=1}^{\infty}$
\\prod_{i=1}^n $\prod_{i=1}^n$
\\cup_{i=1}^n $\cup_{i=1}^n$
\\cap_{i=1}^n $\cap_{i=1}^n$
\\oint_{i=1}^n $\oint_{i=1}^n$
\\coprod_{i=1}^n $\coprod_{i=1}^n$

Brackets and Parentheses

Type LATEX markup Renders as
Parentheses; round brackets (x+y) $(x+y)$
Brackets; square brackets [x+y] $[x+y]$
Braces; curly brackets \\{ x+y \\} $\{ x+y \}$
Angle brackets \\langle x+y \\rangle $\langle x+y \rangle$
Pipes; vertical bars \\vert x+y \\vert $\vert x+y \vert$
Double pipes \|x+y\| $|x+y|$

to insert the parentheses or brackets, the \\left and \\right commands are used

When writing multi-line equations with the align, align* or aligned environments, the \\left and \\right commands must be balanced on each line and on the same side of &.

Align 语法中&可近似理解为表格?

Controlling types and sizes

The size of the brackets can be controlled explicitly, as shown in this LaTeX code fragment:

\\[
 \\Bigg \\langle 3x+7 \\bigg \\rangle
\\]

$\Bigg \langle 3x+7 \bigg \rangle$

Matrix

The amsmath package provides commands to typeset matrices with different delimiters. Once you have loaded \\\\usepackage{amsmath} in your preamble, you can use the following environments in your math environments:

Type LATEX markup Display
Plain \\begin{matrix}1 & 2 & 3\\\\a & b & c\\end{matrix} $\begin{matrix}1 & 2 & 3\\a & b & c\end{matrix}$
Parentheses; round brackets \\begin{pmatrix}1 & 2 & 3\\\\a & b & c\\end{pmatrix} $\begin{pmatrix}1 & 2 & 3\\a & b & c\end{pmatrix}$
Brackets; square brackets \\begin{bmatrix}1 & 2 & 3\\\\a & b & c\\end{bmatrix} $\begin{bmatrix}1 & 2 & 3\\a & b & c\end{bmatrix}$
Braces; curly brackets \\begin{Bmatrix}1 & 2 & 3\\\\a & b & c\\end{Bmatrix} $\begin{Bmatrix}1 & 2 & 3\\a & b & c\end{Bmatrix}$
Pipes \\begin{vmatrix}1 & 2 & 3\\\\a & b & c\\end{vmatrix} $\begin{vmatrix}1 & 2 & 3\\a & b & c\end{vmatrix}$
Double pipes \\begin{Vmatrix}1 & 2 & 3\\\\a & b & c\\end{Vmatrix} $\begin{Vmatrix}1 & 2 & 3\\a & b & c\end{Vmatrix}$

Use below code to create a small matrix

\\(\\big(\\begin{smallmatrix}
  a & b\\\\
  c & d
\\end{smallmatrix}\\big)\\)

$\big(\begin{smallmatrix} a & b\\ c & d \end{smallmatrix}\big)$ 可爱捏~

Fractions and Binomials