Advanced

KaTeX Math

Write beautiful mathematical equations and formulas using KaTeX syntax in your Markdown documents.

Inline Math

Wrap math in single dollar signs $...$ for inline equations that appear within text.

Einstein's famous equation: E = mc²

The Pythagorean theorem: a² + b² = c²

Euler's identity: e + 1 = 0

Block Equations

Use double dollar signs $$...$$ to display math as a centered block equation.

The quadratic formula:

x = (-b ± √(b² - 4ac)) / 2a

Common Symbols

KaTeX supports hundreds of mathematical symbols. Here are some of the most commonly used ones.

α\alpha
β\beta
γ\gamma
Δ\Delta
\sum
\int
\infty
\sqrt{}
\approx
\neq
\leq
\geq

Fractions

Use \frac{numerator}{denominator} to create fractions.

1/2 + 1/3 = 5/6
d/dx(f(x)/g(x)) = (f'g - fg')/g²

Matrices

Create matrices with pmatrix (parentheses) or bmatrix (brackets).

(a b; c d)[1 0; 0 1]

Advanced Examples

Combine multiple KaTeX features to write complex equations.

Σ(i=1 to n) i = n(n+1)/2
∫(-∞ to ∞) e^(-x²) dx = √π