Writing Mathematics: A LaTeX Guide for This Blog

This post is a living reference for authoring mathematical content on this site. All math is written in standard LaTeX syntax and rendered at build time using KaTeX.

Inline Math

Wrap inline expressions in single dollar signs: $...$

The Cauchy–Schwarz inequality states that ∣⟨u,v⟩∣≤∥u∥⋅∥v∥\left|\langle u, v \rangle\right| \leq \|u\| \cdot \|v\| for all vectors u,vu, v in an inner product space.

The Euler identity is perhaps the most celebrated equation in mathematics: eiπ+1=0e^{i\pi} + 1 = 0.

Display Math

Wrap block equations in double dollar signs: $$...$$

The Fourier transform of a function f∈L1(R)f \in L^1(\mathbb{R}) is defined as

f^(ξ)=∫−∞∞f(x) e−2πixξ dx\hat{f}(\xi) = \int_{-\infty}^{\infty} f(x)\, e^{-2\pi i x \xi}\, dx

The general form of Stokes’ theorem unifies the classical theorems of vector calculus:

∫Mdω=∫∂Mω\int_M d\omega = \int_{\partial M} \omega

where MM is an oriented smooth manifold with boundary ∂M\partial M and ω\omega is a differential form.

Aligned Equations

Use \begin{aligned}...\end{aligned} for multi-line derivations:

(x+y)3=(x+y)(x+y)2=(x+y)(x2+2xy+y2)=x3+3x2y+3xy2+y3\begin{aligned} (x + y)^3 &= (x+y)(x+y)^2 \\ &= (x+y)(x^2 + 2xy + y^2) \\ &= x^3 + 3x^2y + 3xy^2 + y^3 \end{aligned}

Common Environments

Matrices:

A=(abcd),det⁡(A)=ad−bcA = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \qquad \det(A) = ad - bc

Cases:

∣x∣={xif x≥0−xif x<0|x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}

Sums and products:

exp⁡(x)=∑n=0∞xnn!,Γ(n)=(n−1)!=∏k=1n−1k\exp(x) = \sum_{n=0}^{\infty} \frac{x^n}{n!}, \qquad \Gamma(n) = (n-1)! = \prod_{k=1}^{n-1} k

Common Symbols Reference

LaTeX Renders as Usage
\mathbb{R} R\mathbb{R} Real numbers
\mathbb{C} C\mathbb{C} Complex numbers
\mathbb{Z} Z\mathbb{Z} Integers
\partial ∂\partial Partial derivative
\nabla ∇\nabla Gradient / del
\otimes ⊗\otimes Tensor product
\oplus ⊕\oplus Direct sum
\hookrightarrow ↪\hookrightarrow Injection
\twoheadrightarrow ↠\twoheadrightarrow Surjection
\iff   ⟺  \iff If and only if
\forall ∀\forall For all
\exists ∃\exists There exists

Writing Tips

  • For long display equations that may overflow on mobile, KaTeX will render them with horizontal scroll automatically.
  • Avoid using \def or \newcommand in individual posts — custom macros must be declared globally in the build config.
  • Use \text{...} inside math mode for prose snippets: f is continuous at x0f \text{ is continuous at } x_0.
  • Prefer \langle \rangle over < > for inner products: ⟨u,v⟩\langle u, v \rangle.