∑
i
=
1
∞
1
i
\textstyle \sum_{i=1}^{\infty}\frac{1}{i}
∑i=1∞i1
\sum_{i=1}^{\infty}\frac{1}{i}
∏
n
=
1
5
n
n
−
1
\textstyle \prod_{n=1}^5\frac{n}{n-1}
∏n=15n−1n
\prod_{n=1}^5\frac{n}{n-1}
lim
x
→
∞
1
x
\textstyle \lim_{x\to\infty}\frac{1}{x}
limx→∞x1
\lim_{x\to\infty}\frac{1}{x}
lim
x
→
∞
1
x
\textstyle \lim\limits_{x\to\infty}\frac{1}{x}
x→∞limx1
\lim\limits_{x\to\infty}\frac{1}{x}
log
n
n
2
\textstyle \log_n n^2
lognn2
\log_n n^2
Some of these are prettier in display mode:
Symbol
Command
∑
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∏5n−1n
\displaystyle\prod_{n=1}^5\frac{n}{n-1}
lim
x
→
∞
1
x
\displaystyle\lim_{x\to\infty}\frac{1}{x}
x→∞limx1
\displaystyle\lim_{x\to\infty}\frac{1}{x}
Note that we can use sums, products, and logarithms without _ or ^ modifiers.
Symbol
Command
∑
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
\textstyle \log n^2
logn2
\log n^2
ln
e
\textstyle \ln e
lne
\ln e
模(Mods)
Symbol
Command
9
≡
3
m
o
d
6
9\equiv 3 \bmod{6}
9≡3mod6
9\equiv 3 \bmod{6}
9
≡
3
(
m
o
d
6
)
9\equiv 3 \pmod{6}
9≡3(mod6)
9\equiv 3 \pmod{6}
9
≡
3
m
o
d
6
9\equiv 3 \mod{6}
9≡3mod6
9\equiv 3 \mod{6}
9
≡
3
(
6
)
9\equiv 3\pod{6}
9≡3(6)
9\equiv 3 \pod{6}
组合(Combinations)
Symbol
Command
(
1
1
)
\scriptstyle\binom{1}{1}
(11)
\binom{1}{1}
(
n
−
1
r
−
1
)
\scriptstyle\binom{n-1}{r-1}
(r−1n−1)
\binom{n-1}{r-1}
These often look better in display mode:
Symbol
Command
(
9
3
)
\dbinom{9}{3}
(39)
\dbinom{9}{3}
(
n
−
1
r
−
1
)
\dbinom{n-1}{r-1}
(r−1n−1)
\dbinom{n-1}{r-1}
三角函数(Trigonometric Functions)
Most of these are just the abbreviation of the trigonometric function with simply a backslash added before the abbreviation.
Symbol
Command
Symbol
Command
Symbol
Command
cos
\textstyle \cos
cos
\cos
sin
\textstyle \sin
sin
\sin
tan
\textstyle \tan
tan
\tan
sec
\sec
sec
\sec
csc
\textstyle \textstyle \csc
csc
\csc
cot
\textstyle \cot
cot
\cot
arccos
\textstyle \arccos
arccos
\arccos
arcsin
\textstyle \arcsin
arcsin
\arcsin
arctan
\textstyle \arctan
arctan
\arctan
cosh
\textstyle \cosh
cosh
\cosh
sinh
\textstyle \sinh
sinh
\sinh
tanh
\textstyle \tanh
tanh
\tanh
coth
\textstyle \coth
coth
\coth
Here are a couple examples:
Symbol
Command
cos
2
x
+
sin
2
x
=
1
\textstyle \cos^2 x +\sin^2 x = 1
cos2x+sin2x=1
\cos^2 x +\sin^2 x = 1
cos
9
0
∘
=
0
\cos 90^\circ = 0
cos90∘=0
\cos 90^\circ = 0
微分积分(Calculus)
Below are examples of calculus expressions rendered in LaTeX. Most of these commands have been introduced before. Notice how definite integrals are rendered (and the difference between inline math and display mode for definite integrals). The , in the integrals makes a small space before the dx.
Symbol
Command
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^5_1 2x\,dx = 24
∫152xdx=24
\int^5_1 2x,dx = 24
∂
2
U
∂
x
2
+
∂
2
U
∂
y
2
\frac{\partial^2U}{\partial x^2} + \frac{\partial^2U}{\partial y^2}
∂x2∂2U+∂y2∂2U
Some of these commands take subscripts in the same way sums, products, and logarithms do. Some render differently in display mode and inline math mode.
Symbol
Command
Symbol
Command
Symbol
Command
dim
x
\dim_x
dimx
\dim_x
gcd
x
\textstyle\gcd_x
gcdx
\gcd_x
inf
x
\inf_x
infx
\inf_x
lim inf
x
\liminf_x
liminfx
\liminf_x
lim sup
x
\limsup_x
limsupx
\limsup_x
max
x
\textstyle\max_x
maxx
\max_x
min
x
\textstyle\min_x
minx
\min_x
Pr
x
\Pr_x
Prx
\Pr_x
sup
x
\sup_x
supx
\sup_x
矩阵(Matrices and Arrays)
We can typeset a matrix with the matrix, bmatrix, pmatrix, or vmatrix environments. The letters b, p, and v refer to the delimiters around the matrix (brackets, parentheses, and vertical bars, respectively). For example, the following code