Cheat sheet for displaying mathematical notations with MathJax.
1. MathJax
MathJax is a cross-browser JavaScript library that displays mathematical notation in web browsers.
Read tutorial Jekyll - Math Symbols with MathJax to learn how to use MathJax in web page and Markdown.
2. MathJax Cheat Sheet
Title |
Formula |
Markdown |
Variables |
x1, y1, z3,4 |
$x_1$, $y_1$, $z_{3,4}$ |
Square |
a2, xy, 2n−1 |
$a^2$, $$x^y$, $2^{n-1}$ |
Square Root |
√9, √x, n√x |
$\sqrt{9}$, $\sqrt{x}$, $\sqrt[n]{x}$ |
Logarithm |
logx, log2x |
$\log{}x$, $\log_{2}x$ |
Fraction |
12, (−12)n |
$\frac{1}{2}$, $\left(-\frac{1}{2}\right)^n$ |
Infinity |
∞ |
$\infty$ |
Absolute Value |
|x|, |x2|, ⌊x⌋, ⌈x⌉ |
$\vert{x}\vert$, $\vert\frac{x}{2}\vert$, $\lfloor{x}\rfloor$, $\lceil{x}\rceil$ |
Arithmetic Operation |
2×3, 6÷3 |
$2\times 3$, $6\div 3$ |
Factorial |
n! |
$n!$ |
Trigonometric Functions |
sinθ, cosθ, tanθ |
$\sin\theta$, $$\cos\theta$, $\tan\theta$ |
Greater or Less |
a>b, a≥b, a<b, a≤b |
$a\gt b$, $a\geq b$, $a\lt b$, $a\leq b$ |
Equation |
a=b, a≠b, a≈b |
$a=b$, $a\neq b$, $a\approx b$ |
Times Dot |
a⋅b=ab |
$a\cdot b=ab$ |
Divide Fraction |
a/b=ab |
$a/b=\frac{a}{b}$ |
Trinomial Equation |
a2+b2=c2 |
$a^2 + b^2 = c^2$ |
Matrix Parentheses |
(abcd) |
$$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$$ |
Matrix Brackets |
[abcd] |
$$\begin{bmatrix} a & b \\ c & d \end{bmatrix}$$ |
Matrix Equation |
|abcd|=ad−bc |
$$\begin{vmatrix} a & b \\ c & d \end{vmatrix}=ad-bc$$ |
Set |
x∈A, A∋x, x∉A |
$x\in A$, $A\ni x$, $x\notin A$ |
Subset |
A⊂B, A⊆B, A⊄B |
$A\subset B$, $A\subseteq B$, $A \not \subset B$ |
Intersection & Union |
A∩B, A∪B, ¯A |
$A\cap B$, $A\cup B$, $\overline{A}$ |
Quadratic formula |
x=−b±√b2−4ac2a |
$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $ |
Binomial |
√3x−1+(1+x)2 |
$\sqrt{3x-1}+(1+x)^2$ |
Differentiation |
f′, f(n), Dxf |
$f'$, $f^{(n)}$, $D_x f$ |
Integral |
∫10f(x)dx |
$\int_0^1 f(x) dx$ |
Integral Large |
∫∞−∞f(x)dx |
$\displaystyle \int_{-\infty }^{\infty}f(x)dx$ |
Max Sample |
max(a,b)={a(a≧b)b(a<b) |
$$\max(a,b)=\begin{cases}a&(a\geqq b)\\b&(a\lt b)\end{cases}$$ |
Name |
Notation |
Markdown |
Big O [micron] |
O or O |
$\mathcal{O}$ or $O$ |
Big Omega |
Ω |
$\Omega$ |
Big Theta |
Θ |
$\Theta$ |
Small O [micron] |
o |
$o$ |
Small Omega |
ω |
$\omega$ |
On the order of |
∼ |
$\sim$ |
4. Common Time and Space Complexity
Name |
Running Time |
Markdown |
Constant Time |
O(1) |
$O(1)$ |
Logarithmic Time |
O(logn) |
$O(\log{}n)$ |
Linear Time |
O(n) |
$O(n)$ |
Quasilinear Time |
O(nlogn) |
$O(n\log{}n)$ |
Quadratic Time |
O(n2) |
$O(n^2)$ |
Cubic Time |
O(n3) |
$O(n^3)$ |
Factorial Time |
O(n!) |
$O(n!)$ |
5. References