After more than half a year, I picked up LaTeX again to write algorithm homework and found that I had forgotten a ridiculous number of symbols. So I wrote this tutorial to record common LaTeX mathematical symbols and environments for future reference.
LaTeX Tutorial 1. Basic Syntax 1.1 Document Structure 1 2 3 4 5 6 7 \documentclass {article} \usepackage {amsmath} \usepackage {amssymb} \begin {document}\end {document}
1.2 Text Formatting 1 2 3 4 \textbf {bold text} \textit {italic text} \underline {underline} \texttt {monospace text}
2. Math Mode 1 2 3 4 Inline formula: $ E = mc^ 2$ Display formula: $ $ E = mc^ 2$ $ Or: \[ E = mc^ 2 \]
2.2 equation Environment 1 2 3 4 5 6 7 8 \begin {equation} E = mc^ 2 \end {equation}\begin {equation*} E = mc^ 2 \end {equation*}
3. Common Mathematical Symbols 3.1 Greek Letters Lowercase letters:
1 2 3 4 5 6 7 8 \alpha α \beta β \gamma γ\delta δ \epsilon ε \zeta ζ\eta η \theta θ \iota ι\kappa κ \lambda λ \mu μ\nu ν \xi ξ \pi π\rho ρ \sigma σ \tau τ\upsilon υ \phi φ \chi χ\psi ψ \omega ω
Uppercase letters:
1 2 3 4 \Gamma Γ \Delta Δ \Theta Θ\Lambda Λ \Xi Ξ \Pi Π\Sigma Σ \Upsilon Υ \Phi Φ\Psi Ψ \Omega Ω
3.2 Operators Basic operations:
1 2 3 + plus - minus \times × \div ÷ \pm ± \mp ∓\cdot · \ast * \star ⋆
Relational operators:
1 2 3 4 5 6 = = \neq ≠ < < > > \leq ≤ \geq ≥ \ll ≪ \gg ≫ \approx ≈\equiv ≡ \sim ∼ \simeq ≃\propto ∝ \in ∈ \notin ∉\subset ⊂ \subseteq ⊆ \supset ⊃
Logical symbols:
1 2 3 \land ∧ \lor ∨ \neg ¬\implies ⟹ \iff ⟺ \forall ∀\exists ∃ \nexists ∄ \emptyset ∅
3.3 Superscripts and Subscripts 1 2 3 4 5 x^ 2 x_ i x^ {2y} x_ {ij} x_ i^ 2
3.4 Fractions and Roots 1 2 3 4 5 \frac {a}{b} \dfrac {a}{b} \tfrac {a}{b} \sqrt {x} \sqrt [n]{x}
3.5 Summation, Integrals, and Limits 1 2 3 4 5 6 7 \sum _ {i=1}^ {n} \prod _ {i=1}^ {n} \int _ {a}^ {b} \iint \iiint \oint \lim _ {x \to \infty }
3.6 Brackets 1 2 3 4 5 6 () [] \{ \} \langle \rangle \lfloor \rfloor \lceil \rceil
Automatic sizing:
1 2 3 \left ( \frac {a}{b} \right )\left [ \frac {a}{b} \right ]\left \{ \frac {a}{b} \right \}
4. Matrices 4.1 Basic Matrices 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 \begin {matrix} a & b \\ c & d \end {matrix}\begin {pmatrix} a & b \\ c & d \end {pmatrix}\begin {bmatrix} a & b \\ c & d \end {bmatrix}\begin {Bmatrix} a & b \\ c & d \end {Bmatrix}\begin {vmatrix} a & b \\ c & d \end {vmatrix}\begin {Vmatrix} a & b \\ c & d \end {Vmatrix}
4.2 Ellipses 1 2 3 4 \dots \cdots \vdots \ddots
5.1 align Environment 1 2 3 4 5 \begin {align} x & = a + b \\ y & = c + d \\ z & = e + f \end {align}
5.2 cases Environment 1 2 3 4 f(x) = \begin {cases} x^ 2 & \text {if } x \geq 0 \\ -x & \text {if } x < 0 \end {cases}
5.3 split Environment 1 2 3 4 5 6 \begin {equation}\begin {split} f(x) & = (x+1)^ 2 \\ & = x^ 2 + 2x + 1 \end {split}\end {equation}
6. Special Symbols 6.1 Arrows 1 2 3 4 5 6 7 \rightarrow → \leftarrow ←\Rightarrow ⇒ \Leftarrow ⇐\leftrightarrow ↔ \Leftrightarrow ⇔\uparrow ↑ \downarrow ↓\Uparrow ⇑ \Downarrow ⇓\mapsto ↦ \longmapsto ⟼\longrightarrow ⟶ \Longrightarrow ⟹
6.2 Other Common Symbols 1 2 3 4 5 6 7 8 \infty ∞ \partial ∂\nabla ∇ \hbar ℏ\prime ′ \ldots …\cdots ⋯ \vdots ⋮\ddots ⋱ \angle ∠\degree ° \circ ∘\bullet • \cap ∩\cup ∪ \triangle △
6.3 Fonts 1 2 3 4 5 6 7 8 \mathbb {R} \mathcal {A} \mathfrak {A} \mathbf {A} \mathrm {A} \mathit {A} \mathsf {A} \mathtt {A}
7. Spacing Control 1 2 3 4 5 6 7 a\ b a\, b a\: b a\; b a\quad b a\qquad b a\! b
1 2 \text {text content} \mbox {text content}
9. Accents 1 2 3 4 \hat {a} â \bar {a} ā\tilde {a} ã \dot {a} ȧ\ddot {a} ä \vec {a} ā⃗\widehat {ab} \widetilde {ab}
10. Common Theorem Environments 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \usepackage {amsthm}\newtheorem {theorem}{Theorem}\newtheorem {lemma}{Lemma}\newtheorem {proposition}{Proposition}\newtheorem {corollary}{Corollary}\newtheorem {definition}{Definition}\begin {theorem} Theorem content \end {theorem}\begin {proof} Proof content \end {proof}
11. Common Tips 11.1 Alignment 1 2 3 4 \begin {aligned} & \text {left aligned} \\ & \text {content} \end {aligned}
11.2 Numbering Control 1 2 3 \tag {1} \notag \nonumber
11.3 Colors 1 2 3 \usepackage {xcolor}\textcolor {red}{red text}\colorbox {yellow}{yellow background}
12. Best Practices
Matching brackets : use \left and \right to automatically adjust bracket size.
Long formulas : use align or split to break lines.
Matrices : choose an appropriate bracket type.
Spacing : use \,, \quad, and similar commands to adjust spacing.
Text : use \text{} to insert text in formulas.
Symbols : define macros for complex symbols to simplify input.
1 2 3 \newcommand {\R }{\mathbb {R}}\newcommand {\norm }[1]{\left \| #1 \right \| }
References