大家好,欢迎来到IT知识分享网。
文章目录
Markdown 常用数学符号和公式
1. 如何插入公式
-
行中插入公式:
$数学公式$例如:$y=ax+b$
显示: y = a x + b y=ax+b y=ax+b
-
与正文独立插入公式
$$ 数学公式 $$例如:
$$ y=ax+b $$显示: y = a x + b y=ax+b y=ax+b
2. 常见数学符号和公式
2.1 上下标
| 显示 | 代码 | 描述 |
|---|---|---|
| x 2 x^{2} x2 | $x^{2}$ | 上标,例如:x 的平方 |
| x i x_{i} xi | $x_{i}$ | 下标,例如:第 i 个 x |
2.2 括号和分隔符
()、[] 和 | 可以直接输入
| 显示 | 代码 | 显示 | 代码 | 描述 |
|---|---|---|---|---|
| ⟨ \langle ⟨ | $\langle$ | ⟩ \rangle ⟩ | $\rangle$ | 尖括号 |
| { \{ { |
$\{$ | } \} } | $\}$ | 花括号 |
2.3 分数
-
分数通常使用 \frac{分子}{分母},如:
显示 代码 x y \frac{x}{y} yx $\frac{x}{y} $ -
分式较为复杂时,可以使用 分子 \over 分母表示,如:
显示 代码 a + b + c + d + e + f g + h + i + j + k + l a+b+c+d+e+f \over g+h+i+j+k+l g+h+i+j+k+la+b+c+d+e+f $a+b+c+d+e+f \over g+h+i+j+k+l$ -
当分式仅有两个字符时,可以使用 \frac ab 来快速生成 a b \frac ab ba
2.4 开方
使用 \sqrt[根指数,默认为2]{被开方数},如:
| 显示 | 代码 |
|---|---|
| 2 \sqrt{2} 2 | $\sqrt{2}$ |
| 5 n \sqrt[n]{5} n5 | $\sqrt[n]{5}$ |
2.5 向量和箭头
| 显示 | 代码 | 描述 |
|---|---|---|
| x ⃗ \vec{x} x | $\vec{x}$ | 向量 x |
| x ← \overleftarrow{x} x | $\overleftarrow{x}$ | x 上方左箭头 |
| x → \overrightarrow{x} x | $\overrightarrow{x}$ | x 上方向右箭头 |
| ← \leftarrow ← | $\leftarrow$ | 左箭头 |
| → \rightarrow → | $\rightarrow$ | 右箭头 |
| ↑ \uparrow ↑ | $\uparrow$ | 向上的箭头 |
| ↓ \downarrow ↓ | $\downarrow$ | 向下的箭头 |
| ⇐ \Leftarrow ⇐ | $\Leftarrow$ | |
| ⇒ \Rightarrow ⇒ | $\Rightarrow$ | |
| ⇑ \Uparrow ⇑ | $\Uparrow$ | |
| ⇓ \Downarrow ⇓ | $\Downarrow$ |
2.6 积分
使用 \int_{积分上限}^{积分上限} {被积表达式}
例如:
$$ \int_{0}^{1}{x^{3}}dx $$
显示:
∫ 0 1 x 3 d x \int_{0}^{1}{x^{3}}dx ∫01x3dx
2.7 极限运算
使用 \lim{变量 \to 表达式} 表达式
例如:
$$ \lim_{x \to \infty} \frac{1}{n(n+1)} $$
显示:
lim x → ∞ 1 n ( n + 1 ) \lim_{x \to \infty} \frac{1}{n(n+1)} x→∞limn(n+1)1
2.8 累加、累乘
累加
使用 \sum_{下标表达式}^{上标表达式} {累加表达式}
例如:
$$ \sum_{i=0}^{n} x_i $$
显示:
∑ i = 0 n x i \sum_{i=0}^{n} x_i i=0∑nxi
与累加类似,
- 累乘使用
$\prod$ - 并集使用
$\bigcup$ - 交集使用
$\bigcap$
例如:
$$ \sum_{i=1}^n \frac{1}{i^2} \quad and \quad \prod_{i=1}^n \frac{1}{i^2} \quad and \quad \bigcup_{i=1}^{2} \Bbb{R} $$
显示:
∑ i = 1 n 1 i 2 a n d ∏ i = 1 n 1 i 2 a n d ⋃ i = 1 2 R \sum_{i=1}^n \frac{1}{i^2} \quad and \quad \prod_{i=1}^n \frac{1}{i^2} \quad and \quad \bigcup_{i=1}^{2} \Bbb{R} i=1∑ni21andi=1∏ni21andi=1⋃2R
2.9 希腊字母
输入 \小写希腊字母英文全称 和 \首字母大写希腊字母英文全称 来分别输入小写和大写希腊字母
| 显示(小写) | 代码(小写) | 显示(大写) | 代码(大写) |
|---|---|---|---|
| α \alpha α | $\alpha$ | A A A | $A$ |
| β \beta β | $\beta$ | B B B | $B$ |
| γ \gamma γ | $\gamma$ | Γ \Gamma Γ | $\Gamma$ |
| δ \delta δ | $\delta$ | Δ \Delta Δ | $\Delta$ |
| ϵ \epsilon ϵ | $\epsilon$ | E \Epsilon E | $\Epsilon $ |
| ζ \zeta ζ | $\zeta$ | Z \Zeta Z | $\Zeta$ |
| η \eta η | $\eta$ | H \Eta H | $\Eta$ |
| θ \theta θ | $\theta$ | Θ \Theta Θ | $\Theta$ |
| ι \iota ι | $\iota$ | I \Iota I | $\Iota $ |
| κ \kappa κ | $\kappa$ | K \Kappa K | $\Kappa$ |
| λ \lambda λ | $\lambda$ | Λ \Lambda Λ | $\Lambda $ |
| μ \mu μ | $\mu$ | M \Mu M | $\Mu $ |
| ν \nu ν | $\Mu$ | N \Nu N | $\Nu$ |
| ξ \xi ξ | $\xi$ | Ξ \Xi Ξ | $\Xi $ |
| o o o | $o$ | O O O | $O$ |
| π \pi π | $\pi$ | Π \Pi Π | $\Pi$ |
| ρ \rho ρ | $\rho$ | P \Rho P | $\Rho$ |
| σ \sigma σ | $\sigma$ | Σ \Sigma Σ | $\Sigma $ |
| τ \tau τ | $\tau$ | T \Tau T | $\Tau$ |
| υ \upsilon υ | $\upsilon$ | Υ \Upsilon Υ | $\Upsilon$ |
| ϕ \phi ϕ | $\phi$ | Φ \Phi Φ | $\Phi$ |
| χ \chi χ | $\chi$ | X \Chi X | $\Chi$ |
| ψ \psi ψ | $\psi$ | Ψ \Psi Ψ | $\Psi$ |
| ω \omega ω | $\omega$ | Ω \Omega Ω | $\Omega$ |
2.10 关系运算符
| 显示 | 代码 |
|---|---|
| ± \pm ± | $\pm$ |
| × \times × | $\times$ |
| ÷ \div ÷ | $\div$ |
| ∣ \mid ∣ | $\mid$ |
| ∤ \nmid ∤ | $\nmid$ |
| ⋅ \cdot ⋅ | $\cdot$ |
| ∘ \circ ∘ | $\circ$ |
| ∗ \ast ∗ | $\ast$ |
| ⨀ \bigodot ⨀ | $\bigodot$ |
| ⨂ \bigotimes ⨂ | $\bigotimes$ |
| ⨁ \bigoplus ⨁ | $\bigoplus$ |
| ≤ \leq ≤ | $\leq$ |
| ≥ \geq ≥ | $\geq$ |
| ≠ \neq = | $\neq$ |
| ≈ \approx ≈ | $\approx$ |
| ≡ \equiv ≡ | $\equiv$ |
| ∑ \sum ∑ | $\sum$ |
| ∏ \prod ∏ | $\prod$ |
| ∐ \coprod ∐ | $\coprod$ |
| \ \backslash \ | $\backslash$ |
2.11 集合运算
| 显示 | 代码 | 描述 |
|---|---|---|
| ∅ \emptyset ∅ | $\emptyset$ | 空集 |
| ∈ \in ∈ | $\in$ | 属于 |
| ∉ \notin ∈/ | $\notin$ | 不属于 |
| ⊂ \subset ⊂ | $\subset$ | 真包含于 |
| ⊃ \supset ⊃ | $\supset$ | 真包含 |
| ⊆ \subseteq ⊆ | $\subseteq$ | 包含于 |
| ⊇ \supseteq ⊇ | $\supseteq$ | 包含 |
| ∩ \cap ∩ | $\cap$ | 交集 |
| ∪ \cup ∪ | $\cup$ | 并集 |
| ∨ \vee ∨ | $\vee$ | |
| ∧ \wedge ∧ | $\wedge$ | |
| ⊎ \uplus ⊎ | $\uplus$ | |
| ⊤ \top ⊤ | $\top$ | |
| ⊥ \bot ⊥ | $\bot$ | |
| ∁ \complement ∁ | $\complement$ |
2.12 对数运算
| 显示 | 代码 |
|---|---|
| log \log log | $\log$ |
| lg \lg lg | $\lg$ |
| ln \ln ln | $\ln$ |
2.13 三角运算
| 显示 | 代码 |
|---|---|
| ∽ \backsim ∽ | $\backsim$ |
| ≅ \cong ≅ | $\cong$ |
| ∠ A \angle A ∠A | $\angle A$ |
| sin \sin sin | $\sin$ |
| cos \cos cos | $\cos$ |
| tan \tan tan | $\tan$ |
| c s c csc csc | $csc$ |
| s e c sec sec | $sec$ |
| cot \cot cot | $\cot$ |
2.14 微积分运算
| 显示 | 代码 |
|---|---|
| ∫ \int ∫ | $\int$ |
| ∬ \iint ∬ | $\iint$ |
| ∭ \iiint ∭ | $\iiint$ |
| ∂ \partial ∂ | $\partial$ |
| ∮ \oint ∮ | $\oint$ |
| ′ \prime ′ | $\prime$ |
| lim \lim lim | $\lim$ |
| ∞ \infty ∞ | $\infty $ |
| ∇ \nabla ∇ | $\nabla$ |
2.15 逻辑运算
| 显示 | 代码 | 描述 |
|---|---|---|
| ∵ \because ∵ | $\because | 因为 |
| ∴ \therefore ∴ | $\therefore$ | 所以 |
| ¬ \neg ¬ | $\neg$ | 非 |
| ∀ \forall ∀ | $\forall$ | 任意 |
| ∃ \exists ∃ | $\exists$ | 存在 |
| ⊄ \not\subset ⊂ | $\not\subset$ | 不包含于 |
| ≮ \not< < | $\not<$ | 不小于 |
| ≯ \not> > | $\not>$ | 不大于 |
| ≠ \not= = | $\not=$ | 不等于 |
2.16 戴帽运算
| 显示 | 代码 |
|---|---|
| x y ^ \hat{xy} xy^ | $\hat{xy}$ |
| x y z ^ \widehat{xyz} xyz |
$\widehat{xyz}$ |
| y ˉ \bar{y} yˉ | $\bar{y}$ |
| x y ~ \tilde{xy} xy~ | $\tilde{xy}$ |
| x y z ~ \widetilde{xyz} xyz |
$\widetilde{xyz}$ |
| y ˊ \acute{y} yˊ | $\acute{y}$ |
| y ˘ \breve{y} y˘ | $\breve{y}$ |
| y ˇ \check{y} yˇ | $\check{y}$ |
| y ˋ \grave{y} yˋ | $\grave{y}$ |
| x ˙ \dot{x} x˙ | $\dot{x}$ |
| x ¨ \ddot{x} x¨ | $\ddot{x}$ |
2.17 为公式加注释
使用 \text{注释内容}
| 显示 | 代码 |
|---|---|
| f ( x ) = { 0 , if x is even 1 , if x is odd f(x)= \begin{cases} 0,& \text{if x is even} \\ 1, & \text{if x is odd} \end{cases} f(x)={ 0,1,if x is evenif x is odd |
$f(x)= \begin{cases} 0,& \text{if x is even} \\ 1, & \text{if x is odd} \end{cases}$ |
2.18 为公式加序号
使用 \tag{公式序号}
| 显示 | 代码 |
|---|---|
| y = a x + b (公式1) y=ax+b \tag{公式1} y=ax+b(公式1) | $y=ax+b \tag{公式1}$ |
2.19 加粗
数字加粗:
使用$\mathbf{数学符号}$
| 显示 | 代码 |
|---|---|
| 0123456789 \mathbf{0123456789} 0123456789 | $\mathbf{0123456789}$ |
希腊字母加粗:
使用$\pmb{希腊字母}$
| 显示 | 代码 |
|---|---|
| α β \pmb{\alpha\beta} αβαβαβ | $\pmb{\alpha\beta}$ |
斜体加粗:
使用$\boldsymbol{希腊字母}$
| 显示 | 代码 |
|---|---|
| α β \boldsymbol{\alpha\beta} αβ | $\boldsymbol{\alpha\beta}$ |
2.20 矩阵
使用$$\begin{matrix}…\end{matrix}$$来实现矩阵。
不带括号的矩阵
代码:
\$\$
\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{matrix}
\$\$
显示效果:
1 2 3 4 5 6 7 8 9 \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} 147258369
带{ }的矩阵
代码:
$$
\left\{
\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{matrix}
\right\} \tag{2}
$$
显示效果:
{ 1 2 3 4 5 6 7 8 9 } \left\{ \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} \right\} ⎩⎨⎧147258369⎭⎬⎫
带[ ]的矩阵
代码:
$$
\left[
\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{matrix}
\right] \tag
$$
显示效果:
[ 1 2 3 4 5 6 7 8 9 ] \left[ \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} \right] ⎣⎡147258369⎦⎤
带省略号的矩阵
代码:
$$
\left[
\begin{matrix}
1 & 2 & \cdots & 4 \\
7 & 6 & \cdots & 5 \\
\vdots & \vdots & \ddots & \vdots \\
8 & 9 & \cdots & 0 \\
\end{matrix}
\right]
$$
显示效果:
[ 1 2 ⋯ 4 7 6 ⋯ 5 ⋮ ⋮ ⋱ ⋮ 8 9 ⋯ 0 ] \left[ \begin{matrix} 1 & 2 & \cdots & 4 \\ 7 & 6 & \cdots & 5 \\ \vdots & \vdots & \ddots & \vdots \\ 8 & 9 & \cdots & 0 \\ \end{matrix} \right] ⎣⎢⎢⎢⎡17⋮826⋮9⋯⋯⋱⋯45⋮0⎦⎥⎥⎥⎤
2.21 乘积
叉乘:
| 显示 | 代码 |
|---|---|
| a × b a \times b a×b | $a \times b$ |
点乘:
| 显示 | 代码 |
|---|---|
| a ⋅ b a \cdot b a⋅b | $a \cdot b$ |
内积:
| 显示 | 代码 |
|---|---|
| ⟨ a , b ⟩ \langle a , b \rangle ⟨a,b⟩ | $\langle a , b \rangle$ |
外积:
| 显示 | 代码 |
|---|---|
| a ⊗ b a \otimes b a⊗b | $a \otimes b$ |
2.22 实数R
| 显示 | 代码 |
|---|---|
| R \mathbb{R} R | $\mathbb{R}$ |
参考资料
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/25135.html