一篇文章教会你大部分常用LaTeX公式

· · 科技·工程

前言

你还在为找不到 LaTeX 公式发愁吗,这篇文章让你摆脱这个烦恼。

正文

常用符号

二元运算符 Binary operations
LaTeX 公式 效果展示
$+$ +
$-$ -
$\times$ \times
$\div$ \div
$\pm$ \pm
$\mp$ \mp
$\triangleleft $ \triangleleft
$\triangleright $ \triangleright
$\cdot$ \cdot
$\setminus$ \setminus
$\star$ \star
$\ast$ \ast
$\cup$ \cup
$\cap$ \cap
$\sqcup$ \sqcup
$\sqcap$ \sqcap
$\vee$ \vee
$\wedge$ \wedge
$\circ$ \circ
$\bullet$ \bullet
$\oplus$ \oplus
$\ominus$ \ominus
$\odot$ \odot
$\oslash$ \oslash
$\otimes$ \otimes
$\bigcirc$ \bigcirc
$\diamond$ \diamond
$\uplus$ \uplus
$\bigtriangleup$ \bigtriangleup
$\bigtriangledown$ \bigtriangledown
$\lhd$ \lhd
$\rhd$ \rhd
$\unlhd$ \unlhd
$\unrhd$ \unrhd
$\amalg$ \amalg
$\wr$ \wr
$\dagger$ \dagger
$\ddagger$ \ddagger
二元关系符 Binary relations
LaTeX 公式 效果展示
$<$ <
$>$ >
$\le$ \le
$\ge$ \ge
$\equiv$ \equiv
$\ll$ \ll
$\gg$ \gg
$\doteq$ \doteq
$\prec$ \prec
$\succ$ \succ
$\sim$ \sim
$\preceq$ \preceq
$\succeq$ \succeq
$\simeq$ \simeq
$\approx$ \approx
$\subset$ \subset
$\supset$ \supset
$\subseteq$ \subseteq
$\supseteq $ \supseteq
$\sqsubset$ \sqsubset
$\sqsupset$ \sqsupset
$\sqsupseteq$ \sqsupseteq
$\cong$ \cong
$\Join$ \Join
$\bowtie$ \bowtie
$\propto$ \propto
$\in$ \in
$\ni$ \ni
$\vdash$ \vdash
$\dashv$ \dashv
$\models$ \models
$\mid$ \mid
$\parallel$ \parallel
$\perp$ \perp
$\smile$ \smile
$\frown$ \frown
$\asymp$ \asymp
$:$ :
$\notin$ \notin
$\ne$ \ne
箭头符号 Arrows
LaTeX 公式 效果展示
$\gets$ \gets
$\to $ \to
$\longleftarrow $ \longleftarrow
$\longrightarrow $ \longrightarrow
$\uparrow $ \uparrow
$\downarrow $ \downarrow
$\updownarrow $ \updownarrow
$\leftrightarrow $ \leftrightarrow
$\Uparrow $ \Uparrow
$\Downarrow $ \Downarrow
$\Updownarrow $ \Updownarrow
$\longleftrightarrow $ \longleftrightarrow
$\Leftarrow $ \Leftarrow
$\Longleftarrow $ \Longleftarrow
$\Rightarrow $ \Rightarrow
$\Longrightarrow $ \Longrightarrow
$\Leftrightarrow $ \Leftrightarrow
$\Longleftrightarrow $ \Longleftrightarrow
$\mapsto $ \mapsto
$\longmapsto $ \longmapsto
$\nearrow $ \nearrow
$\searrow $ \searrow
$\swarrow $ \swarrow
$\nwarrow $ \nwarrow
$\hookleftarrow $ \hookleftarrow
$\hookrightarrow $ \hookrightarrow
$\rightleftharpoons $ \rightleftharpoons
$\iff $ \iff
$\leftharpoonup $ \leftharpoonup
$\rightharpoonup $ \rightharpoonup
$\leftharpoondown $ \leftharpoondown
$\rightharpoondown $ \rightharpoondown
其他符号 Others
LaTeX 公式 效果展示
$\because $ \because
$\therefore $ \therefore
$\dots $ \dots
$\cdots $ \cdots
$\ddots $ \ddots
$\forall $ \forall
$\exists $ \exists
$\nexists $ \nexists
$\Finv $ \Finv
$\neg $ \neg
$\prime $ \prime
$\emptyset $ \emptyset
$\infty $ \infty
$\nabla $ \nabla
$\triangle $ \triangle
$\Box $ \Box
$\Diamond $ \Diamond
$\bot $ \bot
$\top $ \top
$\angle $ \angle
$\measuredangle $ \measuredangle
$\sphericalangle $ \sphericalangle
$\surd $ \surd
$\diamondsuit $ \diamondsuit
$\heartsuit $ \heartsuit
$\clubsuit $ \clubsuit
$\spadesuit $ \spadesuit
$\flat $ \flat
$\natural $ \natural
$\sharp $ \sharp

希腊字母

小写 Lowercase
LaTeX 公式 效果展示
$\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
$o$ o
$\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
大写 Uppercase
LaTeX 公式 效果展示
$\Gamma $ \Gamma
$\Delta $ \Delta
$\Theta $ \Theta
$\Lambda $ \Lambda
$\Xi $ \Xi
$\Pi $ \Pi
$\Sigma $ \Sigma
$\Upsilon $ \Upsilon
$\Phi $ \Phi
$\Psi $ \Psi
$\Omega $ \Omega
字体样式 Font style
LaTeX 公式 效果展示
$\mathbb{(要展示的文本)}$ \mathbb{abcdefg0123456789}
$\mathfrak{(要展示的文本)}$ \mathfrak{abcdefg0123456789}
$\mathcal{(要展示的文本)}$ \mathcal{abcdefg0123456789}
$\mathrm{(要展示的文本)}$ \mathrm{abcdefg0123456789}
其他 Others
LaTeX 公式 效果展示
$\hbar $ \hbar
$\imath $ \imath
$\jmath $ \jmath
$\ell $ \ell
$\Re $ \Re
$\Im $ \Im
$\aleph $ \aleph
$\beth $ \beth
$\gimel $ \gimel
$\gimel $ \gimel
$\wp $ \wp
$\mho $ \mho
$\backepsilon $ \backepsilon
$\partial $ \partial
$\eth $ \eth
$\Bbbk $ \Bbbk
$\complement $ \complement
$\circledS $ \circledS
$\S $ \S

分数微分

分数 Fractions
LaTeX 公式 效果展示
$\frac{(分子)}{(分母)} $ \frac{1}{2}
$(整数部分)\tfrac{(分子)}{(分母)}$ 1\tfrac{1}{2}
$\mathrm{d}t$ \mathrm{d}t
$\frac{\mathrm{d} y}{\mathrm{d} x}$ \frac{\mathrm{d} y}{\mathrm{d} x}
$\partial t$ \partial t
$\frac{\partial y}{\partial x} $ \frac{\partial y}{\partial x}
$\nabla\psi$ \nabla\psi
$\frac{\partial^2}{\partial x_1\partial x_2}y $ \frac{\partial^2}{\partial x_1\partial x_2}y
$\cfrac{1}{a + \cfrac{7}{b + \cfrac{2}{9}}} =c $ \cfrac{1}{a + \cfrac{7}{b + \cfrac{2}{9}}} =c
(这里由于洛谷的神奇BUG,见 ^{[1]} (这里由于洛谷的神奇BUG,见 ^{[2]}
``` \begin{equation} x = a_0 + \cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{a_3 + \cfrac{1}{a_4} } } } \end{equation} ``` $^{[2]}$: $$ \begin{equation} x = a_0 + \cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{a_3 + \cfrac{1}{a_4} } } } \end{equation} $$ Tips: 浏览时,$^{[2]}$ 最右侧会出现 $(1)$,这个也是由于洛谷神奇的 BUG,所以请忽略不看。 ##### 导数 Derivative | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\dot{(文本)} $``` | $\dot{a}$ | | ```$\ddot{(文本)} $``` | $\ddot{a}$ | | ```${(文本)}'$``` | ${f}'$ | | ```${(文本)}'$``` | ${f}''$ | | ```${(文本)}^{(n)} $``` | ${f}^{(n)} $ | ##### 模算术 Modular arithmetic | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$(文本) \bmod (文本)$``` | $a \bmod b$ | | ```$(文本) \equiv (文本) \pmod{(文本)} $``` | $a \equiv b \pmod{m} $ | | ```$\gcd((文本), (文本))$``` | $\gcd(m, n)$ | | ```$\operatorname{lcm}((文本), (文本)) $``` | $\operatorname{lcm}(m, n) $ | #### 根式角标 ##### 根式 Radicals | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\sqrt{(文本)} $``` | $\sqrt{x} $ | | ```$\sqrt[(文本)]{(文本)} $``` | $\sqrt[n]{x} $ | ##### 上下标 Sub&Super | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$(文本)^{(文本)}$``` | $x^{a}$ | | ```$(文本)_{(文本)}$ $``` | $x_{a}$ | | ```$(文本)_{(文本)}^{(文本)} $``` | $x_{a}^{b}$ | | ```$_{(文本)}^{(文本)} (文本)$``` | $_{a}^{b} x$ | ##### 重音符及其他 Accents and Others | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\hat{(文本)}$``` | $\hat{a}$ | | ```$\check{(文本)}$``` | $\check{a}$ | | ```$\grave{(文本)} $``` | $\grave{a} $ | | ```$\acute{(文本)} $``` | $\acute{a} $ | | ```$\tilde{(文本)}$``` | $\tilde{a}$ | | ```$\breve{(文本)}$``` | $\breve{a}$ | | ```$\bar{(文本)}$``` | $\bar{a}$ | | ```$\vec{(文本)}$``` | $\vec{a}$ | | ```$\not{(文本)}$``` |$\not{a}$ | | ```$(文本)^{\circ}$``` | $a^{\circ}$ | | ```$\widetilde{(文本)}$``` | $\widetilde{abc}$ | | ```$\widehat{(文本)}$``` | $\widehat{abc}$ | | ```$\overleftarrow{(文本)}$``` | $\overleftarrow{a}$ | | ```$\overrightarrow{(文本)}$``` | $\overrightarrow{a}$ | | ```$\overline{(文本)}$``` | $\overline{a}$ | | ```$\underline{(文本)}$``` | $\underline{a}$ | | ```$\overset{(文本)}{(文本)}$``` | $\overset{a}{abc}$ | | ```$\underset{(文本)}{(文本)}$``` | $\underset{a}{abc}$ | | ```$overbrace{(文本)}$``` | $\overbrace{abc}$ | | ```$underbrace{(文本)}$``` | $\underbrace{abc}$ | | ```$\stackrel\frown{(文本)}$``` | $\stackrel\frown{AB}$ | | ```$\overline{(文本)}$``` | $\overline{AB}$ | | ```$\overleftrightarrow{(文本)}$``` | $\overleftrightarrow{AB}$ | | ```$\overset{(文本)}{\leftarrow} $``` | $\overset{a}{\leftarrow} $ | | ```$\overset{(文本)}{\rightarrow} $``` | $\overset{a}{\rightarrow} $ | | ```$\xleftarrow[(文本)]{(文本)}$``` | $\xleftarrow[abc]{a}$ | | ```$\xrightarrow[(文本)]{(文本)}$``` | $\xrightarrow[abc]{a}$ | #### 极限对数 ##### 极限 Limits | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\lim$``` | $\lim$ | | ```$\lim_{(文本) \to (文本)}$``` | $\lim_{x \to 0}$ | | ```$\lim_{(文本) \to \infty} $``` | $\lim_{x \to \infty} $ | | ```$\max_(文本){(文本)}$``` | $\max_a{b}$ | | ```$\min_(文本){(文本)} $``` | $\min_a{b} $ | ##### 对数指数 Logarithms and exponentials | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\log_{(文本)}{(文本)} $``` | $\log_{a}{b} $ | | ```$\lg_{(文本)}{(文本)} $``` | $\lg_{a}{b} $ | | ```$\ln_{(文本)}{(文本)} $``` | $\ln_{a}{b} $ | | ```$\exp (文本) $``` | $\exp a $ | ##### 界限 Bounds | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\min (文本)$``` | $\min x$ | | ```$\max (文本)$``` | $\max y$ | | ```$\sup (文本)$``` | $\sup t$ | | ```$\inf (文本)$``` | $\inf s$ | | ```$\lim (文本) $``` | $\lim u$ | | ```$\limsup (文本)$``` | $\limsup w $ | | ```$\liminf (文本)$``` | $\liminf v$ | | ```$\dim (文本)$``` | $\dim p$ | | ```$\ker (文本)$``` | $\ker\phi $ | #### 三角函数 ##### 三角函数 Trigonometric functions | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\sin (文本) $``` | $\sin \alpha $ | | ```$\cos (文本) $``` | $\cos \alpha $ | | ```$\tan (文本) $``` | $\tan \alpha $ | | ```$\cot (文本) $``` | $\cot \alpha $ | | ```$\sec (文本) $``` | $\sec \alpha $ | | ```$\csc (文本) $``` | $\csc \alpha $ | ##### 反三角函数 Inverse trigonometric functions | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\sin^(文本) (文本) $``` | $\sin^{-1} \alpha $ | | ```$\cos^(文本) (文本) $``` | $\cos ^{-1}\alpha $ | | ```$\tan^(文本) (文本) $``` | $\tan ^{-1}\alpha $ | | ```$\cot^(文本) (文本) $``` | $\cot ^{-1}\alpha $ | | ```$\sec^(文本) (文本) $``` | $\sec ^{-1}\alpha $ | | ```$\csc^(文本) (文本) $``` | $\csc ^{-1}\alpha $ | | ```$\arcsin (文本)$``` | $\arcsin \alpha$ | | ```$\arccos (文本)$``` | $\arccos \alpha$ | | ```$\arctan (文本)$``` | $\arctan \alpha$ | | ```$operatorname{arccot} (文本)$``` | $\operatorname{arccot} \alpha$ | | ```$\operatorname{arcsec} (文本)$``` | $\operatorname{arcsec} \alpha $ | | ```$\operatorname{arccsc} (文本)$``` | $\operatorname{arccsc} \alpha $ | ##### 双曲函数 Hyperblic functions | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\sinh (文本)$``` | $\sinh \alpha$ | | ```$\cosh (文本)$``` | $\cosh \alpha$ | | ```$\tanh (文本)$``` | $\tanh \alpha$ | | ```$\coth (文本)$``` | $\coth \alpha$ | | ```$\operatorname{sech} (文本)$``` | $\operatorname{sech} \alpha $ | | ```$\operatorname{csch} (文本)$``` | $\operatorname{csch} \alpha $ | ##### 反双曲函数 Inverse hyperbolic functions | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\sinh^(文本) (文本) $``` | $\sinh^{-1} \alpha $ | | ```$\cosh^(文本) (文本) $``` | $\cosh ^{-1}\alpha $ | | ```$\tanh^(文本) (文本) $``` | $\tanh ^{-1}\alpha $ | | ```$\coth^(文本) (文本) $``` | $\coth ^{-1}\alpha $ | | ```$operatorname{sech} (文本)$``` | $\operatorname{sech} \alpha$ | | ```$\operatorname{csch} (文本)$``` | $\operatorname{csch} \alpha $ | #### 积分运算 ##### 积分 Integral | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\int$``` | $\int$ | | ```$\int_{(文本)}^{(文本)} $```| $\int_{a}^{b} $ | | ```$\int\limits_{(文本)}^{(文本)} $``` | $\int\limits_{a}^{b} $ | ##### 双重积分 Double integral | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\iint$``` | $\iint$ | | ```$\iint_{(文本)}^{(文本)} $```| $\iint_{a}^{b} $ | | ```$\iint\limits_{(文本)}^{(文本)} $``` | $\iint\limits_{a}^{b} $ | ##### 三重积分 Triple integral | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\iiint$``` | $\iiint$ | | ```$\iiint_{(文本)}^{(文本)} $```| $\iiint_{a}^{b} $ | | ```$\iiint\limits_{(文本)}^{(文本)} $``` | $\iiint\limits_{a}^{b} $ | ##### 曲线积分 Closed line or path integral | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\oint$``` | $\oint$ | | ```$\oint_{(文本)}^{(文本)} $```| $\oint_{a}^{b} $ | | ```$\oint\limits_{(文本)}^{(文本)} $``` | $\oint\limits_{a}^{b} $ | #### 大型运算 ##### 求和 Summation | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\sum$``` | $\sum$ | | ```$\sum_{(文本)}^{(文本)} $```| $\sum_{a}^{b} $ | | ```${\textstyle \sum_{(文本)}^{(文本)} $``` | ${\textstyle \sum_{a}^{b}} $ | ##### 乘积余积 Product and coproduct | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\prod$``` | $\prod$ | | ```$\prod_{(文本)}^{(文本)} $```| $\prod_{a}^{b} $ | | ```${\textstyle \prod_{(文本)}^{(文本)} $``` | ${\textstyle \prod_{a}^{b}} $ | | ```$\coprod$``` | $\coprod$ | | ```$\coprod_{(文本)}^{(文本)} $```| $\coprod_{a}^{b} $ | | ```${\textstyle \coprod_{(文本)}^{(文本)} $``` | ${\textstyle \coprod_{a}^{b}} $ | ##### 并集交集 Union and intersection | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\bigcup $``` | $\bigcup $ | | ```$\bigcup_ {(文本)}^{(文本)} $```| $\bigcup_ {a}^{b} $ | | ```${\textstyle \bigcup_ {(文本)}^{(文本)} $``` | ${\textstyle \bigcup_ {a}^{b}} $ | | ```$\bigcap$``` | $\bigcap$ | | ```$\bigcap_{(文本)}^{(文本)} $```| $\bigcap_{a}^{b} $ | | ```${\textstyle \bigcap_{(文本)}^{(文本)} $``` | ${\textstyle \bigcap_{a}^{b}} $ | ##### 析取合取 Disjunction and conjunction | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\bigvee $``` | $\bigvee $ | | ```$\bigvee_ {(文本)}^{(文本)} $```| $\bigvee_ {a}^{b} $ | | ```${\textstyle \bigvee_ {(文本)}^{(文本)} $``` | ${\textstyle \bigvee_ {a}^{b}} $ | | ```$\bigwedge$``` | $\bigwedge$ | | ```$\bigwedge_{(文本)}^{(文本)} $```| $\bigwedge_{a}^{b} $ | | ```${\textstyle \bigwedge_{(文本)}^{(文本)} $``` | ${\textstyle \bigwedge_{a}^{b}} $ | #### 括号取整 ##### 括号 | LaTeX 公式 | 效果展示 | |:-:|:-:| | ```$\left ( \right )$ ``` | $\left ( \right ) $ | |```$\left [ \right ]$ ``` | $\left [ \right ] $ | |```$\left \langle \right \rangle$ ``` | $\left \langle \right \rangle $ | |```$\left \{ \right \}$ ``` | $\left \{ \right \} $ | |```$\left | \right |$ ``` | $\left | \right | $ | |```$\left \| \right \|$ ``` | $\left \| \right \| $ | |```$\left \lfloor \right \rfloor$ ``` | $\left \lfloor \right \rfloor $ | |```$\left \lceil \right \rceil$ ``` | $\left \lceil \right \rceil $ | ##### 常用 | LaTeX 公式 | 效果展示 | |:-:|:-:| |```$\binom(文本)(文本) $```|$\binom{n}{r} $| |```$\left [ (文本),(文本) \right ) $```| $\left [ 0,1 \right )$ | #### 数组矩阵 由于矩阵的 $LaTeX$ 公式需要换行且过于庞大,这里不用表格的形式来展示。 ##### $LaTeX$ 公式 ``` $\begin{matrix} (数字)& (数字)& (数字)\\ (数字)& (数字)& (数字)\\ (数字)& (数字)& (数字) \end{matrix}

注:以上是 $3 \times 3$ 的矩阵,想实现$2\times 2$、$2\times 3$ 怎么办?

只需要更改每一行的 $\&$ 符号个数就可以控制这一行的列数。

更改 ```\begin``` 到 ```\end``` 中间的行数就可以控制矩阵的行数。

##### 效果展示

$$
\begin{matrix}
  1&  1& 1\\
  1&  1& 1\\
  1&  1& 1
\end{matrix}
$$

##### $LaTeX$ 公式
(数字)& (数字)& (数字)\\ (数字)& (数字)& (数字)\\ (数字)& (数字)& (数字) \end{bmatrix}

##### 效果展示

$$
\begin{bmatrix}
  1&  1& 1\\
  1&  1& 1\\
  1&  1& 1
\end{bmatrix}
$$

##### $LaTeX$ 公式
(数字)& (数字)& (数字)\\ (数字)& (数字)& (数字)\\ (数字)& (数字)& (数字) \end{pmatrix}

##### 效果展示

$$
\begin{pmatrix}
  1&  1& 1\\
  1&  1& 1\\
  1&  1& 1
\end{pmatrix}
$$

##### $LaTeX$ 公式
(数字)& (数字)& (数字)\\ (数字)& (数字)& (数字)\\ (数字)& (数字)& (数字) \end{vmatrix}

##### 效果展示

$$
\begin{vmatrix}
  1&  1& 1\\
  1&  1& 1\\
  1&  1& 1
\end{vmatrix}
$$

##### $LaTeX$ 公式
(数字)& (数字)& (数字)\\ (数字)& (数字)& (数字)\\ (数字)& (数字)& (数字) \end{Vmatrix}

##### 效果展示

$$
\begin{Vmatrix}
  1&  1& 1\\
  1&  1& 1\\
  1&  1& 1
\end{Vmatrix}
$$

##### $LaTeX$ 公式
(数字)& (数字)& (数字)\\ (数字)& (数字)& (数字)\\ (数字)& (数字)& (数字) \end{Bmatrix}


##### 效果展示

$$
\begin{Bmatrix}
  1&  1& 1\\
  1&  1& 1\\
  1&  1& 1
\end{Bmatrix}
$$