Inline Mathematics
You can write inline math like $E = mc^2$ or $\sin^2\theta + \cos^2\theta = 1$. The quadratic formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.
Display Mathematics
Basic Equations
Centered display equations:
$$f(x) = \int_{-\infty}^{\infty} \hat{f}(\xi) e^{2\pi i \xi x} d\xi$$Matrix Operations
$$ \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_m \end{bmatrix} $$Systems of Equations
$$ \begin{cases} \frac{\partial u}{\partial t} + u\frac{\partial u}{\partial x} = -\frac{1}{\rho}\frac{\partial p}{\partial x} + \nu \frac{\partial^2 u}{\partial x^2} \\ \frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} = 0 \\ u(x,0) = u_0(x) \end{cases} $$Summations and Products
$$\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$$ $$\prod_{k=1}^{n} (1 + x_k) = \sum_{S \subseteq \{1,\ldots,n\}} \prod_{k \in S} x_k$$Advanced Examples
Optimization Problem
Lagrange Multiplier Method:
$$\nabla f(x^*) + \sum_{i=1}^{m} \lambda_i^* \nabla g_i(x^*) + \sum_{j=1}^{p} \mu_j^* \nabla h_j(x^*) = 0$$KKT Conditions:
$$ \begin{align} \nabla_x \mathcal{L}(x^*, \lambda^*, \mu^*) &= 0 \\ g_i(x^*) &\leq 0, \quad i = 1,\ldots,m \\ h_j(x^*) &= 0, \quad j = 1,\ldots,p \\ \lambda_i^* &\geq 0, \quad i = 1,\ldots,m \\ \lambda_i^* g_i(x^*) &= 0, \quad i = 1,\ldots,m \end{align} $$Probability and Statistics
Normal distribution PDF:
$$f(x | \mu, \sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)$$Bayes' Theorem:
$$P(A|B) = \frac{P(B|A)P(A)}{P(B)} = \frac{P(B|A)P(A)}{\sum_{i} P(B|A_i)P(A_i)}$$Differential Equations
Heat equation in 2D:
$$\frac{\partial u}{\partial t} = \alpha \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right)$$Wave equation solution:
$$u(x,t) = \sum_{n=1}^{\infty} \left(A_n \cos\left(\frac{n\pi c t}{L}\right) + B_n \sin\left(\frac{n\pi c t}{L}\right)\right) \sin\left(\frac{n\pi x}{L}\right)$$Graph Theory
Euler's formula for planar graphs: $V - E + F = 2$
Chromatic polynomial: $P(G, k) = k(k-1)^{n-1} - \sum_{e \in E(G)} P(G \setminus e, k)$
Usage Notes
How to use LaTeX in your pages:
- Inline math: Use single dollar signs $...$ or \(...\)
- Display math: Use double dollar signs $$...$$ or \[...\]
- All standard LaTeX commands are supported
- Equations will render automatically when the page loads