LaTeX syntax for maths, physics and chemistry
Quick reference guide for common LaTeX notations. Click on any syntax block to copy it instantly to your clipboard!
43 copy-and-paste snippets, each one rendered so you can see what it produces.
Basics
A formula sitting inside a line of text.
A formula on its own centred line.
Upper index. Wrap in braces when it is more than one character.
Lower index, for sequences and matrix entries.
Use \dfrac to keep an inline fraction full size.
The radical stretches to fit what is inside it.
The degree goes in square brackets.
\left and \right always pair up, even when one side is a dot.
Without \text each letter is treated as a variable and set in italics.
Calculus and operators
\, is the thin space before dx; without it the d runs into the formula.
Limits sit above and below in display, beside it inline.
Limits work exactly as they do for a sum.
Use \to rather than typing ->.
\partial is ∂, which is not a plain letter d.
Primes for derivatives; \dot and \ddot for time derivatives.
\iiint for triple, \oint for a closed contour.
Usually a limit: \int_{0}^{\infty}.
Greek letters and symbols
The letter’s English name, with a backslash in front.
Capitalise the first letter. Ones identical to Latin have no command.
\neq is ≠; \equiv is ≡, used for congruence.
\implies and \iff are the long arrows for implication and equivalence.
\mathbb{R} for the reals, \varnothing for the empty set.
Capitalise for a double arrow: \Rightarrow differs from \rightarrow.
^\circ is the degree sign; do not use a raised letter o.
\overrightarrow{AB} for a vector named by its endpoints.
Matrices and alignment
& separates columns, \\ starts a new row.
Change the leading letter for the bracket style: p, b, v, V, B.
Vertical bars. \begin{Vmatrix} gives double bars.
Put & immediately before the = so the lines line up.
The brace sizes itself to the number of rows.
The n-choose-k notation.
Chemistry
Subscripts happen automatically; no _ for each number.
-> for one direction, <=> for an equilibrium.
The charge follows ^, number before sign.
Conditions go in square brackets right after the arrow.
v is the down arrow (precipitate), ^ the up arrow (gas).
Mass number above, atomic number below, before the symbol.
Physics and units
v_0 is initial velocity — the index is a zero, not a letter o.
A product needs no times sign; the spacing is automatic.
Capital \Delta for a change; \nu is a nu, not a v.
\mathrm keeps units upright. {,} stops a decimal comma being read as a separator.
\times for a cross, \cdot for a centred dot.
With an arrow it is a vector; without, a magnitude.