Math & Science

Mathematics, Equations & Symbols

Complete guide to typeset elegant mathematical formulas, multiline aligned equations, matrices, piecewise functions, physics notation, and SI units.

📐 AMS-LaTeX Equation Systems & Multi-Style Derivations

Typeset single equations, multiline aligned systems (align), grouped subequations (1a, 1b, 1c), piecewise cases, long split equations, and matrix delimiters (pmatrix, bmatrix, vmatrix).

Math Modes & Formulas

Math Modes & Formulas

Comprehensive syntax, arguments, options, and copyable snippets for math modes & formulas.

Math Mode

$ ... $

Inline math mode

Example Code
The energy is $E=mc^2$.
Math Mode

\( ... \)

Inline math mode (alternative)

Example Code
The energy is \(E=mc^2\).
Math Mode

$$ ... $$

Display math mode (plain TeX style)

Example Code
$$E = mc^2$$
Math Mode Optional [ ]

\[ ... \]

Display math mode (LaTeX style)

Example Code
\[E = mc^2\]
Math Mode Mandatory { }

\frac{num}{den}

Fraction

💡 Deep Dive Explanation & Options

Fraction: Typesets fraction. In display math use \dfrac for full size, in inline text use \tfrac for compact size.

Example Code
$\frac{1}{2}$
Math Mode Mandatory { }

\dfrac{num}{den}

Display-style fraction (amsmath)

Example Code
$\dfrac{1}{2}$
Math Mode Mandatory { }

\tfrac{num}{den}

Text-style fraction (amsmath)

Example Code
$\tfrac{1}{2}$
Math Mode Mandatory { }

\sqrt{x}

Square root

Example Code
$\sqrt{2}$
Math Mode Mandatory { } Optional [ ]

\sqrt[n]{x}

nth root

💡 Deep Dive Explanation & Options

Radical / N-th Root: Computes radical symbol. Optional [n] specifies root degree.

Example Code
$\sqrt[3]{8}$
Math Mode

\sum

Summation symbol

Example Code
$\sum_{i=1}^{n} i$
Math Mode

\prod

Product symbol

Example Code
$\prod_{i=1}^{n} i$
Math Mode

\int

Integral symbol

Example Code
$\int_0^1 x^2\,dx$
Math Mode

\iint

Double integral (amsmath)

Example Code
$\iint_D f(x,y)\,dA$
Math Mode

\iiint

Triple integral (amsmath)

Example Code
$\iiint_V f\,dV$
Math Mode

\oint

Contour integral

Example Code
$\oint_C \vec{F}\cdot d\vec{r}$
Math Mode

\lim

Limit operator

Example Code
$\lim_{x\to 0} \frac{\sin x}{x}$
Math Mode

\limsup

Limit superior

Example Code
$\limsup_{n\to\infty} a_n$
Math Mode

\liminf

Limit inferior

Example Code
$\liminf_{n\to\infty} a_n$
Math Mode

\sup

Supremum operator

Example Code
$\sup_{x \in S} f(x)$
Math Mode

\inf

Infimum operator

Example Code
$\inf_{x \in S} f(x)$
Math Mode

\max

Maximum operator

Example Code
$\max(a,b)$
Math Mode

\min

Minimum operator

Example Code
$\min(a,b)$
Math Mode

\log

Logarithm operator

Example Code
$\log_{10} x$
Math Mode

\ln

Natural logarithm operator

Example Code
$\ln x$
Math Mode

\exp

Exponential operator

Example Code
$\exp(x)$
Math Mode

\sin

Sine function

Example Code
$\sin\theta$
Math Mode

\cos

Cosine function

Example Code
$\cos\theta$
Math Mode

\tan

Tangent function

Example Code
$\tan\theta$
Math Mode

\cot

Cotangent function

Example Code
$\cot\theta$
Math Mode

\sec

Secant function

Example Code
$\sec\theta$
Math Mode

\csc

Cosecant function

Example Code
$\csc\theta$
Math Mode

\arcsin

Arcsine function

Example Code
$\arcsin x$
Math Mode

\arccos

Arccosine function

Example Code
$\arccos x$
Math Mode

\arctan

Arctangent function

Example Code
$\arctan x$
Math Mode

\sinh

Hyperbolic sine

Example Code
$\sinh x$
Math Mode

\cosh

Hyperbolic cosine

Example Code
$\cosh x$
Math Mode

\tanh

Hyperbolic tangent

Example Code
$\tanh x$
Math Mode

\det

Determinant operator

Example Code
$\det(A)$
Math Mode

\dim

Dimension operator

Example Code
$\dim(V)$
Math Mode

\gcd

Greatest common divisor operator

Example Code
$\gcd(a,b)$
Math Mode

\deg

Degree operator

Example Code
$\deg(p)$
Math Mode

\hom

Hom operator

Example Code
$\hom(A,B)$
Math Mode

\ker

Kernel operator

Example Code
$\ker(T)$
Math Mode

\Pr

Probability operator (amsmath)

Example Code
$\Pr(X > 0)$
Math Mode Mandatory { }

x^{a}

Superscript

Example Code
$x^{2}$
Math Mode Mandatory { }

x_{a}

Subscript

Example Code
$x_{i}$
Math Mode Mandatory { }

\overline{x}

Overline

Example Code
$\overline{x}$
Math Mode Mandatory { }

\underline{x}

Underline (math mode)

Example Code
$\underline{x}$
Math Mode Mandatory { }

\overbrace{x}

Overbrace

Example Code
$\overbrace{a+b+c}^{\text{sum}}$
Math Mode Mandatory { }

\underbrace{x}

Underbrace

Example Code
$\underbrace{a+b+c}_{\text{sum}}$
Math Mode Mandatory { }

\overrightarrow{x}

Right arrow over text (vectors)

Example Code
$\overrightarrow{AB}$
Math Mode Mandatory { }

\overleftarrow{x}

Left arrow over text

Example Code
$\overleftarrow{AB}$
Math Mode Mandatory { }

\hat{x}

Hat accent

Example Code
$\hat{x}$
Math Mode Mandatory { }

\widehat{x}

Wide hat accent

Example Code
$\widehat{xyz}$
Math Mode Mandatory { }

\bar{x}

Bar accent

Example Code
$\bar{x}$
Math Mode Mandatory { }

\vec{x}

Vector arrow accent

Example Code
$\vec{v}$
Math Mode Mandatory { }

\dot{x}

Dot accent (derivative)

Example Code
$\dot{x}$
Math Mode Mandatory { }

\ddot{x}

Double dot accent (second derivative)

Example Code
$\ddot{x}$
Math Mode Mandatory { }

\tilde{x}

Tilde accent

Example Code
$\tilde{x}$
Math Mode Mandatory { }

\widetilde{x}

Wide tilde accent

Example Code
$\widetilde{xyz}$
Math Mode Mandatory { }

\mathbb{X}

Blackboard bold (amssymb)

Example Code
$\mathbb{R}$
Math Mode Mandatory { }

\mathcal{X}

Calligraphic letters

Example Code
$\mathcal{L}$
Math Mode Mandatory { }

\mathfrak{X}

Fraktur letters (amssymb)

Example Code
$\mathfrak{g}$
Math Mode Mandatory { }

\mathrm{x}

Roman (upright) math text

Example Code
$\mathrm{d}x$
Math Mode Mandatory { }

\mathbf{x}

Bold math text

Example Code
$\mathbf{v}$
Math Mode Mandatory { }

\mathit{x}

Italic math text

Example Code
$\mathit{abc}$
Math Mode Mandatory { }

\mathsf{x}

Sans-serif math text

Example Code
$\mathsf{abc}$
Math Mode Mandatory { }

\mathtt{x}

Typewriter math text

Example Code
$\mathtt{abc}$
Math Mode Mandatory { }

\boldsymbol{x}

Bold math symbol (amsmath/bm)

Example Code
$\boldsymbol{\alpha}$
Math Mode Mandatory { }

\text{text}

Text inside math mode (amsmath)

Example Code
$x = 5 \text{ meters}$
Math Mode

\left(

Auto-sized left parenthesis

Example Code
$\left(\frac{a}{b}\right)$
Math Mode

\right)

Auto-sized right parenthesis

Example Code
$\left(\frac{a}{b}\right)$
Math Mode Optional [ ]

\left[

Auto-sized left bracket

Example Code
$\left[\frac{a}{b}\right]$
Math Mode

\right]

Auto-sized right bracket

Example Code
$\left[\frac{a}{b}\right]$
Math Mode Mandatory { }

\left\{

Auto-sized left brace

Example Code
$\left\{\frac{a}{b}\right\}$
Math Mode

\right\}

Auto-sized right brace

Example Code
$\left\{\frac{a}{b}\right\}$
Math Mode

\left|

Auto-sized left vertical bar

Example Code
$\left|\frac{a}{b}\right|$
Math Mode

\right|

Auto-sized right vertical bar

Example Code
$\left|\frac{a}{b}\right|$
Math Mode

\big(

Manually sized parenthesis (big)

Example Code
$\big(x\big)$
Math Mode

\Big(

Manually sized parenthesis (Big)

Example Code
$\Big(x\Big)$
Math Mode

\bigg(

Manually sized parenthesis (bigg)

Example Code
$\bigg(x\bigg)$
Math Mode

\Bigg(

Manually sized parenthesis (Bigg)

Example Code
$\Bigg(x\Bigg)$
Math Mode

\nonumber

Suppresses equation numbering on a line

Example Code
\begin{align}
x &= y \nonumber
\end{align}
Math Mode

\notag

Suppresses equation numbering (amsmath)

Example Code
\begin{align}
x &= y \notag
\end{align}
Math Mode Mandatory { }

\label{key}

Assigns a label for cross-referencing

💡 Deep Dive Explanation & Options

Label Anchor Placement: Must be placed after (or inside) \caption{...} for figures and tables, or inside an equation, so \ref{key} retrieves the correct counter.

Example Code
\label{eq:energy}
Math Mode Mandatory { }

\tag{text}

Custom equation tag (amsmath)

Example Code
\begin{equation}
E=mc^2 \tag{A}
\end{equation}
Advanced AMS-LaTeX Equations

Advanced AMS-LaTeX Equations

Comprehensive syntax, arguments, options, and copyable snippets for advanced ams-latex equations.

Environment Mandatory { }

\begin{split}...\end{split}

Splits a single equation across lines while keeping one equation number (amsmath, used inside equation)

Example Code
\begin{equation}
\begin{split}
f(x) &= (x+1)^2 \\
     &= x^2 + 2x + 1
\end{split}
\end{equation}
Environment Mandatory { }

\begin{subequations}...\end{subequations}

Groups several equations under one main number with letter suffixes (amsmath)

💡 Deep Dive Explanation & Options

Sub-Equation Numbering (1a, 1b, 1c): Encloses an equation environment (such as align). The system shares a main equation index while individual equations are labeled alphabetically (e.g. \eqref{eq:1a}).

Example Code
\begin{subequations}
\begin{align}
a &= b \\
c &= d
\end{align}
\end{subequations}
Environment Mandatory { }

\begin{alignat}{n}...\end{alignat}

Aligns multiple columns of equations with tighter spacing than align (amsmath)

Example Code
\begin{alignat}{2}
x &= y &\quad a &= b \\
u &= v &\quad c &= d
\end{alignat}
Environment Mandatory { }

\begin{flalign}...\end{flalign}

Flush left/right aligned equations spanning full line width (amsmath)

Example Code
\begin{flalign}
x &= y &
\end{flalign}
Environment Mandatory { }

\begin{smallmatrix}...\end{smallmatrix}

Compact inline-sized matrix (amsmath)

Example Code
$\bigl(\begin{smallmatrix}a&b\\c&d\end{smallmatrix}\bigr)$
Math Mode Mandatory { }

\boxed{expr}

Draws a box around a math expression (amsmath)

Example Code
\boxed{E=mc^2}
Math Mode Mandatory { }

\DeclareMathOperator{\op}{name}

Defines a new math operator like \sin or \log (amsmath)

Example Code
\DeclareMathOperator{\Tr}{Tr}
Math Mode Mandatory { }

\DeclareMathOperator*{\op}{name}

Defines a new math operator with limits placed above/below, like \lim (amsmath)

Example Code
\DeclareMathOperator*{\argmax}{arg\,max}
Math Mode Mandatory { }

\substack{line1 \\ line2}

Stacks multiple lines of subscript/superscript text (amsmath)

Example Code
$\sum_{\substack{0 \le i \le n \\ i \ne j}} a_i$
Math Mode

\allowdisplaybreaks

Allows page breaks within long align/gather blocks (amsmath)

Example Code
\allowdisplaybreaks
Math Mode Mandatory { }

\intertext{text}

Inserts a line of ordinary text between aligned equation lines without breaking the alignment (amsmath)

Example Code
\begin{align}
x &= y \\
\intertext{Substituting gives}
y &= z
\end{align}
Greek Letters & Symbols

Greek Letters & Symbols

Comprehensive syntax, arguments, options, and copyable snippets for greek letters & symbols.

Math Mode

\alpha

Lowercase alpha

Example Code
$\alpha$
Math Mode

\beta

Lowercase beta

Example Code
$\beta$
Math Mode

\gamma

Lowercase gamma

Example Code
$\gamma$
Math Mode

\delta

Lowercase delta

Example Code
$\delta$
Math Mode

\epsilon

Lowercase epsilon (variant)

Example Code
$\epsilon$
Math Mode

\varepsilon

Lowercase epsilon (alternate form)

Example Code
$\varepsilon$
Math Mode

\zeta

Lowercase zeta

Example Code
$\zeta$
Math Mode

\eta

Lowercase eta

Example Code
$\eta$
Math Mode

\theta

Lowercase theta

Example Code
$\theta$
Math Mode

\vartheta

Lowercase theta (alternate form)

Example Code
$\vartheta$
Math Mode

\iota

Lowercase iota

Example Code
$\iota$
Math Mode

\kappa

Lowercase kappa

Example Code
$\kappa$
Math Mode

\lambda

Lowercase lambda

Example Code
$\lambda$
Math Mode

\mu

Lowercase mu

Example Code
$\mu$
Math Mode

\nu

Lowercase nu

Example Code
$\nu$
Math Mode

\xi

Lowercase xi

Example Code
$\xi$
Math Mode

\pi

Lowercase pi

Example Code
$\pi$
Math Mode

\varpi

Lowercase pi (alternate form)

Example Code
$\varpi$
Math Mode

\rho

Lowercase rho

Example Code
$\rho$
Math Mode

\varrho

Lowercase rho (alternate form)

Example Code
$\varrho$
Math Mode

\sigma

Lowercase sigma

Example Code
$\sigma$
Math Mode

\varsigma

Lowercase sigma (alternate form)

Example Code
$\varsigma$
Math Mode

\tau

Lowercase tau

Example Code
$\tau$
Math Mode

\upsilon

Lowercase upsilon

Example Code
$\upsilon$
Math Mode

\phi

Lowercase phi

Example Code
$\phi$
Math Mode

\varphi

Lowercase phi (alternate form)

Example Code
$\varphi$
Math Mode

\chi

Lowercase chi

Example Code
$\chi$
Math Mode

\psi

Lowercase psi

Example Code
$\psi$
Math Mode

\omega

Lowercase omega

Example Code
$\omega$
Math Mode

\Gamma

Uppercase gamma

Example Code
$\Gamma$
Math Mode

\Delta

Uppercase delta

Example Code
$\Delta$
Math Mode

\Theta

Uppercase theta

Example Code
$\Theta$
Math Mode

\Lambda

Uppercase lambda

Example Code
$\Lambda$
Math Mode

\Xi

Uppercase xi

Example Code
$\Xi$
Math Mode

\Pi

Uppercase pi

Example Code
$\Pi$
Math Mode

\Sigma

Uppercase sigma

Example Code
$\Sigma$
Math Mode

\Upsilon

Uppercase upsilon

Example Code
$\Upsilon$
Math Mode

\Phi

Uppercase phi

Example Code
$\Phi$
Math Mode

\Psi

Uppercase psi

Example Code
$\Psi$
Math Mode

\Omega

Uppercase omega

Example Code
$\Omega$
Math Operators & Delimiters

Math Operators & Delimiters

Comprehensive syntax, arguments, options, and copyable snippets for math operators & delimiters.

Math Mode

\pm

Plus-minus sign

Example Code
$5 \pm 2$
Math Mode

\mp

Minus-plus sign

Example Code
$5 \mp 2$
Math Mode

\times

Multiplication sign

Example Code
$3 \times 4$
Math Mode

\div

Division sign

Example Code
$10 \div 2$
Math Mode

\cdot

Centered dot (multiplication)

Example Code
$a \cdot b$
Math Mode

\ast

Asterisk operator

Example Code
$a \ast b$
Math Mode

\star

Star operator

Example Code
$a \star b$
Math Mode

\circ

Small circle operator

Example Code
$f \circ g$
Math Mode

\bullet

Bullet operator

Example Code
$a \bullet b$
Math Mode

\oplus

Circled plus

Example Code
$a \oplus b$
Math Mode

\ominus

Circled minus

Example Code
$a \ominus b$
Math Mode

\otimes

Circled times

Example Code
$a \otimes b$
Math Mode

\oslash

Circled slash

Example Code
$a \oslash b$
Math Mode

\odot

Circled dot

Example Code
$a \odot b$
Math Mode

\leq

Less than or equal to

Example Code
$x \leq 5$
Math Mode

\geq

Greater than or equal to

Example Code
$x \geq 5$
Math Mode

\neq

Not equal to

Example Code
$x \neq y$
Math Mode

\approx

Approximately equal to

Example Code
$\pi \approx 3.14$
Math Mode

\equiv

Equivalent to

Example Code
$a \equiv b \pmod{n}$
Math Mode

\sim

Similar to (tilde relation)

Example Code
$f(x) \sim g(x)$
Math Mode

\simeq

Similar or equal to

Example Code
$a \simeq b$
Math Mode

\cong

Congruent to

Example Code
$\triangle ABC \cong \triangle DEF$
Math Mode

\propto

Proportional to

Example Code
$y \propto x$
Math Mode

\ll

Much less than

Example Code
$a \ll b$
Math Mode

\gg

Much greater than

Example Code
$a \gg b$
Math Mode

\subset

Proper subset

Example Code
$A \subset B$
Math Mode

\subseteq

Subset or equal

Example Code
$A \subseteq B$
Math Mode

\supset

Proper superset

Example Code
$A \supset B$
Math Mode

\supseteq

Superset or equal

Example Code
$A \supseteq B$
Math Mode

\in

Element of

Example Code
$x \in A$
Math Mode

\notin

Not an element of

Example Code
$x \notin A$
Math Mode

\ni

Contains as member

Example Code
$A \ni x$
Math Mode

\cup

Set union

Example Code
$A \cup B$
Math Mode

\cap

Set intersection

Example Code
$A \cap B$
Math Mode

\setminus

Set difference

Example Code
$A \setminus B$
Math Mode

\emptyset

Empty set symbol

Example Code
$A = \emptyset$
Math Mode

\varnothing

Empty set symbol (alternate, amssymb)

Example Code
$A = \varnothing$
Math Mode

\forall

Universal quantifier

Example Code
$\forall x \in \mathbb{R}$
Math Mode

\exists

Existential quantifier

Example Code
$\exists x \in A$
Math Mode

\nexists

Negated existential quantifier (amssymb)

Example Code
$\nexists x$
Math Mode

\neg

Logical negation

Example Code
$\neg p$
Math Mode

\land

Logical AND

Example Code
$p \land q$
Math Mode

\lor

Logical OR

Example Code
$p \lor q$
Math Mode

\implies

Implication arrow (amssymb)

Example Code
$p \implies q$
Math Mode

\iff

If and only if (amsmath)

Example Code
$p \iff q$
Math Mode

\rightarrow

Right arrow

Example Code
$A \rightarrow B$
Math Mode

\to

Right arrow (shorthand)

Example Code
$f: A \to B$
Math Mode

\leftarrow

Left arrow

Example Code
$A \leftarrow B$
Math Mode

\leftrightarrow

Left-right arrow

Example Code
$A \leftrightarrow B$
Math Mode

\Rightarrow

Double right arrow

Example Code
$p \Rightarrow q$
Math Mode

\Leftarrow

Double left arrow

Example Code
$p \Leftarrow q$
Math Mode

\Leftrightarrow

Double left-right arrow

Example Code
$p \Leftrightarrow q$
Math Mode

\mapsto

Maps-to arrow

Example Code
$x \mapsto x^2$
Math Mode

\longrightarrow

Long right arrow

Example Code
$A \longrightarrow B$
Math Mode

\longleftarrow

Long left arrow

Example Code
$A \longleftarrow B$
Math Mode

\uparrow

Up arrow

Example Code
$x \uparrow y$
Math Mode

\downarrow

Down arrow

Example Code
$x \downarrow y$
Math Mode

\nabla

Nabla / del operator

Example Code
$\nabla f$
Math Mode

\partial

Partial derivative symbol

Example Code
$\frac{\partial f}{\partial x}$
Math Mode

\infty

Infinity symbol

Example Code
$\lim_{x \to \infty} f(x)$
Math Mode

\aleph

Aleph symbol

Example Code
$\aleph_0$
Math Mode

\hbar

Reduced Planck's constant symbol

Example Code
$E = \hbar \omega$
Math Mode

\ell

Script lowercase l

Example Code
$\ell^2$ space
Math Mode

\Re

Real part symbol

Example Code
$\Re(z)$
Math Mode

\Im

Imaginary part symbol

Example Code
$\Im(z)$
Math Mode

\angle

Angle symbol

Example Code
$\angle ABC$
Math Mode

\perp

Perpendicular symbol

Example Code
$AB \perp CD$
Math Mode

\parallel

Parallel symbol

Example Code
$AB \parallel CD$
Math Mode

\wedge

Wedge (logical AND / cross product)

Example Code
$\vec{a} \wedge \vec{b}$
Math Mode

\vee

Vee (logical OR)

Example Code
$p \vee q$
Math Mode

\dagger

Dagger symbol

Example Code
$A^\dagger$
Math Mode

\ddagger

Double dagger symbol

Example Code
$x^\ddagger$
Math Mode

\ldots

Horizontal ellipsis (low dots)

Example Code
$a_1, a_2, \ldots, a_n$
Math Mode

\cdots

Horizontal ellipsis (centered dots)

Example Code
$a_1 + a_2 + \cdots + a_n$
Math Mode

\vdots

Vertical ellipsis

Example Code
$\vdots$
Math Mode

\ddots

Diagonal ellipsis

Example Code
$\ddots$
Math Mode

\prime

Prime symbol

Example Code
$f\prime(x)$
Math Mode

\backslash

Backslash symbol

Example Code
$A \backslash B$
SI Units & Numbers (siunitx)

SI Units & Numbers (siunitx)

Comprehensive syntax, arguments, options, and copyable snippets for si units & numbers (siunitx).

Command Mandatory { }

\si{unit}

Typesets a physical unit correctly formatted (siunitx package)

Example Code
\si{\meter\per\second}
Command Mandatory { }

\SI{value}{unit}

Typesets a numeric value with its unit (siunitx package)

Example Code
\SI{9.8}{\meter\per\second\squared}
Command Mandatory { }

\num{value}

Typesets a number with consistent formatting, e.g. scientific notation (siunitx)

Example Code
\num{6.022e23}
Command Mandatory { }

\ang{value}

Typesets an angle value (siunitx package)

Example Code
\ang{45}
Chemistry & Physics (mhchem, physics)

Chemistry & Physics (mhchem, physics)

Comprehensive syntax, arguments, options, and copyable snippets for chemistry & physics (mhchem, physics).

Command Mandatory { }

\ce{formula}

Typesets a chemical formula or reaction (mhchem package)

Example Code
\ce{H2O + CO2 -> H2CO3}
Command Mandatory { }

\bra{x}

Typesets a quantum bra vector (physics package)

Example Code
$\bra{\psi}$
Command Mandatory { }

\ket{x}

Typesets a quantum ket vector (physics package)

Example Code
$\ket{\psi}$
Command Mandatory { }

\braket{x}{y}

Typesets a quantum bra-ket inner product (physics package)

Example Code
$\braket{\phi}{\psi}$
Command Mandatory { }

\dv{f}{x}

Typesets a total derivative (physics package)

Example Code
$\dv{f}{x}$
Command Mandatory { }

\pdv{f}{x}

Typesets a partial derivative (physics package)

Example Code
$\pdv{f}{x}$
Command Mandatory { }

\vb{x}

Typesets a bold vector symbol (physics package)

Example Code
$\vb{F} = m\vb{a}$