\section{Inline math}
Inline math syntax
Inline math is embedded directly in paragraph text. LaTeX offers two equivalent syntaxes: $...$ (TeX style) and \(...\) (LaTeX style). Both render identically — prefer \(...\) in new documents as it makes errors easier to diagnose.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
% Dollar-sign syntax: $...$
The area of a circle is $A = \pi r^2$.
% Parenthesis syntax: \( ... \)
Einstein's equation is \(E = mc^2\).
% Superscripts and subscripts inline
If $f(x) = x^n$, then $f'(x) = nx^{n-1}$.
% Inline fraction with \frac
The probability is $p = \frac{k}{n}$.
\end{document}Original TeX style. Widely used but harder to debug when a $ is missing.
LaTeX-idiomatic style. Mismatched delimiters produce clearer error messages.
Raises content to the exponent position. Single characters need no braces: x^2.
Lowers content to the subscript position. Combine both: a_i^2.
\section{Display math}
Display math syntax
Display math places the equation on its own centered line with extra vertical spacing. Use \[...\] for unnumbered equations and \begin{equation} when you need automatic numbering and cross-referencing with \label / \eqref.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
% Unnumbered display math with \[ ... \]
\[
\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
\]
% Numbered equation with label
\begin{equation}
\int_{0}^{\infty} e^{-x^2}\, dx = \frac{\sqrt{\pi}}{2}
\label{eq:gaussian}
\end{equation}
See equation~\ref{eq:gaussian} for the Gaussian integral.
\end{document}\[...\]
Unnumbered display equation. Equivalent to equation*.
equation
Numbered display equation. Supports \label for cross-references.
equation*
Unnumbered version of equation. Requires amsmath.
\begin{align}
Align & multiline equations
The align environment (from amsmath) lets you typeset multiple equations that are vertically aligned at a chosen point. Place an & before the alignment character and separate lines with \\.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
% Numbered multi-line equations — align at &
\begin{align}
f(x) &= (x + 2)(x - 3) \\
&= x^2 - 3x + 2x - 6 \\
&= x^2 - x - 6
\end{align}
% Unnumbered variant with align*
\begin{align*}
\nabla \cdot \mathbf{E} &= \frac{\rho}{\varepsilon_0} \\
\nabla \times \mathbf{B} &= \mu_0 \mathbf{J}
+ \mu_0\varepsilon_0 \frac{\partial \mathbf{E}}{\partial t}
\end{align*}
\end{document}Each line gets its own equation number. Suppress a line with \nonumber.
No equation numbers. Best for derivation steps you don't need to reference.
Each line is independently centered — no shared alignment point.
Breaks one long equation across lines: first line flush-left, last flush-right.
\label{eq:name}
Equation numbering
LaTeX numbers equations automatically in the order they appear. Use \label and \eqref to cross-reference them — numbers update automatically if you add or remove equations.
\label{eq:name}
Place inside equation or align to attach a key. The key is conventionally prefixed with eq: for clarity.
\eqref{eq:name}
Inserts a cross-reference like (1). Preferred over \ref for equations because it adds parentheses automatically.
\nonumber
Suppresses numbering on one line of an align block. Useful when a derivation step doesn't need a label.
\tag{custom}
Replaces the auto-generated number with custom text, e.g. \tag{*} or \tag{QM-1}.
\section{Common symbols}
Frequently used math symbols
These symbols cover the vast majority of undergraduate mathematics. For the full reference with 200+ symbols, see LaTeX Math Symbols.
\alpha, \beta, \gamma
Greek letters (lowercase)
\Gamma, \Delta, \Sigma
Greek letters (uppercase)
\sum_{i=1}^{n}
Summation with limits
\int_{a}^{b}
Integral with bounds
\frac{a}{b}
Fraction
\sqrt{x}, \sqrt[n]{x}
Square and nth root
\infty
Infinity
\pm, \mp
Plus-minus, minus-plus
\leq, \geq, \neq
Comparison operators
\cdot, \times, \div
Multiplication operators
\partial
Partial derivative
\nabla
Nabla / gradient operator
\section{FAQ}
Frequently asked questions
What is the difference between $ and \[ in LaTeX?
Single dollar signs $...$ produce inline math that flows within the paragraph text. Double backslash brackets \[...\] produce display math — a centered block on its own line with more vertical spacing. Use inline for short expressions in running text and display for important standalone formulas.
How do I align multiple equations in LaTeX?
Use the align environment from amsmath. Place an ampersand & before the character you want to align on (usually = or another relation), and separate lines with \\. Use align* to suppress equation numbers.
How do I number equations in LaTeX?
Any equation inside \begin{equation}...\end{equation} is automatically numbered. You can add \label{eq:name} inside, then \ref{eq:name} or \eqref{eq:name} elsewhere in the document to cross-reference it. The align environment also numbers each line by default.
Do I need amsmath for equations in LaTeX?
LaTeX's built-in math mode handles basic equations without amsmath. However, amsmath is recommended for virtually every document — it provides the align, gather, multline, and cases environments, as well as improved spacing and commands like \text, \DeclareMathOperator, and \tag.
How do I write a system of equations in LaTeX?
Use the cases environment from amsmath: \begin{cases} f_1(x) & \text{if } x > 0 \\ f_2(x) & \text{otherwise} \end{cases}. For multiple aligned equations sharing a single number, use split inside an equation environment.
\section{Related guides}
Keep learning LaTeX
Try these equation examples live
Compile LaTeX in the browser — pdfLaTeX, XeLaTeX, LuaLaTeX. Free tier, no credit card.

