由于markdown可以支持latex【非常强大】的数学公式的渲染因此下文整理内容两种均支持。
markdown借鉴latex的公式输入
主要是在jupyter-notebook和CSDN等基本多支持markdown,因此做这个公式输入的整理还是方便日后自己查找使用。
$$内来被识别为latex公式。大写的首字母将全拼首字母大写即可。
$\全拼$
如:
$\alpha$ $\beta$ $\Delta$ $\lambda$ $\delta$ $\Lambda$ $\Delta$
α \alpha α β \beta β Δ \Delta Δ λ \lambda λ δ \delta δ Λ \Lambda Λ Δ \Delta Δ
全表如下:
上标 ^
下标 _
下标的斜体和直立体意义不同
$x^2$ $a_2$ $x^{i+j}$ $x_i$ $x_{\text i}$
x 2 x^2 x2 , a 2 a_2 a2, x i + j x^{i+j} xi+j, x i x_i xi, x i x_{\text i} xi
\frac{分子}{分母}
单个字符还可以这么写:
\frac 分子 分母
\dfrac是显示类型(display),可以显示的更大一点,作用一样
$\frac{1}{2}$ $\frac 1 2$ $\frac{x+y}{1+z}$
1 2 \dfrac{1}{2} 21 , 1 2 \dfrac 1 2 21 , x + y 1 + z \dfrac{x+y}{1+z} 1+zx+y
\sqrt
默认是平方根
\sqrt[根的次数]{数值}
自定义根
$\sqrt 2$ $\sqrt{x+y}$ $\sqrt[3]{x+y}$
2 \sqrt 2 2 , x + y \sqrt{x+y} x+y, x + y 3 \sqrt[3]{x+y} 3x+y
+. -, $\pm$, $\mp$, $\times$, $\cdot$, $\div$
+. -, ± \pm ±, ∓ \mp ∓, × \times ×, ⋅ \cdot ⋅, ÷ \div ÷
$>$, $<$, $\ge$, $\le$, $\gg$, $\ll$, $\ne$, $\approx$, $\equiv$
> > >, < < <, ≥ \ge ≥, ≤ \le ≤, ≫ \gg ≫, ≪ \ll ≪, ≠ \ne =, ≈ \approx ≈, ≡ \equiv ≡
$\cap$, $\cup$, $\in$, $\notin$, $\subseteq$, $\subsetneqq$, $\varnothing$
∩ \cap ∩, ∪ \cup ∪, ∈ \in ∈, ∉ \notin ∈/, ⊆ \subseteq ⊆, ⫋ \subsetneqq ⫋, ∅ \varnothing ∅
$\forall$, $\exists$, $\nexists$, $\because$, $\therefore$
∀ \forall ∀, ∃ \exists ∃, ∄ \nexists ∄, ∵ \because ∵, ∴ \therefore ∴
$\ R$, $\ Q$, $\ N$, $\ Z$, $\Z_+$
R \ R R, Q \ Q Q, N \ N N, Z \ Z Z, Z + \Z_+ Z+
$\mathcal F$, $\mathscr F$, $\cdots$, $\vdots$, $\ddots$
F \mathcal F F, F \mathscr F F, ⋯ \cdots ⋯, ⋮ \vdots ⋮, ⋱ \ddots ⋱
$\infty$, $\partial$, $\nabla$, $\propto$, $\degree$
∞ \infty ∞, ∂ \partial ∂, ∇ \nabla ∇, ∝ \propto ∝, ° \degree °
$\sin x$, $\sec x$, $\cosh x$, $\log_2 x$, $\ln n$
sin x \sin x sinx, sec x \sec x secx, cosh x \cosh x coshx, log 2 x \log_2 x log2x, ln n \ln n lnn
$\to0$, $\lim_{x \to0}$, $\cosh x$, $\log_2 x$, $\ln n$
→ 0 \to0 →0, lim x → 0 \lim_{x \to0} limx→0, lim x → 0 \lim\limits_{x \to0} x→0lim
求和,求积,积分,多重积分,回路积分,双重回路积分
$\to0$, $\lim_{x \to0}$, $\cosh x$, $\log_2 x$, $\ln n$
∑ \sum ∑, ∏ \prod ∏, ∫ \int ∫, ∬ \iint ∬, ∭ \iiint ∭, ∮ \oint ∮, ∯ \oiint ∬
一个例子:中间的,表示空格
$\int_{-\infty}^0 f(x)\, \text d x$
∫ − ∞ 0 f ( x ) d x \int_{-\infty}^0 f(x)\, \text d x ∫−∞0f(x)dx
$a a$
$a\ a$
$a\quad a$
$a\qquad a$
a a a a aa
a a a\ a a a
a a a\quad a aa
a a a\qquad a aa
单字符向量(固定长度箭头短),多字符向量(箭头长度随着字符数量的增多变化),单均值,多字符均值
y ⃗ \vec y y, A B → \overrightarrow {AB} AB, y ˉ \bar y yˉ, A B ‾ \overline {AB} AB
种类如下:
左箭头,双向右箭头,等价于,长左箭头
← \leftarrow ←, ⇒ \Rightarrow ⇒, ↔ \leftrightarrow ↔, ⟵ \longleftarrow ⟵

大括号,左侧上取整,右侧上取整,左侧下取整,右侧下取整,绝对值,
$\{ \}$
{ } \{ \} {}, ⌈ \lceil ⌈, ⌉ \rceil ⌉, ⌊ \lfloor ⌊, ⌋ \rfloor ⌋, ∣ ∣ | | ∣∣
多行环境:\代表换行,默认右对其,可以在等号前加&实现等号对齐,具体是&后一对齐
$$\begin{align}
a\\f\\c
\end{align}$$
a
+
b
=
c
a
+
f
=
d
d
d
c
d
d
=
j
f
d
$$f(x)=
\begin{cases}
\sin x, -1\le x\le2\\
\cos x, else
\end{cases}$$
f ( x ) = { sin x , − 1 ≤ x ≤ 2 cos x , e l s e f(x)=
f(x)={sinx,−1≤cosx,x≤2else" role="presentation" style="position: relative;"> { sin x , − 1 ≤ x ≤ 2 cos x , e l s e
$$ \bf B^T $$
B T \bf B^T BT
没有括号的矩阵
$$
\begin{matrix}
a & b&c&\cdots&d\\
\vdots & \vdots & \vdots & \ddots &\vdots \\
e & k & f & \cdots & 0
\end{matrix}
$$
a
b
c
⋯
d
⋮
⋮
⋮
⋱
⋮
e
k
f
⋯
0
方括号的矩阵
$$
\begin{bmatrix}
a & b&c&\cdots&d\\
\vdots & \vdots & \vdots & \ddots &\vdots \\
e & k & f & \cdots & 0
\end{bmatrix}
$$
[
a
b
c
⋯
d
⋮
⋮
⋮
⋱
⋮
e
k
f
⋯
0
]
圆括号的矩阵
$$
\begin{pmatrix}
a & b&c&\cdots&d\\
\vdots & \vdots & \vdots & \ddots &\vdots \\
e & k & f & \cdots & 0
\end{pmatrix}
$$
(
a
b
c
⋯
d
⋮
⋮
⋮
⋱
⋮
e
k
f
⋯
0
)
行列式
$$
\begin{vmatrix}
a & b&c&\cdots&d\\
\vdots & \vdots & \vdots & \ddots &\vdots \\
e & k & f & \cdots & 0
\end{vmatrix}
$$
∣
a
b
c
⋯
d
⋮
⋮
⋮
⋱
⋮
e
k
f
⋯
0
∣