latex常用数学公式 最近需要写一些文档,里面会有大量的公式,写出好看的公式的过程真的很治愈:cat:,这一期博客主要来介绍一些常用的latex公式,内容很干。自己用markdown写的公式,渲染出来都是对的,但是放到博客上不知道怎么回事有一些奇奇怪怪的错误 ,大家直接粘贴代码就行。
参考:https://artofproblemsolving.com/wiki/index.php/LaTeX:Symbols https://artofproblemsolving.com/wiki/index.php/LaTeX:Commands
各种类型的符号表 数集符号
Symbol
Command
Symbol
Command
Symbol
Command
Symbol
Command
$\mathbb{R}$
\mathbb{R}
$\mathbf{R}$
\mathbf{R}
$\mathcal{R}$
\mathcal{R}
$\mathfrak{R}$
\mathfrak{R}
$\mathbb{Z}$
\mathbb{Z}
$\mathbf{Z}$
\mathbf{Z}
$\mathcal{Z}$
\mathcal{Z}
$\mathfrak{Z}$
\mathfrak{Z}
$\mathbb{Q}$
\mathbb{Q}
$\mathbf{Q}$
\mathbf{Q}
$\mathcal{Q}$
\mathcal{Q}
$\mathfrak{Q}$
\mathfrak{Q}
操作符
Symbol
Command
Symbol
Command
Symbol
Command
\pm
$\mp$
\mp
$\times$
\times
\div
$\cdot$
\cdot
$\ast$
\ast
\star
$\dagger$
\dagger
$\ddagger$
\ddagger
\amalg
$\cap$
\cap
$\cup$
\cup
$\uplus$
\uplus
$\sqcap$
\sqcap
$\sqcup$
\sqcup
$\vee$
\vee
$\wedge$
\wedge
$\oplus$
\oplus
$\ominus$
\ominus
$\otimes$
\otimes
$\circ$
\circ
$\bullet$
\bullet
$\diamond$
\diamond
$\lhd$
\lhd
$\rhd$
\rhd
$\unlhd$
\unlhd
$\unrhd$
\unrhd
$\oslash$
\oslash
$\odot$
\odot
$\bigcirc$
\bigcirc
$\triangleleft$
\triangleleft
$\Diamond$
\Diamond
$\bigtriangleup$
\bigtriangleup
$\bigtriangledown$
\bigtriangledown
$\Box$
\Box
$\triangleright$
\triangleright
$\setminus$
\setminus
$\wr$
\wr
$\sqrt{x}$
\sqrt{x}
$x^{\circ}$
x^{\circ}
$\triangledown$
\triangledown
$\sqrt[n]{x}$
\sqrt[n]{x}
$a^x$
a^x
$a^{xyz}$
a^{xyz}
$a_x$
a_x
关系符号
Symbol
Command
Symbol
Command
Symbol
Command
$\le$
\le
$\ge$
\ge
$\neq$
\neq
$\sim$
\sim
$\ll$
\ll
$\gg$
\gg
$\doteq$
\doteq
$\simeq$
\simeq
$\subset$
\subset
$\supset$
\supset
$\approx$
\approx
$\asymp$
\asymp
$\subseteq$
\subseteq
$\supseteq$
\supseteq
$\cong$
\cong
$\smile$
\smile
$\sqsubset$
\sqsubset
$\sqsupset$
\sqsupset
$\equiv$
\equiv
$\frown$
\frown
$\sqsubseteq$
\sqsubseteq
$\sqsupseteq$
\sqsupseteq
$\propto$
\propto
$\bowtie$
\bowtie
$\in$
\in
$\ni$
\ni
$\prec$
\prec
$\succ$
\succ
$\vdash$
\vdash
$\dashv$
\dashv
$\preceq$
\preceq
$\succeq$
\succeq
$\models$
\models
$\perp$
\perp
$\parallel$
\parallel
$\mid$
\mid
$\bumpeq$
\bumpeq
关系符号前面加一个n,就可以变成这些关系符号的反义
Symbol
Command
Symbol
Command
Symbol
Command
$\nmid$
\nmid
$\nleq$
\nleq
$\ngeq$
\ngeq
$\nsim$
\nsim
$\ncong$
\ncong
$\nparallel$
\nparallel
$\not<$
\not<
$\not>$
\not>
$\not=$
\not= or \neq or \ne
$\not\le$
\not\le
$\not\ge$
\not\ge
$\not\sim$
\not\sim
$\not \approx$
\not\approx
$\not\cong$
\not\cong
$\not\equiv$
\not\equiv
$\not\parallel$
\not\parallel
$\nless$
\nless
$\ngtr$
\ngtr
$\lneq$
\lneq
$\gneq$
\gneq
$\lnsim$
\lnsim
$\lneqq$
\lneqq
$\gneqq$
\gneqq
希腊字母
Symbol
Command
Symbol
Command
Symbol
Command
Symbol
Command
$\alpha$
\alpha
$\beta$
\beta
$\gamma$
\gamma
$\delta$
\delta
$\epsilon$
\epsilon
$\varepsilon$
\varepsilon
$\zeta$
\zeta
$\eta$
\eta
$\theta$
\theta
$\vartheta$
\vartheta
$\iota$
\iota
$\kappa$
\kappa
$\lambda$
\lambda
$\mu$
\mu
$\nu$
\nu
$\xi$
\xi
$\pi$
\pi
$\varpi$
\varpi
$\rho$
\rho
$\varrho$
\varrho
$\sigma$
\sigma
$\varsigma$
\varsigma
$\tau$
\tau
$\upsilon$
\upsilon
$\phi$
\phi
$\varphi$
\varphi
$\chi$
\chi
$\psi$
\psi
$\omega$
\omega
一些大写的希腊字母
Symbol
Command
Symbol
Command
Symbol
Command
Symbol
Command
$\Gamma$
\Gamma
$\Delta$
\Delta
$\Theta$
\Theta
$\Lambda$
\Lambda
$\Xi$
\Xi
$\Pi$
\Pi
$\Sigma$
\Sigma
$\Upsilon$
\Upsilon
$\Phi$
\Phi
$\Psi$
\Psi
$\Omega$
\Omega
箭头
Symbol
Command
Symbol
Command
$\gets$
\gets
$\to$
\to
$\leftarrow$
\leftarrow
$\Leftarrow$
\Leftarrow
$\rightarrow$
\rightarrow
$\Rightarrow$
\Rightarrow
$\leftrightarrow$
\leftrightarrow
$\Leftrightarrow$
\Leftrightarrow
$\mapsto$
\mapsto
$\hookleftarrow$
\hookleftarrow
$\leftharpoonup$
\leftharpoonup
$\leftharpoondown$
\leftharpoondown
$\rightleftharpoons$
\rightleftharpoons
$\longleftarrow$
\longleftarrow
$\Longleftarrow$
\Longleftarrow
$\longrightarrow$
\longrightarrow
$\Longrightarrow$
\Longrightarrow
$\longleftrightarrow$
\longleftrightarrow
$\Longleftrightarrow$
\Longleftrightarrow
$\longmapsto$
\longmapsto
$\hookrightarrow$
\hookrightarrow
$\rightharpoonup$
\rightharpoonup
$\rightharpoondown$
\rightharpoondown
$\leadsto$
\leadsto
$\uparrow$
\uparrow
$\Uparrow$
\Uparrow
$\downarrow$
\downarrow
$\Downarrow$
\Downarrow
$\updownarrow$
\updownarrow
$\Updownarrow$
\Updownarrow
$\nearrow$
\nearrow
$\searrow$
\searrow
$\swarrow$
\swarrow
$\nwarrow$
\nwarrow
$\overrightarrow{AB}$
\overrightarrow{AB}
$\overleftarrow{AB}$
\overleftarrow{AB}
$\overleftrightarrow{AB}$
\overleftrightarrow{AB}
一些奇奇怪怪的点
Symbol
Command
Symbol
Command
$\cdot$
\cdot
$\vdots$
\vdots
$\dots$
\dots
$\ddots$
\ddots
$\cdots$
\cdots
字母上的强调符号
Symbol
Command
Symbol
Command
Symbol
Command
$\hat{x}$
\hat{x}
$\check{x}$
\check{x}
$\dot{x}$
\dot{x}
$\breve{x}$
\breve{x}
$\acute{x}$
\acute{x}
$\ddot{x}$
\ddot{x}
$\grave{x}$
\grave{x}
$\tilde{x}$
\tilde{x}
$\mathring{x}$
\mathring{x}
$\bar{x}$
\bar{x}
$\vec{x}$
\vec{x}
当对 $i$和$j$应用强调符号时,可以使用\imath和\jmath来防止点与重音发生干扰:
Symbol
Command
Symbol
Command
$\vec{\jmath}$
\vec{\jmath}
$\tilde{\imath}$
\tilde{\imath}
\tilde 和 \hat 有一个更宽的版本,$\hat{7+x}$和$\widehat{7+x}$两种箭头是有区别的:
Symbol
Command
Symbol
Command
$\widehat{7+x}$
\widehat{7+x}
$\widetilde{abc}$
\widetilde{abc}
其他一些奇怪的符号
Symbol
Command
Symbol
Command
Symbol
Command
$\infty$
\infty
$\triangle$
\triangle
$\angle$
\angle
$\aleph$
\aleph
$\hbar$
\hbar
$\imath$
\imath
$\jmath$
\jmath
$\ell$
\ell
$\wp$
\wp
$\Re$
\Re
$\Im$
\Im
$\mho$
\mho
$\prime$
\prime
$\emptyset$
\emptyset
$\nabla$
\nabla
$\surd$
\surd
$\partial$
\partial
$\top$
\top
$\bot$
\bot
$\vdash$
\vdash
$\dashv$
\dashv
$\forall$
\forall
$\exists$
\exists
$\neg$
\neg
$\flat$
\flat
$\natural$
\natural
$\sharp$
\sharp
$\backslash$
\backslash
$\Box$
\Box
$\Diamond$
\Diamond
$\clubsuit$
\clubsuit
$\diamondsuit$
\diamondsuit
$\heartsuit$
\heartsuit
$\spadesuit$
\spadesuit
$\Join$
\Join
$\blacksquare$
\blacksquare
$\diamondsuit$
\diamondsuit
$\mathbb{R}$
\mathbb{R} (represents all real numbers)
$\checkmark$
\checkmark
$\heartsuit$
\heartsuit
$\in$
\in
$\cup$
\cup
$\S$
\S
$\P$
\P
$\Vdash$
\Vdash
$\vDash$
\vDash
括号 In mathematics, sometimes we need to enclose expressions in brackets, braces or parentheses. Some of these work just as you’d imagine in LaTeX; type ( and ) for parentheses, [ and ] for brackets, and | and | for absolute value. However, other symbols have special commands:
Symbol
Command
Symbol
Command
Symbol
Command
\{
\}
$\
$
\
$\backslash$
\backslash
$\lfloor$
\lfloor
$\rfloor$
\rfloor
$\lceil$
\lceil
$\rceil$
\rceil
$\langle$
\langle
$\rangle$
\rangle
编写数学公式 下标和上标 下标和上标(例如指数)可以分别使用下划线_和箭头^符号。
Symbol
Command
Symbol
Command
$2^{2}$
2^2
$\textstyle a_i$
a_i
$\textstyle 2^{23}$
2^{23}
$\textstyle n_{i-1}$
n_{i-1}
$a^{i+1}_3$
a^{i+1}_3
$x^{3^2}$
x\^{3^2}
$2^{a_i}$
2^{a_i}
$2^a_i$
2^a_i
分式 使用\frac{分子}{分母}来进行渲染
Symbol
Command
$\frac {1}{2}$
\frac{1}{2} or \frac12
$\frac{2}{x+2}$
\frac{2}{x+2}
$\frac{1+\frac{1}{x}}{3x + 2}$
\frac{1+\frac{1}{x}}{3x + 2}
如果分号比较多,建议用\cfrac代替\frac,看起来更大也舒服很多
Symbol
Command
$\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}}$
\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}}
$\frac{2}{1+\frac{2}{1+\frac{2}{1+\frac{2}{1}}}}$
\frac{2}{1+\frac{2}{1+\frac{2}{1+\frac{2}{1}}}}
累加,累乘,求极限,求对数一类的符号 分别使用命令\sum、\prod、\lim和\log。要表示下限和上限,或对数的底,使用_和^的方式与下标和上标相同。
Symbol
Command
$\textstyle \sum_{i=1}^{\infty}\frac{1}{i}$
\sum_{i=1}^{\infty}\frac{1}{i}
$\textstyle \prod_{n=1}^5\frac{n}{n-1}$
\prod_{n=1}^5\frac{n}{n-1}
$\textstyle \lim_{x\to\infty}\frac{1}{x}$
\lim_{x\to\infty}\frac{1}{x}
$\textstyle \lim\limits_{x\to\infty}\frac{1}{x}$
\lim\limits_{x\to\infty}\frac{1}{x}
$\textstyle \log_n n^2$
\log_n n^2
其中一些符号在latex的显示模式下更漂亮:
Symbol
Command
\sum_{i=1}^{\infty}\frac{1}{i}
\prod_{n=1}^5\frac{n}{n-1}
\lim_{x\to\infty}\frac{1}{x}
模运算符号
Symbol
Command
$9\equiv 3 \bmod{6}$
9\equiv 3 \bmod{6}
$9\equiv 3 \pmod{6}$
9\equiv 3 \pmod{6}
$9\equiv 3 \mod{6}$
9\equiv 3 \mod{6}
$9\equiv 3\pod{6}$
9\equiv 3 \pod{6}
三角函数
Symbol
Command
Symbol
Command
Symbol
Command
$\textstyle \cos$
\cos
$\textstyle \sin$
\sin
$\textstyle \tan$
\tan
$\sec$
\sec
$\textstyle \textstyle \csc$
\csc
$\textstyle \cot$
\cot
$\textstyle \arccos$
\arccos
$\textstyle \arcsin$
\arcsin
$\textstyle \arctan$
\arctan
$\textstyle \cosh$
\cosh
$\textstyle \sinh$
\sinh
$\textstyle \tanh$
\tanh
$\textstyle \coth$
\coth
矩阵 我们可以使用\begin{array}…\end{array}命令构建数组或矩阵,并使用\left和\right来适当调整矩阵周围的分隔符大小
其他符号
Symbol
Command
Symbol
Command
Symbol
Command
$\arg$
\arg
$\textstyle\deg$
\deg
$\textstyle\det$
\det
$\dim$
\dim
$\textstyle\exp$
\exp
$\textstyle\gcd$
\gcd
$\hom$
\hom
$\inf$
\inf
$\ker$
\ker
$\textstyle\lg$
\lg
$\liminf$
\liminf
$\limsup$
\limsup
$\textstyle\max$
\max
$\textstyle\min$
\min
$\Pr$
\Pr
$\sup$
\sup
其中一些命令的下标方式与求和、乘积和对数相同。有些渲染在显示模式和常规数学模式下不同。
Symbol
Command
Symbol
Command
Symbol
Command
$\dim_x$
\dim_x
$\textstyle\gcd_x$
\gcd_x
$\inf_x$
\inf_x
$\liminf_x$
\liminf_x
$\limsup_x$
\limsup_x
$\textstyle\max_x$
\max_x
$\textstyle\min_x$
\min_x
$\Pr_x$
\Pr_x
$\sup_x$
\sup_x
矩阵 把矩阵单独放在一个板块是因为矩阵有很多花招,很多很多不同的表示
1. 数字周围无符号 数字周围无符号 1 2 3 4 \begin {matrix} 1& 0\\ 0& 1\end {matrix}
小括号+p 1 2 3 4 \begin {pmatrix} 1& 0\\ 0& 1\end {pmatrix}
中括号+b 1 2 3 4 \begin {bmatrix} 1& 0\\ 0& 1\end {bmatrix}
大括号+B 1 2 3 4 \begin {Bmatrix} 1& 0\\ 0& 1\end {Bmatrix}
单竖线+v 1 2 3 4 \begin {vmatrix} 1 &0 \\ 0 &1 \end {vmatrix}
双竖线+V 1 2 3 4 \begin {Vmatrix} 1& 0\\ 0& 1\end {Vmatrix}
省略号 使用\dots
水平\vdots
竖直\ddots
倾斜\hdotsfor{}
跨列省略号。大括号中填共几列 如:
1 2 3 4 5 6 7 $ $ \begin {bmatrix} a_ {11} & \dots & a_ {1n}\\ & \ddots & \vdots \\ a_ {n1}& & a_ {nn}\end {bmatrix}$ $
分块矩阵
\Large 0
是比普通的零要大一些的
上面矩阵的代码为:
1 2 3 4 5 6 $ $ \begin {bmatrix}\begin {matrix}1& 0\\ 0& 1\end {matrix}& \text {\Large 0}\\ \text {\Large 0}& \begin {matrix}1& 0\\ 0& 1\end {matrix}\end {bmatrix}$ $
\text
是在数学编辑模式下临时使用文本编辑,在公式中输入汉字都要使用此标签。分块矩阵就是矩阵的嵌套,仔细阅读代码就能理解 。
三角矩阵 具体代码如下
1 2 3 4 5 6 7 8 $ $ \begin {bmatrix} a_ {11}& a_ {12} & \dots & a_ {1n}\\ & a_ {22}& \dots & a_ {2n}\\ & & \ddots & \vdots \\ & {\huge 0}& & a_ {nn}\end {bmatrix}$ $
方程组 方程组四舍五入也算半个矩阵吧
1 2 3 4 5 6 7 8 9 10 $ $ \begin {equation} \begin {cases} l_ {11}y_ {1} = 1 \\ l_ {21}y_ {1} + l_ {22}y_ {2} = 0 \\ l_ {31}y_ {1} + l_ {32}y_ {2} + l_ {33}y_ {3} = 0 \\ l_ {41}y_ {1} + l_ {42}y_ {2} + l_ {43}y_ {3} + l_ {44}y_ {4} = 0 \end {cases}\end {equation}$ $