Skip to content

Working with LaTeX Equations

This site now supports LaTeX equations powered by KaTeX.

You can use both inline and display math directly in your Markdown files.

Use single dollar signs for inline equations:

The famous energy-mass equivalence is E=mc2E = mc^2.

The logistic map, often used to study complex systems, is given by xn+1=rxn(1xn)x_{n+1} = r x_n (1 - x_n).

For larger, centered equations use double dollar signs:

f(x)=f^(ξ)e2πixξdξf(x) = \int_{-\infty}^{\infty} \hat{f}(\xi)\,e^{2 \pi i x \xi} \,d\xi i=1ni=n(n+1)2\sum_{i=1}^{n} i = \frac{n(n+1)}{2} i=1n(1+xi)\prod_{i=1}^{n} (1 + x_i)

The covariance matrix in quantitative finance often looks like this:

Σ=(σ12ρσ1σ2ρσ1σ2σ22)\Sigma = \begin{pmatrix} \sigma_1^2 & \rho \sigma_1 \sigma_2 \\ \rho \sigma_1 \sigma_2 & \sigma_2^2 \end{pmatrix}

The price of a European call option CC under the Black-Scholes model:

C=S0N(d1)KerTN(d2)C = S_0 N(d_1) - K e^{-rT} N(d_2)

where

d1=ln(S0/K)+(r+σ2/2)TσT,d2=d1σTd_1 = \frac{\ln(S_0 / K) + (r + \sigma^2 / 2)T}{\sigma \sqrt{T}}, \quad d_2 = d_1 - \sigma \sqrt{T}

The Lorenz equations, a classic example of chaotic behavior:

dxdt=σ(yx)dydt=x(ρz)ydzdt=xyβz\begin{aligned} \frac{dx}{dt} &= \sigma (y - x) \\ \frac{dy}{dt} &= x (\rho - z) - y \\ \frac{dz}{dt} &= x y - \beta z \end{aligned}
  • Inline: $ ... $
  • Display: $$ ... $$ or \[ ... \]
  • KaTeX supports most common LaTeX math commands, including \begin{align}, \begin{matrix}, and many more.
  • For very advanced needs, you can also use the $$ syntax inside MDX files.

Happy writing!