Math rendering

June 19, 2026 · View on GitHub

Inline math

Einstein's equation E=mc2E = mc^2 appears inline with text.

Greek letters: α\alpha, β\beta, γ\gamma, Δ\Delta, Σ\Sigma, Ω\Omega.

Subscripts and superscripts: xi2x_i^2, an+1a_{n+1}, eiπ+1=0e^{i\pi} + 1 = 0.

Fractions and roots

The quadratic formula: x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.

Simple fractions: 12\frac{1}{2}, a+bc\frac{a+b}{c}.

Operators

Summation: i=1ni=n(n+1)2\sum_{i=1}^{n} i = \frac{n(n+1)}{2}.

Product: k=1nk=n!\prod_{k=1}^{n} k = n!.

Integral: 0exdx=1\int_0^\infty e^{-x} dx = 1.

Display math

i=1ni2=n(n+1)(2n+1)6\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6} 0ex2dx=π2\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2} limn(1+1n)n=e\lim_{n \to \infty} \left(1 + \frac{1}{n}\right)^n = e

Blackboard bold and font commands

R\mathbb{R}, Z\mathbb{Z}, N\mathbb{N}, Q\mathbb{Q}, C\mathbb{C}.

id\mathrm{id}, Set\mathsf{Set}, for all x\text{for all } x.

Set notation and logic

xR,y:x2=y\forall x \in \mathbb{R}, \exists y : x^2 = y.

ABA \cup B, ABA \cap B, ABA \subseteq B, A×BA \times B.

¬pq\neg p \lor q, pqp \land q, pqp \Rightarrow q, pqp \Leftrightarrow q.

Matrices (display)

(abcd)(xy)=(ax+bycx+dy)\begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}

Arrows

f:ABf: A \to B, ABA \hookrightarrow B, ABA \twoheadrightarrow B.