48  LaTeX Command Reference

This appendix provides a comprehensive reference for LaTeX mathematical notation commands commonly used in Quarto and R Markdown documents.

48.1 Greek Letters

Lowercase Greek Letters

Symbol Command Symbol Command Symbol Command
\(\alpha\) \alpha \(\iota\) \iota \(\rho\) \rho
\(\beta\) \beta \(\kappa\) \kappa \(\sigma\) \sigma
\(\gamma\) \gamma \(\lambda\) \lambda \(\tau\) \tau
\(\delta\) \delta \(\mu\) \mu \(\upsilon\) \upsilon
\(\epsilon\) \epsilon \(\nu\) \nu \(\phi\) \phi
\(\varepsilon\) \varepsilon \(\xi\) \xi \(\varphi\) \varphi
\(\zeta\) \zeta \(\pi\) \pi \(\chi\) \chi
\(\eta\) \eta \(\varpi\) \varpi \(\psi\) \psi
\(\theta\) \theta \(\omega\) \omega \(\varsigma\) \varsigma
\(\vartheta\) \vartheta

Uppercase Greek Letters

Symbol Command Symbol Command Symbol Command
\(\Gamma\) \Gamma \(\Xi\) \Xi \(\Phi\) \Phi
\(\Delta\) \Delta \(\Pi\) \Pi \(\Psi\) \Psi
\(\Theta\) \Theta \(\Sigma\) \Sigma \(\Omega\) \Omega
\(\Lambda\) \Lambda \(\Upsilon\) \Upsilon

48.2 Arithmetic Operations

Symbol Command Description Example
\(+\) + Addition $a + b$
\(-\) - Subtraction $a - b$
\(\times\) \times Multiplication $a \times b$
\(\cdot\) \cdot Centered dot $a \cdot b$
\(\div\) \div Division $a \div b$
\(\frac{a}{b}\) \frac{a}{b} Fraction $\frac{x}{y}$
\(\pm\) \pm Plus or minus $\pm 5$
\(\mp\) \mp Minus or plus $\mp 5$

48.3 Powers and Indices

Symbol Command Description Example
\(x^n\) x^n Superscript $x^2$
\(x_n\) x_n Subscript $x_1$
\(x^{n+1}\) x^{n+1} Multi-char superscript $x^{ab}$
\(x_{i,j}\) x_{i,j} Multi-char subscript $x_{ij}$
\(x_n^2\) x_n^2 Combined $x_i^2$
\(\sqrt{x}\) \sqrt{x} Square root $\sqrt{16}$
\(\sqrt[n]{x}\) \sqrt[n]{x} nth root $\sqrt[3]{8}$

48.4 Relation Operators

Symbol Command Description
\(=\) = Equal to
\(\neq\) \neq Not equal to
\(<\) < Less than
\(>\) > Greater than
\(\leq\) \leq Less than or equal
\(\geq\) \geq Greater than or equal
\(\ll\) \ll Much less than
\(\gg\) \gg Much greater than
\(\approx\) \approx Approximately equal
\(\sim\) \sim Similar to / distributed as
\(\simeq\) \simeq Similar or equal
\(\cong\) \cong Congruent
\(\equiv\) \equiv Equivalent
\(\propto\) \propto Proportional to
\(\doteq\) \doteq Approaches the limit

48.5 Set Theory

Symbol Command Description
\(\in\) \in Element of
\(\notin\) \notin Not element of
\(\ni\) \ni Contains as element
\(\subset\) \subset Proper subset
\(\subseteq\) \subseteq Subset or equal
\(\supset\) \supset Proper superset
\(\supseteq\) \supseteq Superset or equal
\(\cap\) \cap Intersection
\(\cup\) \cup Union
\(\setminus\) \setminus Set difference
\(\emptyset\) \emptyset Empty set
\(\varnothing\) \varnothing Empty set (variant)

48.6 Logic Symbols

Symbol Command Description
\(\land\) \land Logical AND
\(\lor\) \lor Logical OR
\(\neg\) \neg Logical NOT
\(\forall\) \forall For all
\(\exists\) \exists There exists
\(\nexists\) \nexists There does not exist
\(\Rightarrow\) \Rightarrow Implies
\(\Leftarrow\) \Leftarrow Is implied by
\(\Leftrightarrow\) \Leftrightarrow If and only if
\(\therefore\) \therefore Therefore
\(\because\) \because Because

48.7 Arrows

Symbol Command Symbol Command
\(\rightarrow\) \rightarrow \(\leftarrow\) \leftarrow
\(\Rightarrow\) \Rightarrow \(\Leftarrow\) \Leftarrow
\(\leftrightarrow\) \leftrightarrow \(\Leftrightarrow\) \Leftrightarrow
\(\longrightarrow\) \longrightarrow \(\longleftarrow\) \longleftarrow
\(\uparrow\) \uparrow \(\downarrow\) \downarrow
\(\Uparrow\) \Uparrow \(\Downarrow\) \Downarrow
\(\nearrow\) \nearrow \(\searrow\) \searrow
\(\nwarrow\) \nwarrow \(\swarrow\) \swarrow
\(\mapsto\) \mapsto \(\to\) \to

48.8 Sums, Products, and Integrals

Symbol Command Example
\(\sum\) \sum $\sum_{i=1}^{n} x_i$
\(\prod\) \prod $\prod_{i=1}^{n} x_i$
\(\coprod\) \coprod $\coprod_{i=1}^{n}$
\(\int\) \int $\int_a^b f(x) dx$
\(\iint\) \iint $\iint_D f(x,y) dA$
\(\iiint\) \iiint $\iiint_V f dV$
\(\oint\) \oint $\oint_C F \cdot dr$
\(\bigcup\) \bigcup $\bigcup_{i=1}^{n} A_i$
\(\bigcap\) \bigcap $\bigcap_{i=1}^{n} A_i$
\(\bigoplus\) \bigoplus $\bigoplus_{i=1}^{n}$
\(\bigotimes\) \bigotimes $\bigotimes_{i=1}^{n}$
\(\lim\) \lim $\lim_{x \to 0}$
\(\limsup\) \limsup $\limsup_{n \to \infty}$
\(\liminf\) \liminf $\liminf_{n \to \infty}$

48.9 Mathematical Functions

Symbol Command Symbol Command
\(\sin\) \sin \(\arcsin\) \arcsin
\(\cos\) \cos \(\arccos\) \arccos
\(\tan\) \tan \(\arctan\) \arctan
\(\cot\) \cot \(\sec\) \sec
\(\csc\) \csc \(\sinh\) \sinh
\(\cosh\) \cosh \(\tanh\) \tanh
\(\log\) \log \(\ln\) \ln
\(\lg\) \lg \(\exp\) \exp
\(\max\) \max \(\min\) \min
\(\sup\) \sup \(\inf\) \inf
\(\arg\) \arg \(\det\) \det
\(\dim\) \dim \(\ker\) \ker
\(\gcd\) \gcd \(\deg\) \deg
\(\hom\) \hom \(\Pr\) \Pr

48.10 Accents and Decorations

Symbol Command Description
\(\hat{x}\) \hat{x} Hat (estimator)
\(\widehat{xyz}\) \widehat{xyz} Wide hat
\(\bar{x}\) \bar{x} Bar (mean)
\(\overline{xyz}\) \overline{xyz} Overline
\(\tilde{x}\) \tilde{x} Tilde
\(\widetilde{xyz}\) \widetilde{xyz} Wide tilde
\(\vec{x}\) \vec{x} Vector arrow
\(\overrightarrow{AB}\) \overrightarrow{AB} Vector from A to B
\(\dot{x}\) \dot{x} Dot (time derivative)
\(\ddot{x}\) \ddot{x} Double dot
\(\acute{x}\) \acute{x} Acute accent
\(\grave{x}\) \grave{x} Grave accent
\(\breve{x}\) \breve{x} Breve
\(\check{x}\) \check{x} Check mark

48.11 Font Styles

Symbol Command Description
\(\mathbf{x}\) \mathbf{x} Bold (vectors/matrices)
\(\mathit{x}\) \mathit{x} Italic
\(\mathrm{x}\) \mathrm{x} Roman (upright)
\(\mathsf{x}\) \mathsf{x} Sans-serif
\(\mathtt{x}\) \mathtt{x} Typewriter
\(\mathcal{X}\) \mathcal{X} Calligraphic
\(\mathbb{R}\) \mathbb{R} Blackboard bold
\(\mathfrak{X}\) \mathfrak{X} Fraktur
\(\boldsymbol{\alpha}\) \boldsymbol{\alpha} Bold symbol (Greek)

48.12 Common Number Sets

Symbol Command Description
\(\mathbb{N}\) \mathbb{N} Natural numbers
\(\mathbb{Z}\) \mathbb{Z} Integers
\(\mathbb{Q}\) \mathbb{Q} Rational numbers
\(\mathbb{R}\) \mathbb{R} Real numbers
\(\mathbb{C}\) \mathbb{C} Complex numbers
\(\mathbb{P}\) \mathbb{P} Prime numbers

48.13 Brackets and Delimiters

Symbol Command Description
\((x)\) (x) Parentheses
\([x]\) [x] Square brackets
\(\{x\}\) \{x\} Curly braces
\(\langle x \rangle\) \langle x \rangle Angle brackets
\(|x|\) |x| Vertical bars (absolute value)
\(\|x\|\) \|x\| Double bars (norm)
\(\lfloor x \rfloor\) \lfloor x \rfloor Floor
\(\lceil x \rceil\) \lceil x \rceil Ceiling

Auto-sizing Delimiters

Use \left and \right for automatically sized delimiters:

Example Code
\(\left( \frac{a}{b} \right)\) \left( \frac{a}{b} \right)
\(\left[ \sum_{i=1}^{n} x_i \right]\) \left[ \sum_{i=1}^{n} x_i \right]
\(\left\{ \frac{a}{b} \right\}\) \left\{ \frac{a}{b} \right\}
\(\left| \frac{a}{b} \right|\) \left| \frac{a}{b} \right|

48.14 Matrix Environments

Environment Result Brackets
matrix \(\begin{matrix} a & b \\ c & d \end{matrix}\) None
pmatrix \(\begin{pmatrix} a & b \\ c & d \end{pmatrix}\) Parentheses
bmatrix \(\begin{bmatrix} a & b \\ c & d \end{bmatrix}\) Square brackets
Bmatrix \(\begin{Bmatrix} a & b \\ c & d \end{Bmatrix}\) Curly braces
vmatrix \(\begin{vmatrix} a & b \\ c & d \end{vmatrix}\) Vertical bars
Vmatrix \(\begin{Vmatrix} a & b \\ c & d \end{Vmatrix}\) Double vertical

Syntax:

$$\begin{bmatrix}
a & b & c \\
d & e & f
\end{bmatrix}$$

48.15 Spacing

Command Width Example
\, 3/18 em (thin) \(a\,b\)
\: 4/18 em (medium) \(a\:b\)
\; 5/18 em (thick) \(a\;b\)
\quad 1 em \(a\quad b\)
\qquad 2 em \(a\qquad b\)
\! -3/18 em (negative) \(a\!b\)

48.16 Dots and Ellipses

Symbol Command Usage
\(\ldots\) \ldots Baseline dots
\(\cdots\) \cdots Centered dots
\(\vdots\) \vdots Vertical dots
\(\ddots\) \ddots Diagonal dots
\(\cdot\) \cdot Single centered dot

48.17 Miscellaneous Symbols

Symbol Command Description
\(\infty\) \infty Infinity
\(\partial\) \partial Partial derivative
\(\nabla\) \nabla Nabla / Del
\(\prime\) \prime Prime
\(\angle\) \angle Angle
\(\triangle\) \triangle Triangle
\(\square\) \square Square
\(\circ\) \circ Circle / composition
\(\bullet\) \bullet Bullet
\(\star\) \star Star
\(\dagger\) \dagger Dagger
\(\ddagger\) \ddagger Double dagger
\(\ell\) \ell Script l
\(\hbar\) \hbar h-bar (Planck’s constant)
\(\Re\) \Re Real part
\(\Im\) \Im Imaginary part
\(\aleph\) \aleph Aleph

48.18 Statistical Notation

Expression Code Description
\(\bar{x}\) \bar{x} Sample mean
\(\hat{\mu}\) \hat{\mu} Estimated parameter
\(\tilde{x}\) \tilde{x} Median
\(X \sim N(\mu, \sigma^2)\) X \sim N(\mu, \sigma^2) Distribution
\({n \choose k}\) {n \choose k} Binomial coefficient
\(\binom{n}{k}\) \binom{n}{k} Binomial coefficient (alternate)
\(P(A \mid B)\) P(A \mid B) Conditional probability
\(\mathbb{E}[X]\) \mathbb{E}[X] Expected value
\(\text{Var}(X)\) \text{Var}(X) Variance
\(\text{Cov}(X, Y)\) \text{Cov}(X, Y) Covariance

48.19 Common Statistical Formulas

Sample Statistics

Statistic Formula
Sample mean \(\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i\)
Sample variance \(s^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar{x})^2\)
Standard error \(SE = \frac{s}{\sqrt{n}}\)
Z-score \(z = \frac{x - \mu}{\sigma}\)

Probability Distributions

Distribution Probability Function
Binomial \(P(X=k) = \binom{n}{k} p^k (1-p)^{n-k}\)
Poisson \(P(X=k) = \frac{e^{-\lambda}\lambda^k}{k!}\)
Normal \(f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}}\)
Exponential \(f(x) = \lambda e^{-\lambda x}\)

48.20 Equation Numbering in Quarto

Add equation labels for cross-referencing:

$$
E = mc^2
$$ {#eq-einstein}

See @eq-einstein for the mass-energy equivalence.

Multiple equations with alignment:

$$
\begin{aligned}
y &= mx + b \\
  &= 2x + 3
\end{aligned}
$$ {#eq-line}