Markdown guide · Code, tables, diagrams & math
Writing LaTeX math
The LaTeX commands for fractions, powers, roots, symbols and more.
Commands start with a backslash, and curly braces {} group what a command applies to. Spaces don't matter; LaTeX does the spacing for you.
Powers, indexes, fractions and roots
$x^2$, $x^{10}$, $a_i$, $a_{i+1}$, $\frac{1}{2}$, $\sqrt{x}$, $\sqrt[3]{x}$, , , , , ,
Use braces when more than one character goes up, down or inside: x^{10}, not x^10.
Sums, integrals and limits
$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2} \qquad \int_0^1 x^2\,dx \qquad \lim_{x \to 0} \frac{\sin x}{x}
$$Greek letters
$\alpha, \beta, \gamma, \delta, \theta, \lambda, \mu, \pi, \sigma, \phi, \omega, \Delta, \Sigma, \Omega$
Lowercase names give lowercase letters; a capital first letter gives the capital: \delta and \Delta.
Operators and relations
\times×,\div÷,\pm±,\cdot·\leq≤,\geq≥,\neq≠,\approx≈\in∈,\subset⊂,\cup∪,\cap∩\to→,\Rightarrow⇒,\Leftrightarrow⇔\infty∞,\partial∂,\nabla∇\forall∀,\exists∃,\neg¬
Brackets that grow
$\left( \frac{a}{b} \right)^2$ and $\left| x \right|$and
\left( and \right) size the brackets to what's inside. Plain ( and ) stay text-sized.
Matrices and cases
$$
A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}
$$$$
|x| = \begin{cases} x & \text{if } x \ge 0 \\ -x & \text{otherwise} \end{cases}
$$& separates columns and \\ starts a new row. Use bmatrix for square brackets and vmatrix for a determinant.
Text, fonts and accents
$\text{speed} = \frac{d}{t}$, $\mathbb{R}$, $\mathbf{v}$, $\hat{x}$, $\vec{F}$, $\overline{AB}$, , , , ,
Prosedown shows your document styled as you type, with the Markdown one click away. This guide is built in: press F1.