Latex Cheat Sheet
Inline math uses $...$
Display math uses:
$$
...
$$
Variables
| Output | LaTeX |
|---|
| x | x |
| x1 | x_1 |
| xlong | x_{long} |
| x2 | x^2 |
| x10 | x^{10} |
| xi2 | x_i^2 |
Fractions
| Output | LaTeX |
|---|
| ba | \frac{a}{b} |
| ba | \dfrac{a}{b} |
Square Roots
| Output | LaTeX |
|---|
| x | \sqrt{x} |
| nx | \sqrt[n]{x} |
Parentheses
Automatically sized delimiters:
| Output | LaTeX |
|---|
| (x) | \left(x\right) |
| [ba] | \left[\frac{a}{b}\right] |
| \left{x\right} | \left\{x\right\} |
| x\right | x\right |
Greek Letters
| Output | LaTeX |
|---|
| α | \alpha |
| β | \beta |
| γ | \gamma |
| δ | \delta |
| ϵ | \epsilon |
| θ | \theta |
| λ | \lambda |
| μ | \mu |
| π | \pi |
| ρ | \rho |
| σ | \sigma |
| τ | \tau |
| ϕ | \phi |
| ω | \omega |
| Γ | \Gamma |
| Δ | \Delta |
| Θ | \Theta |
| Λ | \Lambda |
| Π | \Pi |
| Σ | \Sigma |
| Φ | \Phi |
| Ω | \Omega |
Arithmetic
| Output | LaTeX |
|---|
| a+b | a+b |
| a−b | a-b |
| a⋅b | a\cdot b |
| a×b | a\times b |
| ba | \frac{a}{b} |
Comparison
| Output | LaTeX |
|---|
| = | = |
| = | \neq |
| < | < |
| > | > |
| ≤ | \le |
| ≥ | \ge |
| ≈ | \approx |
| ≡ | \equiv |
| ∝ | \propto |
Logic
| Output | LaTeX |
|---|
| ∧ | \land |
| ∨ | \lor |
| ¬ | \neg |
| ∀ | \forall |
| ∃ | \exists |
| ∴ | \therefore |
| ∵ | \because |
| ⟹ | \implies |
| ⟺ | \iff |
Sets
| Output | LaTeX |
|---|
| ∈ | \in |
| ∈/ | \notin |
| ⊂ | \subset |
| ⊆ | \subseteq |
| ⊇ | \supseteq |
| ∪ | \cup |
| ∩ | \cap |
| ∅ | \emptyset |
| N | \mathbb{N} |
| Z | \mathbb{Z} |
| Q | \mathbb{Q} |
| R | \mathbb{R} |
| C | \mathbb{C} |
Calculus
| Output | LaTeX |
|---|
| limx→0 | \lim_{x\to0} |
| ∑i=0n | \sum_{i=0}^{n} |
| ∏i=1n | \prod_{i=1}^{n} |
| ∫ab | \int_a^b |
| ∮ | \oint |
| ∂ | \partial |
| ∇ | \nabla |
| ∞ | \infty |
Derivatives
| Output | LaTeX |
|---|
| dxdy | \frac{dy}{dx} |
| ∂x∂f | \frac{\partial f}{\partial x} |
| x˙ | \dot{x} |
| x¨ | \ddot{x} |
Vectors
| Output | LaTeX |
|---|
| v | \vec{v} |
| AB | \overrightarrow{AB} |
| v | \mathbf{v} |
| x^ | \hat{x} |
| xˉ | \bar{x} |
Matrices
$$
\begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix}
$$
Produces
[12 34]
Other environments:
pmatrix → ()
bmatrix → []
Bmatrix → {}
vmatrix → |
Vmatrix → ||
Cases
$$
f(x)=
\begin{cases}
x^2 & x>0\\
0 & x=0\\
-x & x<0
\end{cases}
$$
f(x)=⎩⎨⎧x20−xx>0x=0x<0
Alignment
$$
\begin{aligned}
a+b &= c\\
x+y &= z
\end{aligned}
$$
a+bx+y=c=z
Decorations
| Output | LaTeX |
|---|
| AB | \overline{AB} |
| x | \underline{x} |
| ABC | \widehat{ABC} |
| f | \widetilde{f} |
| x* | \cancel{x} |
*Requires the cancel package (not available in all renderers).
Common Functions
| Output | LaTeX |
|---|
| sin | \sin |
| cos | \cos |
| tan | \tan |
| log | \log |
| ln | \ln |
| exp | \exp |
| max | \max |
| min | \min |
Spacing
| Output | LaTeX |
|---|
| a,b | a\,b |
| a;b | a\;b |
| ab | a\quad b |
| ab | a\qquad b |
Text Inside Math
\text{Speed}
Example:
v=10 m/s
Useful Symbols
| Output | LaTeX |
|---|
| → | \rightarrow |
| ⇒ | \Rightarrow |
| ← | \leftarrow |
| ↔ | \leftrightarrow |
| ↦ | \mapsto |
| ∘ | \circ |
| ∙ | \bullet |
| ∠ | \angle |
| ⊥ | \perp |
| ∥ | \parallel |
| °* | ^\circ |
Most Used Commands
^ Superscript
_ Subscript
\frac{}{}
\sqrt{}
\sum
\prod
\int
\lim
\partial
\nabla
\vec{}
\mathbf{}
\mathbb{}
\left ... \right
\begin{cases}
\begin{aligned}
\begin{bmatrix}
Inline math uses $...$
Display math uses:
$$
...
$$