Writing Mathematical Notation in LaTeX

As is well known, was designed to produce beautiful books, especially books containing a lot of mathematics. Because of that, is very strong for preparing documents with mathematical notation. To write mathematical symbols and formulas, we need to use the mathematical environment.
Displaying Mathematical Formulas
Mathematical formulas in can be written between $...$ or $$...$$.
The difference is:
- Formulas between
$...$or\(...\)appear as part of a sentence. This is called an inline equation. - Formulas between
$$...$$or\[...\]appear as stand-alone formulas. This is called a displayed equation.
If you want numbered equations, use the equation environment.
Example:
Inline formula: $a^2+b^2=c^2$
\[
\int_0^1 x^2 \, dx
\]
\begin{equation}
E = mc^2
\end{equation}The output can be seen in the following image.

Subscript and Superscript
A subscript is written below a symbol and usually uses _.
A superscript is written above a symbol and usually uses ^.
Example:
$x_1,\ a_n,\ y^2,\ x^{n+1}$The output:

Binomial and Division-Style Notation
To write binomial notation, use \binom{...}{...}.
Example:
\[
\binom{n}{r}
\]The output:

Integrals, Roots, and Fractions
To write:
- integrals, use
\int - roots, use
\sqrt{...} - fractions, use
\frac{...}{...}
Example:
\[
\int x^2 \, dx,\qquad
\sqrt{x+1},\qquad
\frac{a+b}{c+d}
\]The output:

Matrix
To write matrices, we can use parentheses or square brackets.
Example:
\[
\begin{pmatrix}
1 & 2 \\
3 & 4
\end{pmatrix}
\qquad
\begin{bmatrix}
a & b \\
c & d
\end{bmatrix}
\]The output:

Limit
To write limits, use \lim.
Example:
\[
\lim_{x \to 0}\frac{\sin x}{x}
\]The output:

Sigma
To write sigma notation, use \sum.
Example:
\[
\sum_{i=1}^{n} i^2
\]The output:

Systems of Equations
Systems of equations are commonly written with curly brackets. For this, we can use the amsmath or systeme package.
Example:
\[
\begin{cases}
x+y=5 \\
2x-y=1
\end{cases}
\]The output:

Brackets
In mathematical formulas, brackets are often used to separate expressions.
Example:
\[
\left( \frac{a+b}{c+d} \right),
\quad
\left[ x^2+y^2 \right],
\quad
\left\{ \frac{x}{y} \right\}
\]The output:

Besides the examples above, there are many more techniques for writing mathematics in . If you want to study the symbols in more detail, the documentation can be downloaded here.
Closing
That is a short guide to writing mathematical notation in LaTeX. If you have suggestions or corrections, please leave them in the comments.




