Unique's Blog

LaTeX 数学公式

2023-03-19 · 2447字 · 14 min read
🏷️  LaTeX

参考资料:

  1. https://artofproblemsolving.com/wiki/index.php/LaTeX:Symbols
  2. https://mathvault.ca/wp-content/uploads/Comprehensive-List-of-Mathematical-Symbols.pdf

说明

  • 换行 \\ 或者 \newline
  • 换段落 \par 或者使用空行
  • latex 源文件连续空格等效于一个,多个空行等效一个空行
  • 使用命令的形式:\command[option选项参数]{argument参数}

latex 进入数学模式

  • 其中 \[...\]$$...$$ 等效
  • equation 环境不能换行,align 环境用于多个方程对齐,gather 环境居中对齐;
  • \displaystyle 命令用语显示公式完整的行高

运算符

符号 LaTex 符号 LaTex 符号 LaTex 符号 LaTex
±\pm \pm \mp \mp ×\times \times ÷\div \div
\cdot \cdot \ast \ast \star \star \bullet \bullet
\cup \cup \cap \cap \sqcup \sqcup \sqcap \sqcap
\vee \vee \wedge \wedge \oplus \oplus \otimes \otimes
\ominus \ominus \oslash \oslash \odot \odot \uplus \uplus
\circ \circ \bigcirc \bigcirc \diamond \diamond \Diamond \Diamond
\lhd \lhd \rhd \rhd \unlhd \unlhd \unrhd \unrhd
\triangleleft \triangleleft \triangleright \triangleright \bigtriangleup \bigtriangleup \bigtriangledown \bigtriangledown
\triangledown \triangledown \Box \Box \setminus \setminus \wr \wr
⨿\amalg \amalg \dagger \dagger \ddagger \ddagger xx^{\circ} x^{circ}
xn\sqrt[n]{x} \sqrt[n]{x} axyza^{xyz} a^{xyz} axa_x a_x \infty \infty
\partial \partial \nabla \nabla

关系符号

\equiv \equiv
<\lt \lt
>\gt \gt
\forall \forall
\exists \exists
{1,2,,n}\lbrace1,2,\cdots,n\rbrace \lbrace1,2,\cdots,n\rbrace\{1,2,\cdots,n\}

希腊字母

ifg

箭头

ifg

符号 LaTex 符号 LaTex
\cdot \cdot \vdots \vdots
\dots \dots \ddots \ddots
\cdots \cdots \iddots \iddots

声调

括号和边界

ifg

  • 使用 \left\right 来标定左右括号进行适当的放大对一些箭头符号也适用(ax)2\left(\frac{a}{x} \right)^2
\left(\frac{a}{x} \right)^2
  • 分段函数,使用 cases 环境;f(x)={x2x0xx<0f(x) = \begin{cases} x^2 & x \ge 0 \\ x & x < 0 \end{cases}
f(x) = 
\begin{cases} 
x^2 & x \ge 0 \\
x & x < 0
\end{cases}
  • a0+a1+a2++anx\underbrace{a_0+a_1+a_2+\cdots+a_n}_{x}
\underbrace{a_0+a_1+a_2+\cdots+a_n}_{x}
  • a0+a1+a2++anx\overbrace{a_0+a_1+a_2+\cdots+a_n}^{x}
\overbrace{a_0+a_1+a_2+\cdots+a_n}^{x}

其它常见符号

ifg

数学常用命令

  1. a3i+1a^{i+1}_3
  2. 1+1x3x+2\frac{1+\frac{1}{x}}{3x + 2} 1+1x3x+2\dfrac{1+\dfrac{1}{x}}{3x + 2}
  3. 21+21+21+21\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}}
  4. xn\sqrt[n]{x}
  5. i=11i\sum_{i=1}^{\infty}\frac{1}{i} i=11i\sum\limits_{i=1}^{\infty}\frac{1}{i} n=15nn1\prod_{n=1}^5\frac{n}{n-1} limx1x\lim_{x\to\infty}\frac{1}{x} limx1x\lim\limits_{x\to\infty}\frac{1}{x} lognn2\log_n n^2 lne\ln e
  6. 93mod69\equiv 3 \bmod{6} 93(mod6)9\equiv 3 \pmod{6} 93mod69\equiv 3 \mod{6} 93(6)9\equiv 3 \pod{6}
  7. (n1r1)\binom{n-1}{r-1} (n1r1)\dbinom{n-1}{r-1} Cn1r1C_{n-1}^{r-1}
  8. cos2x+sin2x=1\cos^2 x +\sin^2 x = 1 cos90=0\cos 90^\circ = 0
  9. a+bi\overline{a+bi} 747\underline{747}
  10. ddx(x2)=2x\frac{d}{dx}\left(x^2\right) = 2x 2xdx=x2+C\int 2x\,dx = x^2+C 152xdx=24\int^5_1 2x\,dx = 24 2Ux2+2Uy2\frac{\partial^2U}{\partial x^2} + \frac{\partial^2U}{\partial y^2} 14πΣ1rUnds\frac{1}{4\pi}\oint_\Sigma\frac{1}{r}\frac{\partial U}{\partial n} ds \iint
% 1. 上下标
a^{i+1}_3

% 2. 分数
\frac{1+\frac{1}{x}}{3x + 2}
\dfrac{1+\dfrac{1}{x}}{3x + 2} %display 模式

% 3. 连续分数
\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}}

% 4. 根号
\sqrt[n]{x}

% 5. 求和,求积,极限,对数
\sum_{i=1}^{\infty}\frac{1}{i}
\sum\limits_{i=1}^{\infty}\frac{1}{i}
\prod_{n=1}^5\frac{n}{n-1}
\lim_{x\to\infty}\frac{1}{x}
\lim\limits_{x\to\infty}\frac{1}{x}
\log_n n^2
\ln e

% 6. 模
9\equiv 3 \bmod{6}
9\equiv 3 \pmod{6}
9\equiv 3 \mod{6}
9\equiv 3 \pod{6}

% 7. 组合数
\binom{n-1}{r-1}
\dbinom{n-1}{r-1} %display 模式
C_{n-1}^{r-1}

% 8. 三角函数 \sin \cos \tan...
\cos^2 x +\sin^2 x = 1
\cos 90^\circ = 0

% 9. 上下横线
\overline{a+bi}
\underline{747}

% 10. 积分
\frac{d}{dx}\left(x^2\right) = 2x
\int 2x\,dx = x^2+C %\,小空格
\int^5_1 2x\,dx = 24
\frac{\partial^2U}{\partial x^2} + \frac{\partial^2U}{\partial y^2}
\frac{1}{4\pi}\oint_\Sigma\frac{1}{r}\frac{\partial U}{\partial n} ds
\iint

数学函数

矩阵

array 环境

(abcdefghi)\left( \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array} \right)

abS001011101110\begin{array}{|c|c||c|} a & b & S \\ \hline 0&0&1\\ 0&1&1\\ 1&0&1\\ 1&1&0\\ \end{array}

\left(
\begin{array}{ccc}
a & b & c \\
d & e & f \\
g & h & i 
\end{array}
\right)

\begin{array}{|c|c||c|} a & b & S \\
\hline
0&0&1\\
0&1&1\\
1&0&1\\
1&1&0\\
\end{array}

pmatrix 环境

(abcdefghi)\begin{pmatrix} a & b & c\\ d & e & f\\ g & h & i \end{pmatrix}

\begin{pmatrix}
a & b & c\\
d & e & f\\
g & h & i
\end{pmatrix}

vmatrix 环境

xyzv\begin{vmatrix} x & y \\ z & v \end{vmatrix}

xyzv\begin{Vmatrix} x & y \\ z & v \end{Vmatrix}

\begin{vmatrix}
x & y \\
z & v
\end{vmatrix}

\begin{Vmatrix}
x & y \\
z & v
\end{Vmatrix}

bmatrix 环境

[0000]\begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix}

{xyzv}\begin{Bmatrix} x & y \\ z & v \end{Bmatrix}

\bigl(\begin{smallmatrix} a&b\\ c&d \end{smallmatrix}\bigr)

\begin{bmatrix}
0      & \cdots & 0      \\
\vdots & \ddots & \vdots \\
0      & \cdots & 0
\end{bmatrix}

\begin{Bmatrix}
x & y \\
z & v
\end{Bmatrix}

\bigl(\begin{smallmatrix}
a&b\\ c&d
\end{smallmatrix}\bigr)

cases 环境

array 代替

这里不支持 \mbox,使用 \text 代替

f(x)={x+7if 5<x;x23if 3x5;xif x<3.f(x) = \left\{ \begin{array}{ll} x+7 & \text{if $5< x$};\\ x^2-3 & \text{if $-3 \le x \le 5$};\\ -x & \text{if $x < -3$}.\end{array} \right.

x+7if 5<x;x23if 3x5;xif x<3.}=f(x)\left. \begin{array}{ll} x+7 & \text{if $5< x$};\\ x^2-3 & \text{if $-3 \le x \le 5$};\\ -x & \text{if $x < -3$}. \end{array} \right\} =f(x)

cases 环境

f(x)={x+7if 5<x;x23if 3x5;xif x<3.f(x) = \begin{cases} x+7 & \text{if $5< x$}; \\ x^2-3 & \text{if $-3 \le x \le 5$}; \\ -x & \text{if $x < -3$}. \end{cases}

f(n)={n2,if n is even3n+1,if n is oddf(n) = \begin{cases} \dfrac{n}{2}, & \text{if $n$ is even} \\[2ex] 3n+1, & \text{if $n$ is odd} \end{cases}

% 使用 array
f(x) = \left\{ \begin{array}{ll}
x+7 & \text{if $5< x$};\\
x^2-3 & \text{if $-3 \le x \le 5$};\\
-x & \text{if $x < -3$}.\end{array} \right.

\left.
\begin{array}{ll}
x+7 & \text{if $5< x$};\\
x^2-3 & \text{if $-3 \le x \le 5$};\\
-x & \text{if $x < -3$}.
\end{array}
\right\}
=f(x)

% 推荐使用 amsmath 包cases环境
f(x) = \begin{cases}
x+7 & \text{if $5< x$}; \\
x^2-3 & \text{if $-3 \le x \le 5$}; \\
-x & \text{if $x < -3$}.
\end{cases}

f(n) =
\begin{cases}
\dfrac{n}{2},  & \text{if $n$ is even} \\[2ex]  % 使用\\[2ex] 适配行高
3n+1, & \text{if $n$ is odd}
\end{cases}

align 环境

网页可能不支持 align ,可以使用 array 来替代

\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}

% 对齐和标号
\begin{align}
v + w & = 0  &\text{Given} \tag 1\\
-w & = -w + 0 & \text{additive identity} \tag 2\\
-w + 0 & = -w + (v + w) & \text{equations $(1)$ and $(2)$}
\end{align}

符号样式

  • \mathbb 黑板粗体,空心字母,向量或集合的符号
  • \mathbf 正粗体
  • \mathcal 手写体,大写字母
  • \mathfrak 哥特体

RQZFabcwxyz01234567890123456789RQZFRUFL\begin{aligned} &\boldsymbol{R\quad Q\quad Z\quad F \quad abcwxyz} \\ &\mathit{0123456789} \\ &\mathrm{0123456789 \quad R\quad Q\quad Z\quad F} \\ &\mathscr{R} \quad \mathscr{U} \quad \mathscr{F}\quad \mathscr{L} \\ \end{aligned}

% 斜粗体,可以加粗所有合法符号
\boldsymbol{R Q Z F abcwxyz}

% 斜体数字
\mathit{0123456789}

% 罗马体
\mathrm{012…abc…ABC…}或\operatorname{}

% 花体字母
\mathscr{R U F L}

空格

颜色

  • 字体颜色 {\color{色调}表达式} \textcolor[rgb]{0,0,1}{表达式}
  • 背景颜色 \colorbox{色调}{表达式}
    • Red\colorbox{Red}{\color{white}Red}
    • Blue\colorbox{Blue}{\color{white}Blue}
    • Aquamarine\colorbox{Aquamarine}{\color{white}Aquamarine}
    • Orange\colorbox{Orange}{\color{white}Orange}
    • Cyan\colorbox{Cyan}{\color{white}Cyan}
    • ForestGreen\colorbox{ForestGreen}{\color{white}ForestGreen}
    • SpringGreen\colorbox{SpringGreen}{\color{white}SpringGreen}
    • Goldenrod\colorbox{Goldenrod}{\color{white}Goldenrod}
      ,,\textcolor{Blue}{又想起你曾说的陪我到最后,暖色的梦变冰凉的枷锁,如果时光倒流我们又能抓得住什么}
      ,,\textcolor{Pink}{又想起你曾说的陪我到最后,暖色的梦变冰凉的枷锁,如果时光倒流我们又能抓得住什么}
      ,,\textcolor{ForestGreen}{又想起你曾说的陪我到最后,暖色的梦变冰凉的枷锁,如果时光倒流我们又能抓得住什么}

本文链接: LaTeX 数学公式

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。

发布日期: 2023-03-19

最新构建: 2024-12-26

本文已被阅读 0 次,该数据仅供参考

欢迎任何与文章内容相关并保持尊重的评论😊 !

共 43 篇文章 | Powered by Gridea | RSS
©2020-2024 Nuo. All rights reserved.