This post demonstrates mathematical notation rendering using KaTeX.
Inline Math
You can write inline math like this: $E = mc^2$, or the quadratic formula: $x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$.
The area of a circle is $A = \pi r^2$, and the Pythagorean theorem states that $a^2 + b^2 = c^2$.
Display Math
Quadratic Formula
$$ x = \frac{-b \pm \sqrt{b^2-4ac}}{2a} $$
Summation
$$ \sum_{i=1}^{n} i = \frac{n(n+1)}{2} $$
Integration
$$ \int_{a}^{b} f(x) , dx = F(b) - F(a) $$
Matrix
$$ \begin{bmatrix} a & b \ c & d \end{bmatrix} \begin{bmatrix} x \ y \end{bmatrix}
\begin{bmatrix} ax + by \ cx + dy \end{bmatrix} $$
Limits
$$ \lim_{x \to \infty} \frac{1}{x} = 0 $$
Complex Formulas
Euler’s Formula
$$ e^{i\pi} + 1 = 0 $$
Taylor Series
$$ f(x) = f(a) + f’(a)(x-a) + \frac{f’’(a)}{2!}(x-a)^2 + \frac{f’’’(a)}{3!}(x-a)^3 + \cdots $$
Fourier Transform
$$ \hat{f}(\xi) = \int_{-\infty}^{\infty} f(x) e^{-2\pi i x \xi} , dx $$
Maxwell’s Equations
$$ \begin{aligned} \nabla \cdot \mathbf{E} &= \frac{\rho}{\epsilon_0} \ \nabla \cdot \mathbf{B} &= 0 \ \nabla \times \mathbf{E} &= -\frac{\partial \mathbf{B}}{\partial t} \ \nabla \times \mathbf{B} &= \mu_0 \mathbf{J} + \mu_0 \epsilon_0 \frac{\partial \mathbf{E}}{\partial t} \end{aligned} $$
Probability and Statistics
Normal Distribution
$$ f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2} $$
Bayes’ Theorem
$$ P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)} $$
Calculus
Chain Rule
$$ \frac{d}{dx}[f(g(x))] = f’(g(x)) \cdot g’(x) $$
Product Rule
$$ \frac{d}{dx}[u(x) \cdot v(x)] = u’(x) \cdot v(x) + u(x) \cdot v’(x) $$
Linear Algebra
Eigenvalue Equation
$$ A\mathbf{v} = \lambda\mathbf{v} $$
Determinant
$$ \det(A) = \begin{vmatrix} a & b \ c & d \end{vmatrix} = ad - bc $$
Special Functions
Gamma Function
$$ \Gamma(n) = (n-1)! = \int_0^{\infty} t^{n-1} e^{-t} , dt $$
Binomial Coefficient
$$ \binom{n}{k} = \frac{n!}{k!(n-k)!} $$
Greek Letters and Symbols
Common symbols: $\alpha$, $\beta$, $\gamma$, $\Delta$, $\Sigma$, $\Omega$, $\theta$, $\phi$, $\psi$
Operators: $\leq$, $\geq$, $\neq$, $\approx$, $\infty$, $\partial$, $\nabla$
Conclusion
KaTeX supports a wide range of mathematical notation and renders beautifully in the browser!