LaTeX Cheat Sheet
Basic Syntax
- Inline:
→ Example:
- Display:
or
equation
environment
Common Symbols
| Write… | In LaTeX |
| Greek letters (lowercase) | \alpha,
\beta, ...,
\omega |
| Greek letters (uppercase) | \Gamma,
\Delta,
\Omega, etc. |
| Subscripts | x_i |
| Superscripts | x^2 |
| Fractions | \frac{a}{b} |
| Square root | \sqrt{x},
\sqrt[n]{x} |
| Infinity | \infty |
| Approximately equal | \approx |
| Not equal | \neq |
| Less/Greater than equal | \leq,
\geq |
| Plus-minus | \pm |
| Degree | ^\circ |
| Dots | \ldots,
\cdots,
\vdots,
\ddots |
| Vector arrow | \vec{v} |
| Hat | \hat{x} |
| Bar | \bar{x} |
| Tilde | \tilde{x} |
Functions
\sin, \cos, \tan, \log, \ln, \exp, \min, \max, \lim, \sup, \inf
Piecewise Functions
f(x) = \begin{cases}
x^2 & \text{if } x \geq 0 \\
-x & \text{otherwise}
\end{cases}
Summation
\sum_{i=1}^{n} i^2
Integrals
\int f(x)\,dx
\int_{a}^{b} x^2\,dx
\iint, \iiint, \oint
Matrices
\begin{bmatrix}
a & b \\
c & d
\end{bmatrix}
Other styles:
pmatrix,
vmatrix,
Vmatrix
Cases and Conditions
\begin{cases}
1 & \text{if } x > 0 \\
0 & \text{otherwise}
\end{cases}
Arrows and Relations
| Write… | In LaTeX |
| Right arrow | \rightarrow |
| Left arrow | \leftarrow |
| Double arrow | \Rightarrow,
\Leftarrow |
| Bidirectional arrow | \leftrightarrow,
\Leftrightarrow |
| Maps to | \mapsto |
| Proportional to | \propto |
| Element of | \in |
| Not in | \notin |
| Subset | \subset,
\subseteq |
| Union / Intersection | \cup,
\cap |
Brackets and Delimiters
\left( \frac{a}{b} \right)
\left[ \cdots \right], \left\{ \cdots \right\}
\left| x \right|
Limits and Derivatives
\lim_{x \to 0} \frac{\sin x}{x}
\frac{dy}{dx}, \frac{d^2y}{dx^2}
\frac{\partial f}{\partial x}
Logic Symbols
| Write… | In LaTeX |
| For all | \forall |
| There exists | \exists |
| Not | \neg |
| And | \land |
| Or | \lor |
| Implies | \Rightarrow |
| If and only if | \Leftrightarrow |
Alignment and Equations
\begin{align}
a &= b + c \\
x &= y + z
\end{align}
Sets
\{ x \in \mathbb{R} \mid x > 0 \}
\in, \notin, \subset, \subseteq, \cup, \cap, \setminus
\mathbb{R}, \mathbb{N}, \mathbb{Z}, \mathbb{Q}, \mathbb{C}
Misc Tips
\,,
\;,
\!
for spacing in math mode
\text{}
for inserting regular text in math mode
x = 0 \text{ if } y > 2