Math Formula Markdown Tutorial
This is an example of inline formulae: $\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$
This is a formula in display mode:
$$
\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}
$$
2. Superscripts (^) or Subscripts (_)
$x_i^2$ $x_{min}^2$
lower cases: $\alpha$ $\beta$ $\delta$ $\omega$
upper cases: $\Delta$ $\Omega$
$$
a := x^2-y^3+\cos(\theta)
$$
$$
f(x)=\sigma(x)=\frac{1}{1+e^{-x}}\\
f'(x)=f(x)(1-f(x))
$$
$$
f(n) =
\begin{cases}
n/2, & \text{if $n$ is even} \\
3n+1, & \text{if $n$ is odd}
\end{cases}
$$
Note: "&" is for alignment
${a+1\over b+1}$ $\frac{a+1}{b+1}$ $\cfrac{a}{b}$ $\frac{a}{b}$
$\sum_1^n$
$\sum_{i=0}^\infty i^2$
$\prod$ $\bigcup$ $\iint$ $\idotsint$
$$
\iint\limits_{(x,y)\in D} f(x)
\mathrm{d}x\mathrm{d}y
$$
matrix:无
bmatrix:方括号
vmatrix:竖线
pmatrix:圆括号
Bmatrix:花括号
Vmatrix:双竖线
$$
\begin{bmatrix}
1 & 2 & 2 \\
2 & 3 & 4 \\
4 & 4 & 2
\end{bmatrix}
$$
$$
\begin{pmatrix}
1 & 2 & 2 \\
2 & 3 & 4 \\
4 & 4 & 2
\end{pmatrix}
$$
$$
\sqrt[3]{\frac xy}
$$
$$
{x}^{\pi}
$$
$$
\sqrt[n]{\frac{x^2+\sqrt 2}{x+y}}
$$
$$\backslash$$
$$
\underset{j=1}{\overset{\infty}{\LARGE\mathrm K}}\frac{a_j}{b_j}=\cfrac{a_1}{b_1+\cfrac{a_2}{b_2+\cfrac{a_3}{b_3+\ddots}}}
$$
Logistic/Sigmoid Function:
$$
f(x)=\sigma(x)=\frac{1}{1+e^{-x}}\\
f'(x)=f(x)(1-f(x))
$$
$$
f(x)=\tan^{-1}(x)\\
f'(x)=\frac{1}{x^2+1}
$$
ReLU (Rectified linear unit) Function:
$$
f(x_i) =
\begin{cases}
ReLU(x_i) & \text{if } i \bmod 2 = 0 \\
-ReLU(-x_i) & \text{if } i \bmod 2 \neq 0
\end{cases}
$$
$$
f(x)=\tanh(x)=\frac{(e^{x} - e^{-x})}{(e^{x} + e^{-x})}\\
f'(x)=1-f(x)^2
$$
$$
f(x) = \begin{cases}
0 & \text{for } x < 0\\
1 & \text{for } x \ge 0\end{cases}
$$
MathJax basic tutorial and quick reference
Activation Function