在Markdown中插入公式,一般為
$公式內容$ 或者 $$公式內容$$
上下標
使用^來表示上標,_來表示下標,同時如果上下標的內容多於一個字符,可以使用{}來將這些內容括起來當做一個整體
$$x = a_1^n + a_{23}^n + a_{4}^n$$
$$x = a_1^n + a_{23}^n + a_{4}^n$$
分數
$$\frac{1}{3} 與 \cfrac{1}{3}$$
$$\frac{1}{3} 與 \cfrac{1}{3}$$
求和
$$\frac{d}{dx}e^{ax}=ae^{ax}\quad \sum_{i=1}^{n}{(X_i - \overline{X})^2}$$
$$\frac{d}{dx}e^{ax}=ae^{ax}\quad \sum_{i=1}^{n}{(X_i - \overline{X})^2}$$
求導數
$$\frac{\partial^2 u}{\partial z^2}$$
$$ \frac{\partial^2 u}{\partial z^2} $$
積分
$$\int ^{10}_1 x^2 dx$$
$$\int ^{10}_1 x^2 dx$$
連乘
$$\prod_{n=1}^{100}2^n$$
$$\prod_{n=1}^{100}2^n$$
極限
$$\lim_{n\rightarrow+\infty} n^2$$
$$\lim_{n\rightarrow+\infty} n^2$$
開方
$$\sqrt[3]{X} 和 \sqrt{1 - x}$$
$$\sqrt[3]{X} 和 \sqrt{1 - x}$$
三角函數
$$\bot \quad \angle \quad \sin(\pi) \quad \cos \quad \tan $$
$$\bot \quad \angle \quad \sin(\pi) \quad \cos \quad \tan $$
對數函數
$$\ln15 \quad \log_210 \quad \lg7$$
$$\ln15 \quad \log_210 \quad \lg7$$
關系運算符
$$+ - \pm \times \div \sum \prod \neq \leq \geq$$
$$+ - \pm \times \div \sum \prod \neq \leq \geq$$
分段函數
$$y=\begin{cases} 0 & z<0 \\ 0.5 & z=0 \\ 1 & z>0 \end{cases}$$
$$y=\begin{cases} 0 & z<0 \\ 0.5 & z=0 \\ 1 & z>0 \end{cases}$$
矩陣
1 $$ 2 \begin{bmatrix} 3 1 & 2 & 3 \\ 4 4 & 5 & 6 \\ 5 7 & 8 & 9 6 \end{bmatrix} \tag{1} 7 $$ 8 9 $$ 10 \begin{Bmatrix} 11 1 & 2 & 3 \\ 12 4 & 5 & 6 \\ 13 7 & 8 & 9 14 \end{Bmatrix} \tag{2} 15 $$ 16 17 $$ 18 \left[ 19 \begin{matrix} 20 1 & 2 & \cdots & 4 \\ 21 7 & 6 & \cdots & 5 \\ 22 \vdots & \vdots & \ddots & \vdots \\ 23 8 & 9 & \cdots & 0 \\ 24 \end{matrix} 25 \right] \tag{3} 26 $$ 27 28 $$ 29 \left[ 30 \begin{array}{cc|c} 31 1 & 2 & 3 \\ 32 4 & 5 & 6 33 \end{array} 34 \right] \tag{4} 35 $$ 36 37 這里是行間矩陣測試 38 $\bigl( 39 \begin{smallmatrix} 40 l&l\\j&z 41 \end{smallmatrix} 42 \bigr)$這里是行間矩陣測試
$$
\begin{bmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{bmatrix} \tag{1}
$$
$$
\begin{Bmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{Bmatrix} \tag{2}
$$
$$
\left[
\begin{matrix}
1 & 2 & \cdots & 4 \\
7 & 6 & \cdots & 5 \\
\vdots & \vdots & \ddots & \vdots \\
8 & 9 & \cdots & 0 \\
\end{matrix}
\right] \tag{3}
$$
$$
\left[
\begin{array}{cc|c}
1 & 2 & 3 \\
4 & 5 & 6
\end{array}
\right] \tag{4}
$$
這里是行間矩陣測試
$\bigl(
\begin{smallmatrix}
l&l\\j&z
\end{smallmatrix}
\bigr)$這里是行間矩陣測試
希臘字母

(圖源https://blog.csdn.net/zdk930519/article/details/54137476,侵刪)
參考鏈接
1. https://blog.csdn.net/yimingsilence/article/details/79269017
2. https://blog.csdn.net/zdk930519/article/details/54137476
