LaTeX符号大全及使用 (LaTeX symbols and Use)

2025-08-13 09:40:56

LaTeX符号大全及使用 (LaTeX symbols and Use)

Preamble

LaTeX 是一种强大的数学排版工具,在 Markdown、Jupyter Notebook、Obsidian、Typora 等支持 LaTeX 的环境中,我们可以使用 LaTeX 语法来编写数学公式。

这份笔记是笔者在学习LaTeX 使用过程中所收集和归纳的常用符号、命令以及排版技巧,囊括内容非常全面,后续也将持续更新。

1 Basci

1.1 Inline & Display Mode

LaTeX 提供了 两种模式 来书写数学公式:

行内公式(Inline Mode):使用 $...$ 语法独立公式(Display Mode):使用 \[...\] 或 $$...$$ 语法

Inline Formula

行内公式用于正文中插入数学表达式,不会单独占据一行。

Example

文本文本...... $ a^2 + b^2 = c^2 $ ......文本文本

Rendered Output: 文本文本…

a

2

+

b

2

=

c

2

a^2 + b^2 = c^2

a2+b2=c2 …文本文本

Display Formula

独立公式会单独占一行,并居中显示。

Example

\[

a^2 + b^2 = c^2

\]

or:

$$

a^2 + b^2 = c^2

$$

Rendered Output:

a

2

+

b

2

=

c

2

a^2 + b^2 = c^2

a2+b2=c2

1.2 Superscript & Subscript

在 LaTeX 公式中,我们使用 ^(上标) 和 _(下标) 来表示 指数、角标等。

Superscript

使用 ^ 表示 上标(指数):

$ a^2, x^{10}, e^{x+y} $

Rendered Output:

a

2

,

x

10

,

e

x

+

y

a^2, x^{10}, e^{x+y}

a2,x10,ex+y

Subscript

使用 _ 表示 下标(角标):

$ a_1, x_{i+1}, H_{2}O $

Rendered Output:

a

1

,

x

i

+

1

,

H

2

O

a_1, x_{i+1}, H_{2}O

a1​,xi+1​,H2​O

–Note–

✅ ^ 和 _ 仅对其后紧邻的一个字符生效,如果包含多个字符,需 使用大括号 {} 包裹:

$ x^10 $ (正确 ✅)

$ x^{10} $(正确 ✅)

$ x^10_2 $ (正确 ✅)

$ x^10_2 + x_3^{n+1} $(正确 ✅)

$ x^10_2n $ (错误 ❌,因为 `_2n` 没有 `{}` 包裹)

Rendered Output:

x

10

,

x

2

10

,

x

3

n

+

1

x^{10}, x_2^{10}, x_{3}^{n+1}

x10,x210​,x3n+1​

1.3 Equation Environments

在 LaTeX 中,数学公式可以放在不同的 数学环境 里,以获得更好的格式化效果。常见的数学环境包括:equation、align、cases、multline 和 split。

EnvironmentDescriptionExampleequation单行公式,自动编号

E

=

m

c

2

\begin{equation} E = mc^2 \end{equation}

E=mc2​​align多行公式,支持对齐,使用 & 对齐点

E

=

m

c

2

F

=

m

a

\begin{align} E &= mc^2 \\ F &= ma \end{align}

EF​=mc2=ma​​cases适用于分段函数的定义

{

x

2

,

if

x

0

x

,

if

x

<

0

\begin{cases} x^2, & \text{if } x \geq 0 \\ -x, & \text{if } x < 0 \end{cases}

{x2,−x,​if x≥0if x<0​multline多行公式,自动换行,长公式分段显示本环境不支持split在 equation 环境中拆分长公式,适合长公式的排版

x

=

y

+

z

=

w

+

t

\begin{equation} \begin{split} x &= y + z \\ &= w + t \end{split} \end{equation}

x​=y+z=w+t​​​

1. equation Environment

equation 环境会自动为公式编号,适用于 长篇文档。

\[

\begin{equation}

E = mc^2

\end{equation}

\]

Rendered Output:

E

=

m

c

2

\begin{equation} E = mc^2 \end{equation}

E=mc2​​

2. align Environment

align 用于对齐多行公式,& 代表对齐点。

\[

\begin{aligned}

x &= y + 2z \\

&= 3y - 4

\end{aligned}

\]

Rendered Output:

x

=

y

+

2

z

=

3

y

4

\begin{aligned} x &= y + 2z \\ &= 3y - 4 \end{aligned}

x​=y+2z=3y−4​

3. cases Environment

cases 适用于分段定义的数学函数。

\[

f(x) =

\begin{cases}

x^2, & \text{if } x \geq 0 \\

-x, & \text{if } x < 0

\end{cases}

\]

Rendered Output:

f

(

x

)

=

{

x

2

,

if

x

0

x

,

if

x

<

0

f(x) = \begin{cases} x^2, & \text{if } x \geq 0 \\ -x, & \text{if } x < 0 \end{cases}

f(x)={x2,−x,​if x≥0if x<0​

4. multline Environment

multline 用于多行公式,并将公式分行显示,第一个可用位置作为换行点。

\[

\begin{multline}

x = y + z + w + t \\

+ a + b + c

\end{multline}

\]

Rendered Output:

本环境暂不支持显示

5. split Environment

split 用于将公式拆分成多行,并与 equation 环境结合,适用于拆分长公式。

\[

\begin{equation}

\begin{split}

x &= y + z \\ &= w + t

\end{split}

\end{equation}

\]

Rendered Output:

x

=

y

+

z

=

w

+

t

\begin{equation} \begin{split} x &= y + z \\ &= w + t \end{split} \end{equation}

x​=y+z=w+t​​​

1.4 Spacing in Math Mode

LaTeX 提供了一些空格控制命令,用于调整符号之间的间距。

SymbolCommandSymbolCommandSymbolCommand

a

b

a \quad b

aba \quad b

a

b

a \, b

aba , b

a

b

a \! b

aba ! b

x

=

constant

x = \text{constant}

x=constantx = \text{constant}

a

b

a \; b

aba ; b

a

b

a \: b

aba : b

Example:

\[

a \quad b, \quad a \, b, \quad a \! b

\]

Rendered Output:

a

b

,

a

b

,

a

b

a \quad b, \quad a \, b, \quad a \! b

ab,ab,ab

Inline Text in Math Mode

在数学模式中,使用 \text{} 来插入普通文本,以保持文本格式正确。

Example:

\[

x = 5, \quad \text{where } x \text{ is the unknown variable.}

\]

Rendered Output:

x

=

5

,

where

x

is the unknown variable.

x = 5, \quad \text{where } x \text{ is the unknown variable.}

x=5,where x is the unknown variable.

1.5 Using LaTeX in Markdown

在不同的 Markdown 编辑器中,LaTeX 的支持情况如下:

编辑器支持情况备注Jupyter Notebook✅ 完全支持需安装 MathJaxTypora✅ 完全支持需开启 Markdown 数学Obsidian✅ 完全支持内置 MathJaxVS Code + Markdown Preview Enhanced✅ 完全支持需安装插件GitHub Markdown⚠ 部分支持仅支持 $...$,不支持 \[\]

1.6 Test

可以尝试以下 LaTeX 代码,并查看渲染效果:

1. $\frac{a}{b}$

2. $\sqrt{x^2 + y^2}$

3. $\sum_{i=1}^{n} i^2$

4. $\int_{0}^{\infty} e^{-x}dx$

5. $f(x) = \begin{cases} x^2, & x \geq 0 \\ -x, & x < 0 \end{cases}$

2 Greek Letters.

希腊字母

Lowercase Greek Letters.

SymbolCommandSymbolCommandSymbolCommand

α

\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

Uppercase Greek Letters.

SymbolCommandSymbolCommandSymbolCommand

Γ

\Gamma

Γ\Gamma

Δ

\Delta

Δ\Delta

Θ

\Theta

Θ\Theta

Λ

\Lambda

Λ\Lambda

Ξ

\Xi

Ξ\Xi

Π

\Pi

Π\Pi

Σ

\Sigma

Σ\Sigma

Υ

\Upsilon

Υ\Upsilon

Φ

\Phi

Φ\Phi

Ψ

\Psi

Ψ\Psi

Ω

\Omega

Ω\Omega

\aleph

ℵ\aleph

\beth

ℶ\beth

\daleth

ℸ\daleth

\gimel

ℷ\gimel

有代码的大写希腊字母,直接敲获得正体,使用\var前缀转化为斜体

如:\Gamma

Γ

\Gamma

Γ(正) \varGamma

Γ

\varGamma

Γ(斜)

没有代码的大写希腊字母,直接敲得斜体,使用\text 命令转化为正体

如:T

T

T

T直接敲(斜) \text T

T

\text T

T(正)

(也可以使用\rm将下一个单词变正,\text T的作用范围只是下一个字母;可以尝试加{})

3 Math Mode Accents

在 LaTeX 数学模式中,我们可以使用 重音符号 来表示:

导数(Newton 记号)单位向量逼近(傅里叶变换)复数共轭上下划线用于变量强调

Summary Table

SymbolCommandSymbolCommandSymbolCommand

a

^

\hat{a}

a^\hat{a}

a

ˇ

\check{a}

aˇ\check{a}

a

˙

\dot{a}

a˙\dot{a}

a

˘

\breve{a}

a˘\breve{a}

a

ˊ

\acute{a}

aˊ\acute{a}

a

¨

\ddot{a}

a¨\ddot{a}

a

ˋ

\grave{a}

aˋ\grave{a}

a

~

\tilde{a}

a~\tilde{a}

a

˚

\mathring{a}

a˚\mathring{a}

a

ˉ

\bar{a}

aˉ\bar{a}

a

\vec{a}

a

\vec{a}

A

B

\overrightarrow{AB}

AB

\overrightarrow{AB}

C

D

\overleftarrow{CD}

CD

\overleftarrow{CD}

x

y

z

\overline{xyz}

xyz​\overline{xyz}

a

b

c

\underline{abc}

abc​\underline{abc}

A

^

\widehat{A}

A

\widehat{A}

A

~

\widetilde{A}

A

\widetilde{A}

a

+

b

+

c

\overbrace{a + b + c}

a+b+c

​\overbrace{a + b + c}

1

+

2

+

+

n

\underbrace{1 + 2 + \dots + n}

1+2+⋯+n​\underbrace{1 + 2 + \dots + n}

3.1 Superscripts

用于:

单位向量(

x

^

\hat{x}

x^)近似表示(

x

~

\tilde{x}

x~)一阶/二阶导数(

x

˙

\dot{x}

x˙,

x

¨

\ddot{x}

x¨)

SymbolCommandDescription

x

^

\hat{x}

x^\hat{x}单位向量

x

y

^

\widehat{xy}

xy

​\widehat{xy}大范围的帽子符号

x

~

\tilde{x}

x~\tilde{x}近似表示(如傅里叶变换)

a

b

c

~

\widetilde{abc}

abc

\widetilde{abc}大范围的波浪符号

x

˙

\dot{x}

x˙\dot{x}一阶导数(微分)

x

¨

\ddot{x}

x¨\ddot{x}二阶导数(加速度)

Example

$\hat{x}, \widehat{xy}, \tilde{x}, \widetilde{abc}, \dot{x}, \ddot{x}$

Rendered Output

x

^

,

x

y

^

,

x

~

,

a

b

c

~

,

x

˙

,

x

¨

\hat{x}, \widehat{xy}, \tilde{x}, \widetilde{abc}, \dot{x}, \ddot{x}

x^,xy

​,x~,abc

,x˙,x¨

3.2 Vector Symbols

用于:

物理和工程中的向量(

v

\vec{v}

v

)几何中的方向向量(

A

B

\overrightarrow{AB}

AB

SymbolCommandDescription

v

\vec{v}

v

\vec{v}标准向量符号

A

B

\overrightarrow{AB}

AB

\overrightarrow{AB}带方向的向量

C

D

\overleftarrow{CD}

CD

\overleftarrow{CD}反向向量

Example

$\vec{v}, \overrightarrow{AB}, \overleftarrow{CD}$

Rendered Output

v

,

A

B

,

C

D

\vec{v}, \overrightarrow{AB}, \overleftarrow{CD}

v

,AB

,CD

3.3 Overline & Underline

用于:

复共轭(

z

\overline{z}

z)变量强调(

x

\underline{x}

x​)

SymbolCommandDescription

x

+

y

\overline{x+y}

x+y​\overline{x+y}复共轭,均值等

a

b

c

\underline{abc}

abc​\underline{abc}变量下划线

a

+

b

+

c

Sum

\overbrace{a + b + c}^{\text{Sum}}

a+b+c

​Sum​\overbrace{a + b + c}^{\text{Sum}}括号上标注

1

+

2

+

+

n

n-term sum

\underbrace{1 + 2 + \dots + n}_{\text{n-term sum}}

n-term sum

1+2+⋯+n​​\underbrace{1 + 2 + \dots + n}_{\text{n-term sum}}括号下标注

Example

$\overline{x+y}, \underline{abc}, \overbrace{a + b + c}^{\text{Sum}}, \underbrace{1 + 2 + \dots + n}_{\text{n-term sum}}$

Rendered Output

x

+

y

,

a

b

c

,

a

+

b

+

c

Sum

,

1

+

2

+

+

n

n-term sum

\overline{x+y}, \underline{abc}, \overbrace{a + b + c}^{\text{Sum}}, \underbrace{1 + 2 + \dots + n}_{\text{n-term sum}}

x+y​,abc​,a+b+c

​Sum​,n-term sum

1+2+⋯+n​​

4 Math Constructs

在 LaTeX 数学模式中,可以使用各种数学结构来表示 指数、下标、分数、根号、求和、积分、极限、对数、三角函数 等。

4.1 Exponents and Subscripts

SymbolCommandDescription

a

2

a^2

a2a^2上标符号,表示指数运算。

x

i

x_i

xi​x_i下标符号,常用于表示索引或元素的位置。

y

m

+

n

y^{m+n}

ym+ny^{m+n}上标符号,可以表示多项式中的指数。

z

i

,

j

z_{i,j}

zi,j​z_{i,j}下标符号,常用于表示矩阵或多维数组中的元素。

Example

$a^2, x_i, y^{m+n}, z_{i,j}$

Rendered Output

a

2

,

x

i

,

y

m

+

n

,

z

i

,

j

a^2, x_i, y^{m+n}, z_{i,j}

a2,xi​,ym+n,zi,j​

4.2 Fractions

SymbolCommandDescription

a

b

\frac{a}{b}

ba​\frac{a}{b}普通分数格式,适用于行内公式。

a

b

\dfrac{a}{b}

ba​\dfrac{a}{b}显示模式下的分数,显示更大,适合单独一行的公式。

a

b

\tfrac{a}{b}

ba​\tfrac{a}{b}小尺寸的分数,适用于行内公式。

Example

$\frac{a}{b}, \dfrac{a}{b}, \tfrac{a}{b}$

Rendered Output

a

b

,

a

b

,

a

b

\frac{a}{b}, \dfrac{a}{b}, \tfrac{a}{b}

ba​,ba​,ba​

4.3 Radicals

SymbolCommandDescription

2

\sqrt{2}

2

​\sqrt{2}平方根,表示

2

2

2 的平方根。

x

3

\sqrt[3]{x}

3x

​\sqrt[3]{x}立方根,表示

x

x

x 的三次根。

Example

$\sqrt{2}, \sqrt[3]{x}$

Rendered Output

2

,

x

3

\sqrt{2}, \sqrt[3]{x}

2

​,3x

4.4 Summation and Integration

SymbolCommandDescription

i

=

1

n

i

2

\sum_{i=1}^{n} i^2

∑i=1n​i2\sum_{i=1}^{n} i^2求和符号,表示累加运算。

i

=

1

n

i

\prod_{i=1}^{n} i

∏i=1n​i\prod_{i=1}^{n} i积符号,表示累乘运算。

0

e

x

d

x

\int_{0}^{\infty} e^{-x}dx

∫0∞​e−xdx\int_{0}^{\infty} e^{-x}dx积分符号,表示对函数的积分,通常用于计算连续量。

D

f

(

x

,

y

)

d

x

d

y

\iint_D f(x,y)dxdy

∬D​f(x,y)dxdy\iint_D f(x,y)dxdy双重积分,用于二维空间的积分。

V

f

(

x

,

y

,

z

)

d

x

d

y

d

z

\iiint_V f(x,y,z)dxdydz

∭V​f(x,y,z)dxdydz\iiint_V f(x,y,z)dxdydz三重积分,用于三维空间的积分。

Example

$\sum_{i=1}^{n} i^2, \prod_{i=1}^{n} i, \int_{0}^{\infty} e^{-x}dx$

Rendered Output

i

=

1

n

i

2

,

i

=

1

n

i

,

0

e

x

d

x

\sum_{i=1}^{n} i^2, \prod_{i=1}^{n} i, \int_{0}^{\infty} e^{-x}dx

i=1∑n​i2,i=1∏n​i,∫0∞​e−xdx

4.5 Limits, Logarithms, and Trigonometric Functions

SymbolCommandDescription

arccos

\arccos

arccos\arccos反余弦函数,表示角度的反函数。

arcsin

\arcsin

arcsin\arcsin反正弦函数,表示角度的反函数。

arctan

\arctan

arctan\arctan反正切函数,表示角度的反函数。

cos

\cos

cos\cos余弦函数,常用于三角形计算和周期性现象。

cosh

\cosh

cosh\cosh双曲余弦函数,常用于描述双曲线的性质。

cot

\cot

cot\cot余切函数,是正切函数的倒数。

csc

\csc

csc\csc余割函数,是正弦函数的倒数。

deg

\deg

deg\deg度数符号,表示角度单位。

det

\det

det\det行列式,表示矩阵的行列式值。

exp

\exp

exp\exp指数函数,表示以自然常数

e

e

e 为底的指数函数。

gcd

\gcd

gcd\gcd最大公约数,用于表示两个数的最大公约数。

hom

\hom

hom\hom同态,用于代数结构中的映射。

ker

\ker

ker\ker核,表示线性变换的核空间。

lim

\lim

lim\lim极限符号,表示一个函数在某点的极限值。

lg

\lg

lg\lg常用对数,以

10

10

10 为底的对数。

lim sup

\limsup

limsup\limsup上极限,表示一列数的上极限。

ln

\ln

ln\ln自然对数,以

e

e

e 为底的对数。

log

\log

log\log对数,一般情况下指任意底数的对数。

min

\min

min\min最小值,表示函数的最小值。

Pr

\Pr

Pr\Pr概率,表示事件发生的概率。

sup

\sup

sup\sup上确界,表示函数的上界。

sinh

\sinh

sinh\sinh双曲正弦函数,常用于描述双曲线的性质。

sin

\sin

sin\sin正弦函数,常用于三角形计算和周期性现象。

tan

\tan

tan\tan正切函数,常用于角度计算。

sec

\sec

sec\sec正割函数,是余弦函数的倒数。

tanh

\tanh

tanh\tanh双曲正切函数,常用于描述双曲线的性质。

inf

\inf

inf\inf下确界,表示函数的下界。

max

\max

max\max最大值,表示函数的最大值。

arg

\arg

arg\arg辐角,表示复数的相位角。

lim inf

\liminf

liminf\liminf下极限,表示一列数的下极限。

Example

$\lim_{x \to \infty} f(x), \log x, \ln x, \sin x, \cos x, \tan x$

Rendered Output

lim

x

f

(

x

)

,

log

x

,

ln

x

,

sin

x

,

cos

x

,

tan

x

\lim_{x \to \infty} f(x), \log x, \ln x, \sin x, \cos x, \tan x

x→∞lim​f(x),logx,lnx,sinx,cosx,tanx

5 Delimiters

在 LaTeX 数学模式中,分隔符用于 包围数学表达式,例如 括号、绝对值、范数 等。使用 \left 和 \right 使括号大小自适应内容。

5.1 Standard Delimiters

SymbolCommandDescription

(

a

+

b

)

(a+b)

(a+b)(a+b)普通小括号

[

a

+

b

]

[a+b]

[a+b][a+b]普通方括号

a

+

b

{a+b}

a+b{a+b}花括号,用于集合表示等

a

,

b

\langle a, b \rangle

⟨a,b⟩\langle a, b \rangle尖括号,常用于内积或向量表示

Example

$(a+b), [a+b], \{a+b\}, \langle a, b \rangle$

Rendered Output

(

a

+

b

)

,

[

a

+

b

]

,

{

a

+

b

}

,

a

,

b

(a+b), [a+b], \{a+b\}, \langle a, b \rangle

(a+b),[a+b],{a+b},⟨a,b⟩

5.2 Resizable Delimiters

SymbolCommandDescription

(

x

+

y

)

\left( x+y \right)

(x+y)\left( x+y \right)自动调节大小的小括号

[

x

+

y

]

\left[ x+y \right]

[x+y]\left[ x+y \right]自动调节大小的方括号

{

x

+

y

}

\{ x+y \}

{x+y}\left{ x+y \right}自动调节大小的花括号

x

+

y

\left\langle x+y \right\rangle

⟨x+y⟩\left\langle x+y \right\rangle自动调节大小的尖括号

Example

\left( x+y \right), \left[ x+y \right], \left\{ x+y \right\}, \left\langle x+y \right\rangle

Rendered Output

(

x

+

y

)

,

[

x

+

y

]

,

{

x

+

y

}

,

x

+

y

\left( x+y \right), \left[ x+y \right], \left\{ x+y \right\}, \left\langle x+y \right\rangle

(x+y),[x+y],{x+y},⟨x+y⟩

5.3 Absolute Value and Norm

Example

|x|, \left| x+y \right|, \|x\|, \left\| x+y \right\|

Rendered Output

x

,

x

+

y

,

x

,

x

+

y

|x|, \left| x+y \right|, \|x\|, \left\| x+y \right\|

∣x∣,∣x+y∣,∥x∥,∥x+y∥

5.4 Floor and Ceiling Functions

SymbolCommandDescription

x

\lfloor x \rfloor

⌊x⌋\lfloor x \rfloor向下取整符号

x

\left\lfloor x \right\rfloor

⌊x⌋\left\lfloor x \right\rfloor自适应大小的向下取整

x

\lceil x \rceil

⌈x⌉\lceil x \rceil向上取整符号

x

\left\lceil x \right\rceil

⌈x⌉\left\lceil x \right\rceil自适应大小的向上取整

Example

\lfloor x \rfloor, \left\lfloor x \right\rfloor, \lceil x \rceil, \left\lceil x \right\rceil

Rendered Output

x

,

x

,

x

,

x

\lfloor x \rfloor, \left\lfloor x \right\rfloor, \lceil x \rceil, \left\lceil x \right\rceil

⌊x⌋,⌊x⌋,⌈x⌉,⌈x⌉

5.5 Additional Delimiters

SymbolCommandSymbolCommandSymbolCommand

\lgroup

⟮\lgroup

\rgroup

⟯\rgroupno support\arrowvertno support\Arrowvert

{

\lbrace

{\lbrace

}

\rbrace

}\rbrace

\lmoustache

⎰\lmoustache

\rmoustache

⎱\rmoustacheno support\bracevert

6 Variable-sized Symbols

在 LaTeX 中,某些数学符号会根据公式模式的不同自动调整大小。特别是在独立公式模式下,这些符号通常会变大,以增强可读性和表现力。

SymbolCommandDescription

\sum

∑\sum求和符号

\prod

∏\prod积符号

\coprod

∐\coprod共积符号

\int

∫\int积分符号

\oint

∮\oint曲线积分符号

\biguplus

⨄\biguplus并积符号

\bigcap

⋂\bigcap交集符号

\bigcup

⋃\bigcup并集符号

\bigotimes

⨂\bigotimes张量积符号

\bigvee

⋁\bigvee并(大写)符号

\bigwedge

⋀\bigwedge交(大写)符号

\bigodot

⨀\bigodot点积符号

\bigsqcup

⨆\bigsqcup并集(带上标)

\sum, \prod, \coprod, \int, \oint, \biguplus, \bigcap, \bigcup, \bigotimes, \bigvee, \bigwedge, \bigodot, \bigsqcup

渲染后的效果:

,

,

,

,

,

,

,

,

,

,

,

,

\sum, \prod, \coprod, \int, \oint, \biguplus, \bigcap, \bigcup, \bigotimes, \bigvee, \bigwedge, \bigodot, \bigsqcup

∑,∏,∐,∫,∮,⨄,⋂,⋃,⨂,⋁,⋀,⨀,⨆

7 Binary Operation/Relation Symbols

Operators Symbols

SymbolCommandSymbolCommandSymbolCommand

±

\pm

±\pm

\mp

∓\mp

×

\times

×\times

÷

\div

÷\div

\cdot

⋅\cdot

\ast

∗\ast

\star

⋆\star

\dagger

†\dagger

\ddagger

‡\ddagger

⨿

\amalg

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

x

\sqrt{x}

x

​\sqrt{x}

x

x^{\circ}

x∘x^{\circ}

\triangledown

▽\triangledown

x

n

\sqrt[n]{x}

nx

​\sqrt[n]{x}

a

x

a^x

axa^x

a

x

y

z

a^{xyz}

axyza^{xyz}

a

x

a_x

ax​a_x

Relations Symbols

SymbolCommandSymbolCommandSymbolCommand

\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

Negated Relations Symbols

SymbolCommandSymbolCommandSymbolCommand

\nmid

∤\nmid

\nleq

≰\nleq

\ngeq

≱\ngeq

\nsim

≁\nsim

\ncong

≆\ncong

\nparallel

∦\nparallel

\not<

<\not<

\not>

>\not>

\not=

=\not=, \neq, \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

8 Arrow symbols

Standard Arrows

SymbolCommandSymbolCommandSymbolCommand

\leftarrow

←\leftarrow

\longleftarrow

⟵\longleftarrow

\uparrow

↑\uparrow

\Leftarrow

⇐\Leftarrow

\Longleftarrow

⟸\Longleftarrow

\Uparrow

⇑\Uparrow

\rightarrow

→\rightarrow

\longrightarrow

⟶\longrightarrow

\downarrow

↓\downarrow

\Rightarrow

⇒\Rightarrow

\Longrightarrow

⟹\Longrightarrow

\Downarrow

⇓\Downarrow

\leftrightarrow

↔\leftrightarrow

\longleftrightarrow

⟷\longleftrightarrow

\updownarrow

↕\updownarrow

\Leftrightarrow

⇔\Leftrightarrow

\Longleftrightarrow

⟺\Longleftrightarrow

\Updownarrow

⇕\Updownarrow

A

B

\overrightarrow{AB}

AB

\overrightarrow{AB}

A

B

\overleftarrow{AB}

AB

\overleftarrow{AB}

A

B

\overleftrightarrow{AB}

AB

\overleftrightarrow{AB}

Mapping and Hook Arrows

SymbolCommandSymbolCommandSymbolCommand

\mapsto

↦\mapsto

\longmapsto

⟼\longmapsto

\nearrow

↗\nearrow

\hookleftarrow

↩\hookleftarrow

\hookrightarrow

↪\hookrightarrow

\searrow

↘\searrow

\leftharpoonup

↼\leftharpoonup

\rightharpoonup

⇀\rightharpoonup

\swarrow

↙\swarrow

\leftharpoondown

↽\leftharpoondown

\rightharpoondown

⇁\rightharpoondown

\nwarrow

↖\nwarrow

\rightleftharpoons

⇌\rightleftharpoons

\leadsto

⇝\leadsto

Extended Arrows

SymbolCommandSymbolCommandSymbolCommand

\dashrightarrow

⇢\dashrightarrow

\dashleftarrow

⇠\dashleftarrow

\leftleftarrows

⇇\leftleftarrows

\leftrightarrows

⇆\leftrightarrows

\Leftarrow

⇐\Leftarrow

\twoheadleftarrow

↞\twoheadleftarrow

\leftarrowtail

↢\leftarrowtail

\looparrowleft

↫\looparrowleft

\leftrightharpoons

⇋\leftrightharpoons

\curvearrowleft

↶\curvearrowleft

\circlearrowleft

↺\circlearrowleft

\Lsh

↰\Lsh

\upuparrows

⇈\upuparrows

\upharpoonleft

↿\upharpoonleft

\downharpoonleft

⇃\downharpoonleft

\multimap

⊸\multimap

\leftrightsquigarrow

↭\leftrightsquigarrow

\rightrightarrows

⇉\rightrightarrows

\rightleftarrows

⇄\rightleftarrows

\rightrightarrows

⇉\rightrightarrows

\leftrightarrows

⇆\leftrightarrows

\twoheadrightarrow

↠\twoheadrightarrow

\rightarrowtail

↣\rightarrowtail

\looparrowright

↬\looparrowright

\rightleftharpoons

⇌\rightleftharpoons

\curvearrowright

↷\curvearrowright

\circlearrowright

↻\circlearrowright

\Rsh

↱\Rsh

\downdownarrows

⇊\downdownarrows

\upharpoonright

↾\upharpoonright

\downharpoonright

⇂\downharpoonright

\rightsquigarrow

⇝\rightsquigarrow

Negated Arrows

SymbolCommandSymbolCommandSymbolCommand

\nleftarrow

↚\nleftarrow

\nrightarrow

↛\nrightarrow

\nleftrightarrow

↮\nleftrightarrow

\nRightarrow

⇏\nRightarrow

\nLeftarrow

⇍\nLeftarrow

\nLeftrightarrow

⇎\nLeftrightarrow

9 Miscellaneous symbols

SymbolCommandSymbolCommandSymbolCommand

\infty

∞\infty

\nabla

∇\nabla

\partial

∂\partial

ð

\eth

ð\eth

\clubsuit

♣\clubsuit

\diamondsuit

♢\diamondsuit

\heartsuit

♡\heartsuit

\spadesuit

♠\spadesuit

\cdots

⋯\cdots

\vdots

⋮\vdots

\ldots

…\ldots

\ddots

⋱\ddots

\Im

ℑ\Im

\Re

ℜ\Re

\forall

∀\forall

\exists

∃\exists

\nexists

∄\nexists

\emptyset

∅\emptyset

\varnothing

∅\varnothing

ı

\imath

\imath

ȷ

\jmath

\jmath

\ell

ℓ\ell

\iiint

∭\iiint

\iint

∬\iint

\sharp

♯\sharp

\flat

♭\flat

\natural

♮\natural

k

\Bbbk

k\Bbbk

\bigstar

★\bigstar

\diagdown

╲\diagdown

\diagup

╱\diagup

\Diamond

◊\Diamond

\Finv

Ⅎ\Finv

\Game

⅁\Game

\hbar

ℏ\hbar

\hslash

ℏ\hslash

\lozenge

◊\lozenge

\mho

℧\mho

\prime

′\prime

\square

□\square

\surd

√\surd

\wp

℘\wp

\angle

∠\angle

\measuredangle

∡\measuredangle

\sphericalangle

∢\sphericalangle

\complement

∁\complement

\triangledown

▽\triangledown

\triangle

△\triangle

\vartriangle

△\vartriangle

\blacklozenge

⧫\blacklozenge

\blacksquare

■\blacksquare

\blacktriangle

▲\blacktriangle

\blacktriangledown

▼\blacktriangledown

\backprime

‵\backprime

\circledS

Ⓢ\circledS

§

\S

§\S

LaTeX

\LaTeX

LATE​X\LaTeX

10 Other Styles (math mode only)

StyleSymbolCommandCaligraphic letters

A

,

B

,

C

,

D

\mathcal{A}, \mathcal{B}, \mathcal{C}, \mathcal{D}

A,B,C,D etc.\mathcal{A}, \mathcal{B}, \mathcal{C}, \mathcal{D} etc.Mathbb letters

A

,

B

,

C

,

D

\mathbb{A}, \mathbb{B}, \mathbb{C}, \mathbb{D}

A,B,C,D etc.\mathbb{A}, \mathbb{B}, \mathbb{C}, \mathbb{D} etc.Mathfrak letters

A

,

B

,

C

,

D

\mathfrak{A}, \mathfrak{B}, \mathfrak{C}, \mathfrak{D}

A,B,C,D etc.\mathfrak{A}, \mathfrak{B}, \mathfrak{C}, \mathfrak{D} etc.Math Sans serif letters

A

,

B

,

C

,

D

\mathsf{A}, \mathsf{B}, \mathsf{C}, \mathsf{D}

A,B,C,D etc.\mathsf{A}, \mathsf{B}, \mathsf{C}, \mathsf{D} etc.Math bold letters

A

,

B

,

C

,

D

\mathbf{A}, \mathbf{B}, \mathbf{C}, \mathbf{D}

A,B,C,D etc.\mathbf{A}, \mathbf{B}, \mathbf{C}, \mathbf{D} etc.Math roman letters

A

,

B

,

C

,

D

\mathrm{A}, \mathrm{B}, \mathrm{C}, \mathrm{D}

A,B,C,D etc.\mathrm{A}, \mathrm{B}, \mathrm{C}, \mathrm{D} etc.Math italic letters

A

,

B

,

C

,

D

\mathit{A}, \mathit{B}, \mathit{C}, \mathit{D}

A,B,C,D etc.\mathit{A}, \mathit{B}, \mathit{C}, \mathit{D} etc.Math scr letters

A

,

B

,

C

,

D

\mathscr{A}, \mathscr{B}, \mathscr{C}, \mathscr{D}

A,B,C,D etc.\mathscr{A}, \mathscr{B}, \mathscr{C}, \mathscr{D} etc.

11 Font sizes

Math Mode

SymbolCommand

f

1

(

x

x

a

)

,

d

x

\int f^{-1}(x - x_a) , dx

∫f−1(x−xa​),dx\int f^{-1}(x - x_a) , dx

f

1

(

x

x

a

)

,

d

x

\displaystyle \int f^{-1}(x - x_a) , dx

∫f−1(x−xa​),dx\displaystyle \int f^{-1}(x - x_a) , dx

f

1

(

x

x

a

)

,

d

x

\textstyle \int f^{-1}(x - x_a) , dx

∫f−1(x−xa​),dx\textstyle \int f^{-1}(x - x_a) , dx

f

1

(

x

x

a

)

,

d

x

\scriptstyle \int f^{-1}(x - x_a) , dx

∫f−1(x−xa​),dx\scriptstyle \int f^{-1}(x - x_a) , dx

f

1

(

x

x

a

)

,

d

x

\scriptscriptstyle \int f^{-1}(x - x_a) , dx

∫f−1(x−xa​),dx\scriptscriptstyle \int f^{-1}(x - x_a) , dx

Text Mode

SymbolCommand

h

m

c

\tiny{hmc}

hmc\tiny{hmc}

h

m

c

\scriptsize{hmc}

hmc\scriptsize{hmc}

h

m

c

\small{hmc}

hmc\small{hmc}

h

m

c

\normalsize{hmc}

hmc\normalsize{hmc}

h

m

c

\large{hmc}

hmc\large{hmc}

h

m

c

\Large{hmc}

hmc\Large{hmc}

h

m

c

\LARGE{hmc}

hmc\LARGE{hmc}

h

m

c

\huge{hmc}

hmc\huge{hmc}

h

m

c

\Huge{hmc}

hmc\Huge{hmc}

12 Math Commands

Subscripts and Superscripts

SymbolCommandSymbolCommand

3

2

3^2

323^2

b

i

b_i

bi​b_i

3

23

3^{23}

3233^{23}

m

i

1

m_{i-1}

mi−1​m_{i-1}

d

3

i

+

1

d^{i+1}_3

d3i+1​d^{i+1}_3

y

3

2

y^2_3

y32​y^{2}_3

2

a

i

2^{ai}

2ai2^{ai}

2

(

a

i

)

2^{(a_i)}

2(ai​)2^{(a_i)}

Fractions

SymbolCommand

1

2

\frac{1}{2}

21​\frac{1}{2}

2

x

+

2

\frac{2}{x+2}

x+22​\frac{2}{x+2}

1

+

1

x

3

x

+

2

\frac{1 + \frac{1}{x}}{3x + 2}

3x+21+x1​​\frac{1 + \frac{1}{x}}{3x + 2}

2

1

+

2

1

+

2

1

+

2

1

\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}}

1+1+1+12​2​2​2​\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}}

SymbolCommand

(

a

x

)

2

(\frac{a}{x} )^2

(xa​)2(\frac{a}{x} )^2

(

a

x

)

2

\left(\frac{a}{x} \right)^2

(xa​)2\left(\frac{a}{x} \right)^2

x

y

\left\lceil \frac{x}{y} \right\rceil

⌈yx​⌉\left\lceil \frac{x}{y} \right\rceil

x

y

\left\lfloor \frac{x}{y} \right\rfloor

⌊yx​⌋\left\lfloor \frac{x}{y} \right\rfloor

a

0

+

a

1

+

a

2

+

+

a

n

x

\underbrace{a_0 + a_1 + a_2 + \cdots + a_n}_x

x

a0​+a1​+a2​+⋯+an​​​\underbrace{a_0 + a_1 + a_2 + \cdots + a_n}_x

a

0

+

a

1

+

a

2

+

+

a

n

x

\overbrace{a_0 + a_1 + a_2 + \cdots + a_n}^x

a0​+a1​+a2​+⋯+an​

​x​\overbrace{a_0 + a_1 + a_2 + \cdots + a_n}^x

arg

m

a

x

1

k

n

λ

k

λ

k

+

1

\arg \underset{1\leq k \leq n} {max} \frac{\lambda_k}{\lambda_{k+1}}

arg1≤k≤nmax​λk+1​λk​​\arg \underset{1\leq k \leq n} {max} \frac{\lambda_k}{\lambda_{k+1}}

Radicals

SymbolCommand

3

\sqrt{3}

3

​\sqrt{3}

x

+

y

\sqrt{x + y}

x+y

​\sqrt{x + y}

x

+

1

2

\sqrt{x + \frac{1}{2}}

x+21​

​\sqrt{x + \frac{1}{2}}

3

3

\sqrt[3]{3}

33

​\sqrt[3]{3}

x

n

\sqrt[n]{x}

nx

​\sqrt[n]{x}

Sums, Products, Limits and Logarithms

SymbolCommand

i

=

1

1

i

\sum_{i=1}^{\infty} \frac{1}{i}

∑i=1∞​i1​\sum_{i=1}^{\infty} \frac{1}{i}

n

=

1

5

n

n

1

\prod_{n=1}^5 \frac{n}{n-1}

∏n=15​n−1n​\prod_{n=1}^5 \frac{n}{n-1}

lim

x

1

x

\lim_{x \to \infty} \frac{1}{x}

limx→∞​x1​\lim_{x \to \infty} \frac{1}{x}

lim

x

1

x

\lim_{x \to \infty} \frac{1}{x}

limx→∞​x1​\lim_{x \to \infty} \frac{1}{x}

log

n

n

2

\log_n n^2

logn​n2\log_n n^2

Some of these are prettier in display mode:

SymbolCommand

i

=

1

1

i

\displaystyle\sum_{i=1}^{\infty} \frac{1}{i}

i=1∑∞​i1​\displaystyle\sum_{i=1}^{\infty} \frac{1}{i}

n

=

1

5

n

n

1

\displaystyle\prod_{n=1}^5 \frac{n}{n-1}

n=1∏5​n−1n​\displaystyle\prod_{n=1}^5 \frac{n}{n-1}

lim

x

1

x

\displaystyle\lim_{x \to \infty} \frac{1}{x}

x→∞lim​x1​\displaystyle\lim_{x \to \infty} \frac{1}{x}

Mods

SymbolCommand

1

i

\sum \frac{1}{i}

∑i1​\sum \frac{1}{i}

n

n

1

\prod \frac{n}{n-1}

∏n−1n​\prod \frac{n}{n-1}

log

n

2

\log n^2

logn2\log n^2

ln

e

\ln e

lne\ln e

Trigonometric Functions

SymbolCommand

cos

2

x

+

sin

2

x

=

1

\cos^2 x +\sin^2 x = 1

cos2x+sin2x=1\cos^2 x +\sin^2 x = 1

c

o

s

9

0

=

0

\\cos 90^\circ = 0

cos90∘=0\cos 90^\circ = 0

Calculus

SymbolCommand

d

d

x

(

x

2

)

=

2

x

\frac{d}{dx} \left( x^2 \right) = 2x

dxd​(x2)=2x\frac{d}{dx} \left( x^2 \right) = 2x

2

x

d

x

=

x

2

+

C

\int 2x \, dx = x^2 + C

∫2xdx=x2+C\int 2x , dx = x^2 + C

1

5

2

x

d

x

=

24

\int_1^5 2x \, dx = 24

∫15​2xdx=24\int_1^5 2x , dx = 24

2

U

x

2

+

2

U

y

2

\frac{\partial^2 U}{\partial x^2} + \frac{\partial^2 U}{\partial y^2}

∂x2∂2U​+∂y2∂2U​\frac{\partial^2 U}{\partial x^2} + \frac{\partial^2 U}{\partial y^2}

1

4

π

Σ

1

r

U

n

d

s

\frac{1}{4\pi}\oint_\Sigma\frac{1}{r}\frac{\partial U}{\partial n} ds

4π1​∮Σ​r1​∂n∂U​ds\frac{1}{4\pi}\oint_\Sigma\frac{1}{r}\frac{\partial U}{\partial n} ds

Array environment,examples

SymbolCommand

(

2

τ

7

ϕ

5

12

3

ψ

π

8

)

\begin{pmatrix} 2\tau & 7\phi-\frac{5}{12} \\ 3\psi & \frac{\pi}{8} \end{pmatrix}

(2τ3ψ​7ϕ−125​8π​​)\begin{pmatrix} 2\tau & 7\phi-\frac{5}{12} \ 3\psi & \frac{\pi}{8} \end{pmatrix}

(

x

y

)

\begin{pmatrix} x \\ y \end{pmatrix}

(xy​)\begin{pmatrix} x \ y \end{pmatrix}

[

3

4

5

1

3

729

]

\begin{bmatrix} 3 & 4 & 5 \\ 1 & 3 & 729 \end{bmatrix}

[31​43​5729​]\begin{bmatrix} 3 & 4 & 5 \ 1 & 3 & 729 \end{bmatrix}

(

2

τ

7

ϕ

5

12

3

ψ

π

8

)

(

x

y

)

a

n

d

[

3

4

5

1

3

729

]

\begin{pmatrix}2\tau & 7\phi-\frac{5}{12} \\3\psi & \frac{\pi}{8}\end{pmatrix}\begin{pmatrix}x \\y\end{pmatrix}\mathrm{and}\begin{bmatrix}3 & 4 & 5 \\1 & 3 & 729\end{bmatrix}

(2τ3ψ​7ϕ−125​8π​​)(xy​)and[31​43​5729​]\begin{pmatrix}2\tau & 7\phi-\frac{5}{12} \3\psi & \frac{\pi}{8}\end{pmatrix}\begin{pmatrix}x \y\end{pmatrix}\mathrm{and}\begin{bmatrix}3 & 4 & 5 \1 & 3 & 729\end{bmatrix}

Matrices and Arrays

A=

\begin{pmatrix}

a_{11} & a_{12} \\

a_{21} & a_{22}

\end{pmatrix}

A

=

(

a

11

a

12

a

21

a

22

)

A= \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}

A=(a11​a21​​a12​a22​​)

A=

\begin{bmatrix}

a_{11} & a_{12} \\

a_{21} & a_{22}

\end{bmatrix}

A

=

[

a

11

a

12

a

21

a

22

]

A= \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}

A=[a11​a21​​a12​a22​​]

\begin{bmatrix}

1 & 2 & 3 \\

4 & 5 & 6 \\

\end{bmatrix}

[

1

2

3

4

5

6

]

\begin{bmatrix}1 & 2 & 3 \\4 & 5 & 6 \\\end{bmatrix}

[14​25​36​]

A=

\begin{Bmatrix}

a_{11} & a_{12} \\

a_{21} & a_{22}

\end{Bmatrix}

A

=

{

a

11

a

12

a

21

a

22

}

A= \begin{Bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{Bmatrix}

A={a11​a21​​a12​a22​​}

A=

\begin{vmatrix}

a_{11} & a_{12} \\

a_{21} & a_{22}

\end{vmatrix}

A

=

a

11

a

12

a

21

a

22

A= \begin{vmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{vmatrix}

A=

​a11​a21​​a12​a22​​

A=

\begin{Vmatrix}

a_{11} & a_{12} \\

a_{21} & a_{22}

\end{Vmatrix}

A

=

a

11

a

12

a

21

a

22

A= \begin{Vmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{Vmatrix}

A=

​a11​a21​​a12​a22​​

A=

\begin{matrix}

a_{11} & a_{12} \\

a_{21} & a_{22}

\end{matrix}

A

=

a

11

a

12

a

21

a

22

A= \begin{matrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{matrix}

A=a11​a21​​a12​a22​​

\begin{array}{ccc}

a & b & c \\

d & e & f \\

g & h & i

\end{array}

a

b

c

d

e

f

g

h

i

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

adg​beh​cfi​

\mathbf{X} =

\left(

\begin{array}{cccc}

x_{11} & x_{12} & \ldots & x_{1n}\\

x_{21} & x_{22} & \ldots & x_{2n}\\

\vdots & \vdots & \ddots & \vdots\\

x_{n1} & x_{n2} & \ldots & x_{nn}\\

\end{array}

\right)

X

=

(

x

11

x

12

x

1

n

x

21

x

22

x

2

n

x

n

1

x

n

2

x

n

n

)

\mathbf{X} = \left( \begin{array}{cccc} x_{11} & x_{12} & \ldots & x_{1n}\\ x_{21} & x_{22} & \ldots & x_{2n}\\ \vdots & \vdots & \ddots & \vdots\\ x_{n1} & x_{n2} & \ldots & x_{nn}\\ \end{array} \right)

X=

​x11​x21​⋮xn1​​x12​x22​⋮xn2​​……⋱…​x1n​x2n​⋮xnn​​

\begin{matrix}

1 & 2 \\\\ 3 & 4

\end{matrix} \qquad

\begin{bmatrix}

x_{11} & x_{12} & \ldots & x_{1n}\\

x_{21} & x_{22} & \ldots & x_{2n}\\

\vdots & \vdots & \ddots & \vdots\\

x_{n1} & x_{n2} & \ldots & x_{nn}\\

\end{bmatrix}

1

2

3

4

[

x

11

x

12

x

1

n

x

21

x

22

x

2

n

x

n

1

x

n

2

x

n

n

]

\begin{matrix} 1 & 2 \\\\ 3 & 4 \end{matrix} \qquad \begin{bmatrix} x_{11} & x_{12} & \ldots & x_{1n}\\ x_{21} & x_{22} & \ldots & x_{2n}\\ \vdots & \vdots & \ddots & \vdots\\ x_{n1} & x_{n2} & \ldots & x_{nn}\\ \end{bmatrix}

13​24​

​x11​x21​⋮xn1​​x12​x22​⋮xn2​​……⋱…​x1n​x2n​⋮xnn​​

Multi-line formula alignment

\begin{split}

L(\theta)

&= \arg\max_{\theta}\ln(P_{All})\\

&= \arg\max_{\theta}\ln\prod_{i=1}^{n}

\left[

(h_{\theta}(\mathbf{x}^{(i)}))^{\mathbf{y}^{(i)}}\cdot

(1-h_{\theta}(\mathbf{x}^{(i)}))^{1-\mathbf{y}^{(i)}}

\right]\\

&= \arg\max_{\theta}\sum_{i=1}^{n}

\left[

\mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) +

(1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)}))

\right]\\

&= \arg\min_{\theta}

\left[

-\sum_{i=1}^{n}

\left[

\mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) +

(1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)}))

\right]

\right]\\

&= \arg\min_{\theta}\mathscr{l}(\theta)

\end{split}

L

(

θ

)

=

arg

max

θ

ln

(

P

A

l

l

)

=

arg

max

θ

ln

i

=

1

n

[

(

h

θ

(

x

(

i

)

)

)

y

(

i

)

(

1

h

θ

(

x

(

i

)

)

)

1

y

(

i

)

]

=

arg

max

θ

i

=

1

n

[

y

(

i

)

ln

(

h

θ

(

x

(

i

)

)

)

+

(

1

y

(

i

)

)

ln

(

1

h

θ

(

x

(

i

)

)

)

]

=

arg

min

θ

[

i

=

1

n

[

y

(

i

)

ln

(

h

θ

(

x

(

i

)

)

)

+

(

1

y

(

i

)

)

ln

(

1

h

θ

(

x

(

i

)

)

)

]

]

=

arg

min

θ

l

(

θ

)

\begin{split} L(\theta) &= \arg\max_{\theta}\ln(P_{All})\\ &= \arg\max_{\theta}\ln\prod_{i=1}^{n} \left[ (h_{\theta}(\mathbf{x}^{(i)}))^{\mathbf{y}^{(i)}}\cdot (1-h_{\theta}(\mathbf{x}^{(i)}))^{1-\mathbf{y}^{(i)}} \right]\\ &= \arg\max_{\theta}\sum_{i=1}^{n} \left[ \mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) + (1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)})) \right]\\ &= \arg\min_{\theta} \left[ -\sum_{i=1}^{n} \left[ \mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) + (1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)})) \right] \right]\\ &= \arg\min_{\theta}\mathscr{l}(\theta) \end{split}

L(θ)​=argθmax​ln(PAll​)=argθmax​lni=1∏n​[(hθ​(x(i)))y(i)⋅(1−hθ​(x(i)))1−y(i)]=argθmax​i=1∑n​[y(i)ln(hθ​(x(i)))+(1−y(i))ln(1−hθ​(x(i)))]=argθmin​[−i=1∑n​[y(i)ln(hθ​(x(i)))+(1−y(i))ln(1−hθ​(x(i)))]]=argθmin​l(θ)​

\begin{split}

L(\theta)

= \arg\max_{\theta}\ln(P_{All})\\

= \arg\max_{\theta}\ln\prod_{i=1}^{n}

\left[

(h_{\theta}(\mathbf{x}^{(i)}))^{\mathbf{y}^{(i)}}\cdot

(1-h_{\theta}(\mathbf{x}^{(i)}))^{1-\mathbf{y}^{(i)}}

\right]\\

= \arg\max_{\theta}\sum_{i=1}^{n}

\left[

\mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) +

(1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)}))

\right]\\

= \arg\min_{\theta}

\left[

-\sum_{i=1}^{n}

\left[

\mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) +

(1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)}))

\right]

\right]\\

= \arg\min_{\theta}\mathscr{l}(\theta)

\end{split}

L

(

θ

)

=

arg

max

θ

ln

(

P

A

l

l

)

=

arg

max

θ

ln

i

=

1

n

[

(

h

θ

(

x

(

i

)

)

)

y

(

i

)

(

1

h

θ

(

x

(

i

)

)

)

1

y

(

i

)

]

=

arg

max

θ

i

=

1

n

[

y

(

i

)

ln

(

h

θ

(

x

(

i

)

)

)

+

(

1

y

(

i

)

)

ln

(

1

h

θ

(

x

(

i

)

)

)

]

=

arg

min

θ

[

i

=

1

n

[

y

(

i

)

ln

(

h

θ

(

x

(

i

)

)

)

+

(

1

y

(

i

)

)

ln

(

1

h

θ

(

x

(

i

)

)

)

]

]

=

arg

min

θ

l

(

θ

)

\begin{split} L(\theta) = \arg\max_{\theta}\ln(P_{All})\\ = \arg\max_{\theta}\ln\prod_{i=1}^{n} \left[ (h_{\theta}(\mathbf{x}^{(i)}))^{\mathbf{y}^{(i)}}\cdot (1-h_{\theta}(\mathbf{x}^{(i)}))^{1-\mathbf{y}^{(i)}} \right]\\ = \arg\max_{\theta}\sum_{i=1}^{n} \left[ \mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) + (1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)})) \right]\\ = \arg\min_{\theta} \left[ -\sum_{i=1}^{n} \left[ \mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) + (1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)})) \right] \right]\\ = \arg\min_{\theta}\mathscr{l}(\theta) \end{split}

L(θ)=argθmax​ln(PAll​)=argθmax​lni=1∏n​[(hθ​(x(i)))y(i)⋅(1−hθ​(x(i)))1−y(i)]=argθmax​i=1∑n​[y(i)ln(hθ​(x(i)))+(1−y(i))ln(1−hθ​(x(i)))]=argθmin​[−i=1∑n​[y(i)ln(hθ​(x(i)))+(1−y(i))ln(1−hθ​(x(i)))]]=argθmin​l(θ)​

\begin{split}

&\ln h_{\theta}(\mathbf{x}^{(i)})

= \ln\frac{1}{1+e^{-\theta^T \mathbf{x}^{(i)}}}

= -\ln(1+e^{\theta^T \mathbf{x}^{(i)}})\\

&\ln(1-h_{\theta}(\mathbf{x}^{(i)}))

= \ln(1-\frac{1}{1+e^{-\theta^T \mathbf{x}^{(i)}}})

= -\theta^T \mathbf{x}^{(i)}-\ln(1+e^{\theta^T \mathbf{x}^{(i)}})

\end{split}

ln

h

θ

(

x

(

i

)

)

=

ln

1

1

+

e

θ

T

x

(

i

)

=

ln

(

1

+

e

θ

T

x

(

i

)

)

ln

(

1

h

θ

(

x

(

i

)

)

)

=

ln

(

1

1

1

+

e

θ

T

x

(

i

)

)

=

θ

T

x

(

i

)

ln

(

1

+

e

θ

T

x

(

i

)

)

\begin{split} &\ln h_{\theta}(\mathbf{x}^{(i)}) = \ln\frac{1}{1+e^{-\theta^T \mathbf{x}^{(i)}}} = -\ln(1+e^{\theta^T \mathbf{x}^{(i)}})\\ &\ln(1-h_{\theta}(\mathbf{x}^{(i)})) = \ln(1-\frac{1}{1+e^{-\theta^T \mathbf{x}^{(i)}}}) = -\theta^T \mathbf{x}^{(i)}-\ln(1+e^{\theta^T \mathbf{x}^{(i)}}) \end{split}

​lnhθ​(x(i))=ln1+e−θTx(i)1​=−ln(1+eθTx(i))ln(1−hθ​(x(i)))=ln(1−1+e−θTx(i)1​)=−θTx(i)−ln(1+eθTx(i))​

\begin{align}

&\ln h_{\theta}(\mathbf{x}^{(i)})

= \ln\frac{1}{1+e^{-\theta^T \mathbf{x}^{(i)}}}

= -\ln(1+e^{\theta^T \mathbf{x}^{(i)}})\\

&\ln(1-h_{\theta}(\mathbf{x}^{(i)}))

= \ln(1-\frac{1}{1+e^{-\theta^T \mathbf{x}^{(i)}}})

= -\theta^T \mathbf{x}^{(i)}-\ln(1+e^{\theta^T \mathbf{x}^{(i)}})

\end{align}

ln

h

θ

(

x

(

i

)

)

=

ln

1

1

+

e

θ

T

x

(

i

)

=

ln

(

1

+

e

θ

T

x

(

i

)

)

ln

(

1

h

θ

(

x

(

i

)

)

)

=

ln

(

1

1

1

+

e

θ

T

x

(

i

)

)

=

θ

T

x

(

i

)

ln

(

1

+

e

θ

T

x

(

i

)

)

\begin{align} &\ln h_{\theta}(\mathbf{x}^{(i)}) = \ln\frac{1}{1+e^{-\theta^T \mathbf{x}^{(i)}}} = -\ln(1+e^{\theta^T \mathbf{x}^{(i)}})\\ &\ln(1-h_{\theta}(\mathbf{x}^{(i)})) = \ln(1-\frac{1}{1+e^{-\theta^T \mathbf{x}^{(i)}}}) = -\theta^T \mathbf{x}^{(i)}-\ln(1+e^{\theta^T \mathbf{x}^{(i)}}) \end{align}

​lnhθ​(x(i))=ln1+e−θTx(i)1​=−ln(1+eθTx(i))ln(1−hθ​(x(i)))=ln(1−1+e−θTx(i)1​)=−θTx(i)−ln(1+eθTx(i))​​

Groups of equations

\begin{cases}

\begin{split}

p &= P(y=1|\mathbf{x})=

\frac{1}{1+e^{-\theta^T\mathbf{X}}}\\

1-p &= P(y=0|\mathbf{x})=1-P(y=1|\mathbf{x})=

\frac{1}{1+e^{\theta^T\mathbf{X}}}

\end{split}

\end{cases}

{

p

=

P

(

y

=

1

x

)

=

1

1

+

e

θ

T

X

1

p

=

P

(

y

=

0

x

)

=

1

P

(

y

=

1

x

)

=

1

1

+

e

θ

T

X

\begin{cases} \begin{split} p &= P(y=1|\mathbf{x})= \frac{1}{1+e^{-\theta^T\mathbf{X}}}\\ 1-p &= P(y=0|\mathbf{x})=1-P(y=1|\mathbf{x})= \frac{1}{1+e^{\theta^T\mathbf{X}}} \end{split} \end{cases}

⎧​p1−p​=P(y=1∣x)=1+e−θTX1​=P(y=0∣x)=1−P(y=1∣x)=1+eθTX1​​​

\text{Decision Boundary}=

\begin{cases}

1\quad \text{if }\ \hat{y}>0.5\\

0\quad \text{otherwise}

\end{cases}

Decision Boundary

=

{

1

if

y

^

>

0.5

0

otherwise

\text{Decision Boundary}= \begin{cases} 1\quad \text{if }\ \hat{y}>0.5\\ 0\quad \text{otherwise} \end{cases}

Decision Boundary={1if y^​>0.50otherwise​

Reference

LaTeX:symbol

LaTeX:command

lshort-zh-cn

CSDN:Latex数学公式符号大全(超详细)

CSDN:LaTex符号大全(LaTeX_Symbols)

Last

若您发现文中存在任何不准确或错误的地方,欢迎提出宝贵意见,笔者将会尽快修正并改进。同时,若本文中的任何内容无意中侵犯了某些个人或机构的版权或知识产权,笔者深感抱歉,并愿意及时处理相关事宜,删除或修改相关部分。

本笔记内容仅供学习和交流使用,任何商业用途或其他非法使用行为,请务必遵守相关法律法规,并获得原作者授权。

Posted in 简易世界杯
Copyright © 2088 世界杯历年冠军_世界杯央视 - zhwnj.com All Rights Reserved.
友情链接