LaTeX Syntax Reference
The LaTeX you need for everyday math and papers, one topic per page. Each card shows the key command and what it draws; open a page for variants, copyable examples, common mistakes and how Overleaf, MathJax and Word differ.
Symbols
Relations, operators, sets, logic, arrows, Greek letters and accents: the command for each symbol and its variants.
- Greater Than or Equal to in LaTeX
x \geq yGreater than or equal to (\geq), less than or equal to (\leq), plain < and >, much less than, slanted and negated forms. - How to Write an Arrow in LaTeX
\rightarrowRight, left, double, long, maps-to and labeled arrows (\to, \Rightarrow, \xrightarrow), plus arrows in text mode. - LaTeX Symbols
\leqThe most-used math symbols in one table: relations, operators, sets, logic, arrows, Greek letters and accents, each with its command. - Plus Minus Sign in LaTeX
\pmThe ± sign with \pm, the minus-plus ∓ with \mp, ± in running text, and uncertainties such as 5.0 ± 0.1. - Infinity in LaTeX
\inftyThe ∞ symbol with \infty: negative infinity, intervals, limits to infinity, infinite sums and integrals. - Union in LaTeX
\cupThe ∪ symbol with \cup, indexed unions with \bigcup_{i=1}^{n}, and disjoint unions (\sqcup, \uplus). - Degree Symbol in LaTeX
90^\circThe ° sign four ways: ^\circ in math, \textdegree in text, \degree (gensymb) and siunitx for angles and °C. - Not Equal in LaTeX
\neqThe ≠ sign with \neq or \ne, and other negated relations: not equivalent, not an element of, not a subset. - Empty Set in LaTeX
\emptysetThe empty set with \emptyset or the rounder \varnothing (amssymb), plus \{\} and common set statements. - How to Write Percent in LaTeX
\%Why % hides the rest of the line, how to print it with \%, and how to format percentages with siunitx. - Intersection in LaTeX
\capThe ∩ symbol with \cap, indexed intersections with \bigcap, and how to size and space them. - Proportional Symbol in LaTeX
\proptoThe ∝ sign with \propto, the thinner \varpropto, "approximately proportional", and when authors use \sim instead. - Greek Letters in LaTeX
\alphaEvery lowercase and uppercase Greek letter with its command, the var- forms, and bold or upright Greek. - And Symbol and Logic Symbols in LaTeX
\landLogical and (\land), or, not, implies, iff, for all and there exists, and how to print a literal & instead. - Tilde (~) in LaTeX
Fig.~1Why ~ prints a space, how to get a visible tilde in text, the \tilde and \widetilde accents, and \sim in math. - Real Number Symbol in LaTeX
\mathbb{R}Blackboard bold number sets with \mathbb: ℝ, ℕ, ℤ, ℚ, ℂ, ℝⁿ, and why \R does not work out of the box. - Multiplication Symbol in LaTeX
a \times b\times, \cdot, \ast and \div, when each is used, and how to write scientific notation and products. - Approximately Equal in LaTeX
\approx\approx for ≈, plus \sim, \simeq, \cong and \equiv, with what each symbol means. - Dot Product in LaTeX
\mathbf{u} \cdot \mathbf{v}\cdot between vectors, bold or arrow notation, ⟨u, v⟩ with \langle and \rangle, and the usual dot product formulas. - Subset in LaTeX
A \subset B\subset, \subseteq, \subsetneq, the superset forms and the negated "not a subset" symbols. - Dot in LaTeX
a \cdot b\cdot, \ldots, \cdots, \vdots, \ddots, \dot{x} and \bullet, and which dot fits which context. - Hat in LaTeX
\hat{x}\hat and \widehat accents, hats with subscripts, dotless i and j, and how to print the ^ character itself. - Element of Symbol (∈) in LaTeX
x \in A\in for ∈, \notin for ∉, \ni for ∋, and how ∈ differs from the Greek letter epsilon. - Gradient in LaTeX
\nablaThe nabla symbol \nabla for gradient, divergence and curl, the Laplacian, the gradient as a vector of partials, and grad as an operator name. - Transpose Symbol in LaTeX
A^TA^T, A^\top, A^\intercal and A^\mathsf{T} compared, plus inverse transpose and conjugate transpose. - Indicator Function in LaTeX
\mathbb{1}_{A}The double-struck 1: why \mathbb{1} breaks in pdfLaTeX, \mathds{1} and \mathbbm{1} as fixes, and notation that also works on the web. - Cross Product in LaTeX
\mathbf{a} \times \mathbf{b}\times between vectors, the i, j, k determinant with vmatrix, dotless-i unit vectors and the magnitude formula.
Math structures and environments
Fractions, scripts, roots, sums, integrals, matrices, cases and aligned equations: how to build the formula around the symbols.
- Matrix in LaTeX
\begin{matrix} a & b \\ c & d \end{matrix}pmatrix, bmatrix, vmatrix and friends: rows with \\, columns with &, plus 2x2, 3x3, augmented and n×n examples. - How to Make a LaTeX Table
\begin{tabular}{l c r} … \end{tabular}The tabular environment: column alignment, borders, merged cells, booktabs rules, captions, plus array for tables inside math. - How to Write a Fraction in LaTeX
\frac{a}{b}\frac{numerator}{denominator}, \dfrac and \tfrac for size, continued fractions with \cfrac, slanted fractions and the a/b form. - How to Write a Subscript in LaTeX
x_1_ for subscripts and ^ for superscripts, braces for more than one character, text indices, both at once and scripts in text mode. - Piecewise Function in LaTeX
\begin{cases} a & \text{if } x > 0 \\ b & \text{otherwise} \end{cases}The cases environment: one line per piece, & before each condition, \text for words, dcases and rcases variants. - How to Write a Multiline Equation in LaTeX
\begin{align} a &= b \\ c &= d \end{align}align and align* for aligned lines, aligned inside $$ … $$, split, gather and multline for long formulas and systems of equations. - Integral in LaTeX
\int f(x) \, dx\int with lower and upper limits, \iint and \iiint, contour integrals, evaluation bars and the thin space before dx. - Absolute Value in LaTeX
|x||x|, \lvert x \rvert, bars that stretch with \left| \right|, double bars for norms, and an \abs macro with mathtools. - Summation in LaTeX
\sum_{i=1}^{n} a_i\sum with limits, why inline sums put the limits beside the sigma, \limits and \displaystyle, and multi-line conditions with \substack. - Partial Derivative in LaTeX
\partialThe ∂ symbol (\partial) inside \frac for first, second and mixed partials, subscript notation, evaluation bars and shortcut macros. - Vector in LaTeX
\vec{v}\vec{v} and \overrightarrow{AB}, bold vectors with \mathbf and \boldsymbol, unit vectors, column and row vectors, and norms. - Limit in LaTeX
\lim_{x \to a} f(x)\lim_{x \to a}, one-sided limits, limits at infinity, limsup and liminf, and how to keep the condition under lim in running text. - Floor Function in LaTeX
\lfloor x \rfloor\lfloor x \rfloor and \lceil x \rceil, stretching them with \left and \right, and \floor / \ceil macros with mathtools. - Square Root in LaTeX
\sqrt{x}\sqrt{x} for square roots, \sqrt[n]{x} for cube and nth roots, nested radicals, and \vphantom to even out root heights. - Derivative in LaTeX
\frac{dy}{dx}dy/dx with \frac, f'(x) and f''(x), nth derivatives, \dot and \ddot for time derivatives, and what to do about \dv. - Binomial Coefficients (Choose) in LaTeX
\binom{n}{k}\binom{n}{k} for n choose k, the older {n \choose k}, \dbinom and \tbinom sizes, and multinomial and combination notation.
Text and formatting
Bold, italics, underline, lists, links and math mode: the commands for the text around your equations.
- Bullet Points in LaTeX
\begin{itemize} \item First \item Second \end{itemize}itemize for bullet points, enumerate for numbered lists, description for terms, plus nesting, custom bullets and spacing. - How to Bold in LaTeX
\textbf{bold text}\textbf for bold text, \mathbf for upright bold math, \boldsymbol or \bm for bold italic and Greek symbols. - LaTeX Underline: Text and Math
\underline{text}\underline for short text and formulas, ulem's \uline and soul's \ul for text that breaks across lines, plus double and wavy lines. - Italics in LaTeX
\textit{italic text}\textit and \emph for italic text, \itshape for longer passages, and upright vs italic letters in math mode. - How to Add a Hyperlink in LaTeX
\href{https://example.com}{link text}hyperref's \href for linked text, \url for printed addresses, internal links to sections and figures, and link colors. - Math Mode in LaTeX
\( a^2 + b^2 \)Inline math with $…$ or \(…\), displayed math with \[…\], numbered equation environments, references and \text inside formulas.
Write it, or convert it from a picture
Test any command in the free equation editor, or paste a screenshot of a formula and get its LaTeX.