Markdown 数学公式使用总结


title: Markdown 数学公式使用总结
date: 2023-02-15 10:08:12
tags:

  • markdown
    categories:
  • 其他实践
    cover: https://cover.png
    feature: false

1. 语法

1、行内公式

$...$ 表示行内公式,如 O_{1 - \left(\vert a \vert \over 2 \right)} O 1 − ( ∣ a ∣ 2 ) O_{1 - \left(\vert a \vert \over 2 \right)} O1(2a)

2、多行公式

$$...$$ 表示多行公式,如 \sum_{i=0}^\infty x^2 = x_1 + x_2 + x_3 + ... + x_n

∑ i = 0 ∞ x 2 = x 1 + x 2 + x 3 + . . . + x n \sum_{i=0}^\infty x^2 = x_1 + x_2 + x_3 + ... + x_n i=0x2=x1+x2+x3+...+xn

2. 上标、下标、分组

上标和下标

  • 上标: ^,如 x^y x y x^y xy
  • 下标:_,如 a_i a i a_i ai

分组

符号:{},例:C_n^2 C n 2 C_n^2 Cn2C_{n^2} C n 2 C_{n^2} Cn2

3. 希腊字母

公式 小写 公式 大写
\alpha α \alpha α \Alpha A \Alpha A
\beta β \beta β \Beta B \Beta B
\delta δ \delta δ \Delta Δ \Delta Δ
\epsilon ϵ \epsilon ϵ \Epsilon E \Epsilon E
\zeta ζ \zeta ζ \Zeta Z \Zeta Z
\eta η \eta η \Eta H \Eta H
\theta θ \theta θ \Theta Θ \Theta Θ
\iota ι \iota ι \Iota I \Iota I
\kappa κ \kappa κ \Kappa K \Kappa K
\lambda λ \lambda λ \Lambda Λ \Lambda Λ
\mu μ \mu μ \Mu M \Mu M
\nu ν \nu ν \Nu N \Nu N
\xi ξ \xi ξ \Xi Ξ \Xi Ξ
\pi π \pi π \Pi Π \Pi Π
\rho ρ \rho ρ \Rho P \Rho P
\sigma σ \sigma σ \Sigma Σ \Sigma Σ
\tau κ \kappa κ \Tau T \Tau T
\phi ϕ \phi ϕ \Phi Φ \Phi Φ
\psi ψ \psi ψ \Psi Ψ \Psi Ψ
\omega ω \omega ω \omega Ω \Omega Ω
\omicron ο \omicron ο \Omicron O \Omicron O
\gamma γ \gamma γ \Gamma Γ \Gamma Γ

斜体字母加上前缀 var\varDelta Δ \varDelta Δ

4. 算数运算

公式 符号
\times × \times ×
\div ÷ \div ÷
\cdot ⋅ \cdot
< < < <
> > > >
\ll ≪ \ll
\gg ≫ \gg
\lll ⋘ \lll
\pm ± \pm ±
\le\leq ≤ \le ≤ \leq
\ge\geq ≥ \ge ≥ \geq
\mp ∓ \mp
\leqq ≦ \leqq
\geqq ≧ \geqq
\neq ≠ \neq =
\leqslant ⩽ \leqslant
\geqslant ⩾ \geqslant
\approx ≈ \approx

5. 集合

公式 符号
\complement ∁ \complement
\in ∈ \in
\notin ∉ \notin /
/subset ⊂ \subset
\subseteq ⊆ \subseteq
\subsetneq ⊊ \subsetneq
\cap ∩ \cap
\cup ∪ \cup
\varnothing ∅ \varnothing
\emptyset ∅ \emptyset

6. 逻辑运算

公式 符号
\land\wedge ∧ \land ∧ \wedge
\lor\vee ∨ \lor ∨ \vee
\lnot\neg ¬ \lnot ¬ ¬ \neg ¬
\forall ∀ \forall
\exists ∃ \exists
\bot ⊥ \bot
/top ⊤ \top
\vdash ⊢ \vdash
\Vdash ⊩ \Vdash
\vDash ⊨ \vDash
\models ⊨ \models

7.括号

公式 符号
(x) ( x ) (x) (x)
\Bigg(x \Bigg) ( x ) \Bigg(x \Bigg) (x)
\bigg(x \bigg) ( x ) \bigg(x \bigg) (x)
\Big(x \Big) ( x ) \Big( x \Big) (x)
\big(x \big) ( x ) \big(x \big) (x)
\{x \}\lbrace x \rbrace { x } \{x \} { x} { x } \lbrace x \rbrace { x}
[x] [ x ] [x] [x]
\vert x \vert ∣ x ∣ \vert x \vert x
\Vert x \Vert ∥ x ∥ \Vert x \Vert x
\langle x \rangle ⟨ x ⟩ \langle x \rangle x
\lceil x \rceil ⌈ x ⌉ \lceil x \rceil x
\lfloor x \rfloor ⌊ x ⌋ \lfloor x \rfloor x
二项式系数:\dbinom nr ( n r ) \dbinom nr (rn)
\binom nrn \choose r ( n r ) \binom nr (rn) ( n r ) n \choose r (rn)

8. 空格

公式 符号
无视空格:a b a b a b ab
a \qquad b a b a \qquad b ab
a \quad b a b a \quad b ab
a \ b a   b a \ b a b
a \, b a   b a \, b ab
a \; b a    b a \; b ab
a \! b a  ⁣ b a \! b ab

9. 求和、积分、微分

公式 符号
\sum_1^n ∑ 1 n \sum_1^n 1n
\sum_{i=0}^\infty x^2 ∑ i = 0 ∞ x 2 \sum_{i=0}^\infty x^2 i=0x2
\int ∫ \int
\iint ∬ \iint
\iiint ∭ \iiint
\oint ∮ \oint
\prod ∏ \prod
\coprod ∐ \coprod
\bigcap ⋂ \bigcap
\bigcup ⋃ \bigcup
\bigvee ⋁ \bigvee
\bigwedge ⋀ \bigwedge
\infty ∞ \infty
\nabla ∇ \nabla
\partial x ∂ x \partial x x
\mathrm{d} x d x \mathrm{d} x dx
\dot x x ˙ \dot x x˙
\ddot x x ¨ \ddot x x¨

10. 分式、根号、函数

公式 符号
\frac 12 1 2 \frac 12 21
强制分式为显示模式:\dfrac 12 1 2 \dfrac 12 21
强制分式为文本模式:\tfrac 12 1 2 \tfrac 12 21
用于连续分式:\cfrac 12 1 2 \cfrac 12 21
\frac {x^2}{1+x} x 2 1 + x \frac {x^2}{1+x} 1+xx2
用于复杂分式:x^2 \over 1+x x 2 1 + x x^2 \over 1+x 1+xx2
\sqrt {x^3} x 3 \sqrt {x^3} x3
\sqrt[3] {\frac xy} x y 3 \sqrt[3] {\frac xy} 3yx
\sin x sin ⁡ x \sin x sinx
\lim_{x \to 0} lim ⁡ x → 0 \lim_{x \to 0} limx0
\varinjlim l i m → ⁡ \varinjlim lim
\varprojlim l i m ← ⁡ \varprojlim lim
\varliminf l i m ‾ ⁡ \varliminf lim
\varlimsup l i m ‾ ⁡ \varlimsup lim

11. 箭头符号

公式 符号
\rightarrow → \rightarrow
\leftarrow ← \leftarrow
\Rightarrow ⇒ \Rightarrow
\Leftarrow ⇐ \Leftarrow
\longrightarrow ⟶ \longrightarrow
\longleftarrow ⟵ \longleftarrow
\Leftrightarrow ⇔ \Leftrightarrow
\leftrightarrow ↔ \leftrightarrow
\Longleftrightarrow ⟺ \Longleftrightarrow
\longleftrightarrow ⟷ \longleftrightarrow
\xrightarrow[y>0] {x+y} → y > 0 x + y \xrightarrow[y>0] {x+y} x+y y>0
a \to b a → b a \to b ab
a \gets b a ← b a \gets b ab
a \implies b a    ⟹    b a \implies b ab
a \impliedby b a    ⟸    b a \impliedby b ab
\lim_{x \to 0} lim ⁡ x → 0 \lim_{x \to 0} limx0
\longmapsto ⟼ \longmapsto
\hookleftarrow ↩ \hookleftarrow

12. 几何和向量

公式 符号
\triangle △ \triangle
\Diamond ◊ \Diamond
\Box □ \Box
\odot ⊙ \odot
\angle ABC ∠ A B C \angle ABC ABC
30^\circ 3 0 ∘ 30^\circ 30
\perp ⊥ \perp
\sim ∼ \sim
\cong ≅ \cong
\\hat{a} a ^ \hat{a} a^
\vec{a} a ⃗ \vec{a} a
\overrightarrow{AB} A B → \overrightarrow{AB} AB
\overleftarrow{AB} A B ← \overleftarrow{AB} AB
\overleftrightarrow{AB} A B ↔ \overleftrightarrow{AB} AB
\widehat{e f g} e f g ^ \widehat{e f g} efg

13. 上、下划线和上、下括号

公式 符号
\overline{h i j} h i j ‾ \overline{h i j} hij
\underline{h i j} h i j ‾ \underline{h i j} hij
\underbrace{a+b+\cdots+z}_{10} a + b + ⋯ + z ⏟ 10 \underbrace{a+b+\cdots+z}_{10} 10 a+b++z
\overbrace{a+b+\cdots+z}_{10} a + b + ⋯ + z ⏞ 10 \overbrace{a+b+\cdots+z}_{10} a+b++z 10

13. 特殊字符

公式 符号
\eth ð \eth ð
\S § \S §
\% % \% %
/dagger † \dagger
\ddagger ‡ \ddagger
\ast* ∗ \ast ∗ *
\circ ∘ \circ
\bullet ∙ \bullet
\ldots … \ldots
\cdots ⋯ \cdots
\vdots ⋮ \vdots
\ddots ⋱ \ddots
\smile ⌣ \smile
\frown ⌢ \frown
\wr ≀ \wr
\oplus ⊕ \oplus
\bigoplus ⨁ \bigoplus
\otimes ⊗ \otimes
\bigotimes ⨂ \bigotimes
\bigodot ⨀ \bigodot
\boxtimes ⊠ \boxtimes
\boxplus ⊞ \boxplus
\triangleleft ◃ \triangleleft
\triangleright ▹ \triangleright
\imath ı \imath
\hbar ℏ \hbar
\ell ℓ \ell
\mho ℧ \mho
\Finv Ⅎ \Finv
\Re ℜ \Re
\Im ℑ \Im
\wp ℘ \wp
\diamondsuit ♢ \diamondsuit
\heartsuit ♡ \heartsuit
\clubsuit ♣ \clubsuit
\spadesuit ♠ \spadesuit
\Game ⅁ \Game
\flat ♭ \flat
\natural ♮ \natural
\sharp ♯ \sharp

14. 阵列、矩阵、等式对齐、分段函数、编号

1、阵列

语法: $$\begin{array} … \end{array}$$r 右对齐,l 左对齐,c 居中,| 垂直线,\hline 横线,\\ 换行,元素之间以 & 间隔

$$
  \begin{array} {c|lcr}
    n & \text{Left} & \text{Center} & \text{Right} \\
    \hline
    1 & 0.24 & 1 & 125 \\
    2 & -1 & 189 & -8 \\
    3 & -20 & 2000 & 1+10i
  \end{array}
$$

n Left Center Right 1 0.24 1 125 2 − 1 189 − 8 3 − 20 2000 1 + 10 i \begin{array} {c|lcr} n & \text{Left} & \text{Center} & \text{Right} \\ \hline 1 & 0.24 & 1 & 125 \\ 2 & -1 & 189 & -8 \\ 3 & -20 & 2000 & 1+10i \end{array} n123Left0.24120Center11892000Right12581+10i

2、矩阵

语法: $$\begin{matrix} … \end{matrix}$$,每行以 \\ 结尾,元素之间以 & 间隔

$$
  \begin{matrix}
    1 & x & x^2 \\
    1 & y & y^2 \\
    1 & z & z^2 \\
  \end{matrix}
$$

1 x x 2 1 y y 2 1 z z 2 \begin{matrix} 1 & x & x^2 \\ 1 & y & y^2 \\ 1 & z & z^2 \\ \end{matrix} 111xyzx2y2z2

添加括号:

  • pmatrix :()
  • bmatrix :[ ]
  • Bmatrix :{ }
  • vmatrix :| |
  • Vmatrix :‖ ‖

添加省略号:

$$
\begin{pmatrix}
  1 & a_1^2 & a_1^2 & \cdots & a_1^2 \\
  1 & a_2^2 & a_2^2 & \cdots & a_2^2 \\
  \vdots & \vdots & \vdots & \ddots & \vdots \\
  1 & a_n^2 & a_n^2 & \cdots & a_n^2 \\
\end{pmatrix}
$$

( 1 a 1 2 a 1 2 ⋯ a 1 2 1 a 2 2 a 2 2 ⋯ a 2 2 ⋮ ⋮ ⋮ ⋱ ⋮ 1 a n 2 a n 2 ⋯ a n 2 ) \begin{pmatrix} 1 & a_1^2 & a_1^2 & \cdots & a_1^2 \\ 1 & a_2^2 & a_2^2 & \cdots & a_2^2 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & a_n^2 & a_n^2 & \cdots & a_n^2 \\ \end{pmatrix} 111a12a22an2a12a22an2a12a22an2

水平增广矩阵,使用阵列语法:

$$ 
  \left[
    \begin{array}{cc|c}
      1&2&3\\
      4&5&6
    \end{array}
  \right] 
$$

[ 1 2 3 4 5 6 ] \left[ \begin{array}{cc|c} 1&2&3\\ 4&5&6 \end{array} \right] [142536]

垂直增广矩阵:

$$
  \begin{pmatrix}
    a & b\\
    c & d\\
    \hline
    1 & 0\\
    0 & 1
  \end{pmatrix}
$$

( a b c d 1 0 0 1 ) \begin{pmatrix} a & b\\ c & d\\ \hline 1 & 0\\ 0 & 1 \end{pmatrix} ac10bd01

3、等式对齐

语法: \begin{align} … \end{align},每行以 \\ 结尾,元素之间以 & 间隔

$$
  \begin{align}
    \sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\
     & = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\ 
     & = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\
     & = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\ 
     & \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right)
  \end{align}
$$

37 = 7 3 2 − 1 1 2 2 = 7 3 2 1 2 2 ⋅ 7 3 2 − 1 7 3 2 = 7 3 2 1 2 2 7 3 2 − 1 7 3 2 = 73 12 1 − 1 7 3 2 ≈ 73 12 ( 1 − 1 2 ⋅ 7 3 2 ) \begin{align} \sqrt{37} & = \sqrt{\frac{73^2-1}{12^2}} \\ & = \sqrt{\frac{73^2}{12^2}\cdot\frac{73^2-1}{73^2}} \\ & = \sqrt{\frac{73^2}{12^2}}\sqrt{\frac{73^2-1}{73^2}} \\ & = \frac{73}{12}\sqrt{1 - \frac{1}{73^2}} \\ & \approx \frac{73}{12}\left(1 - \frac{1}{2\cdot73^2}\right) \end{align} 37 =1227321 =1227327327321 =122732 7327321 =127317321 1273(127321)

4、分段函数

语法: \begin{cases} … \end{cases},每行以 \\ 结尾,元素之间以 & 间隔

$$
  f(n) =
    \begin{cases}
      n/2,  & \text{if $n$ is even} \\
      3n+1, & \text{if $n$ is odd}
    \end{cases}
$$

f ( n ) = { n / 2 , if  n  is even 3 n + 1 , if  n  is odd f(n) = \begin{cases} n/2, & \text{if $n$ is even} \\ 3n+1, & \text{if $n$ is odd} \end{cases} f(n)={ n/2,3n+1,if n is evenif n is odd

$$  
  \left.
    \begin{array}{l}
    \text{if $n$ is even:}&n/2\\
    \text{if $n$ is odd:}&3n+1
    \end{array}
  \right\}
  =f(n)
$$

if  n  is even: n / 2 if  n  is odd: 3 n + 1 } = f ( n ) \left. \begin{array}{l} \text{if $n$ is even:}&n/2\\ \text{if $n$ is odd:}&3n+1 \end{array} \right\} =f(n) if n is even:if n is odd:n/23n+1}=f(n)

5、编号

语法:\tag

$$ 
  y=x^2        \tag{1.5a}
$$

y = x 2 (1.5a) y=x^2 \tag{1.5a} y=x2(1.5a)

猜你喜欢

转载自blog.csdn.net/ACE_U_005A/article/details/129038200
今日推荐