# TexLive Math **Math mode** in LaTeX allows rendering mathematical equations and symbols. Inline math uses `$...$` or `\(...\)` delimiters; display (block) math uses `$$...$$` or `\[...\]`. Inside math mode, special commands render operators, Greek letters, fractions, subscripts, and more. Math mode is where LaTeX shines—fine control over spacing, alignment, and mathematical notation. Inline: `The equation $E = mc^2$ shows energy-mass equivalence.` renders as: The equation $E = mc^2$ shows energy-mass equivalence. Display: `$$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$$` renders centered on its own line: $$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$$ **Greek letters** are typed with backslash and name: `$\alpha, \beta, \gamma, \delta, \epsilon$` renders as $\alpha, \beta, \gamma, \delta, \epsilon$. Uppercase is `\Gamma, \Delta, \Lambda, \Sigma, \Phi, \Psi, \Omega` (only some have uppercase forms). `\epsilon` is regular epsilon; `\varepsilon` is the alternate form. **Subscripts and superscripts** use `_` and `^`: `$x_1$` is subscript, `$x^2$` is superscript, `$x_{i,j}$` groups subscript, `$2^{2^3} = 2^8$` nests powers. Everything after `_` or `^` is grouped; use braces to group multiple characters. **Fractions** use `\frac{numerator}{denominator}`: `$\frac{1}{2}$` is $\frac{1}{2}$. For inline fractions that don't resize, use `\tfrac`: `$\tfrac{1}{2}$` is $\tfrac{1}{2}$. **Operators and functions** have special names: ``` \sin, \cos, \tan -- trigonometric \log, \ln -- logarithms \int, \sum, \prod -- integral, sum, product \lim, \min, \max -- limits and extrema \sqrt{x} -- square root \sqrt[n]{x} -- nth root ``` Examples: `$\sin(\theta) = \frac{\text{opposite}}{\text{hypotenuse}}$` is $\sin(\theta) = \frac{\text{opposite}}{\text{hypotenuse}}$. `$\lim_{x \to \infty} f(x)$` is $\lim_{x \to \infty} f(x)$. **Matrices and arrays** use the `array` environment. Rows are separated by `\\`, columns by `&`: ```latex $$\begin{bmatrix} a & b \\ c & d \end{bmatrix}$$ ``` renders as: $$\begin{bmatrix} a & b \\ c & d \end{bmatrix}$$ Other matrix delimiters: `pmatrix` (parentheses), `vmatrix` (vertical bars), `Vmatrix` (double bars), `matrix` (no delimiters). **Accents** on symbols: `$\hat{x}$` is $\hat{x}$, `$\bar{x}$` is $\bar{x}$, `$\vec{v}$` is $\vec{v}$, `$\tilde{x}$` is $\tilde{x}$, `$\dot{x}$` is $\dot{x}$ (time derivative). **Relational operators**: `=, \neq, <, >, \leq, \geq, \ll, \gg, \approx, \equiv, \propto`. Write `\neq` not `!=`. `\ll` is $\ll$ (much less than). `\approx` is $\approx$ (approximately). **Blackboard bold** for number sets: use the `\mathbb` command. `$\mathbb{N}, \mathbb{Z}, \mathbb{Q}, \mathbb{R}, \mathbb{C}$` renders as $\mathbb{N}, \mathbb{Z}, \mathbb{Q}, \mathbb{R}, \mathbb{C}$ (or use the wiki's macros `\NN, \ZZ, \QQ, \RR, \CC` which may be available in your setup). For complex equations spanning multiple lines, use `align*` environment (not numbered) or `align` (numbered): ```latex \begin{align*} E &= mc^2 \\ p &= mv \end{align*} ``` renders as: $$\begin{align*} E &= mc^2 \\ p &= mv \end{align*}$$ The `&` aligns equations at the `=` sign.