StudyPilot LaTeX Guide

Start here

Wrap your math in dollar signs

This is the one rule to remember. Use one dollar sign on each side for math inside a sentence, or two on each side for a centered equation.

Inline math

Best for a symbol or short expression inside a sentence.

$x^2 + y^2 = z^2$
$x^2 + y^2 = z^2$

Display math

Best for an important equation on its own line.

$$\frac{a}{b} = c$$
$$\frac{a}{b} = c$$
Beginner

Build everyday expressions

Copy an example and replace the letters or numbers with your own.

Fraction
$\frac{a}{b}$
$\frac{a}{b}$
Powers and subscripts
$x^2 + a_{10}$
$x^2 + a_{10}$
Roots
$\sqrt{x+1} + \sqrt[3]{8}$
$\sqrt{x+1} + \sqrt[3]{8}$
Symbols and relations
$a \times b,\ x \le y,\ p \neq q$
$a \times b,\ x \le y,\ p \neq q$
Intermediate

Greek letters, sums, and calculus

Use a backslash before a command name. Uppercase Greek letters usually start with a capital letter, such as \Delta.

Greek letters
$\alpha, \beta, \theta, \pi, \Delta$
$\alpha, \beta, \theta, \pi, \Delta$
Summation
$$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$$
$$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$$
Definite integral
$$\int_a^b f(x)\,dx$$
$$\int_a^b f(x)\,dx$$
Limit and derivative
$$f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}$$
$$f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}$$
Advanced

Lay out complex math clearly

These examples combine commands. Keep the full expression inside double dollar signs.

Aligned equations
$$\begin{aligned} 2x+3&=11 \\ 2x&=8 \\ x&=4 \end{aligned}$$
$$\begin{aligned} 2x+3&=11 \\ 2x&=8 \\ x&=4 \end{aligned}$$
Matrix
$$A=\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$$
$$A=\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$$
Piecewise function
$$f(x)=\begin{cases} x^2 & x\ge0 \\ -x & x<0 \end{cases}$$
$$f(x)=\begin{cases} x^2 & x\ge0 \\ -x & x<0 \end{cases}$$
Sets and logic
$$A\cap B=\{x\in A\mid x\in B\},\quad \forall x\in\mathbb{R}$$
$$A\cap B=\{x\in A\mid x\in B\},\quad \forall x\in\mathbb{R}$$
Vectors and notation
$$\vec{v}=\langle v_1,v_2\rangle,\quad \hat{x},\ \bar{x},\ \overline{AB}$$
$$\vec{v}=\langle v_1,v_2\rangle,\quad \hat{x},\ \bar{x},\ \overline{AB}$$
Cheat sheet

Useful commands at a glance

A quick reference for the symbols you are most likely to need.

UseTypeResult
Arrows\to, \Rightarrow, \leftrightarrow$\to, \Rightarrow, \leftrightarrow$
Comparisons\le, \ge, \neq, \approx$\le, \ge, \neq, \approx$
Operations\cdot, \times, \div, \pm$\cdot, \times, \div, \pm$
Sets\in, \notin, \subset, \cup, \cap$\in, \notin, \subset, \cup, \cap$
Spacinga\,b \quad a\qquad b$a\,b \quad a\qquad b$
Text in mathx=2\text{ when }y=4$x=2\text{ when }y=4$
Automatic brackets\left(\frac{x}{y}\right)$\left(\frac{x}{y}\right)$