Note: Use
$...$for inline math and$$...$$or\[...\]for display math.
x = a + b
Result:
x^2 + y^2 = z^2
Result:
x_1 + x_2 = x_{total}
Result:
\frac{a}{b} = \frac{c}{d}
Result:
\begin{align}
x &= a + b \\
y &= c + d \\
z &= e + f
\end{align}
& is used to mark align points.
For the equations below & is before =, so alignment is done at the = sign See the result below:
Result: $\begin{align}x &= a + b \y &= c + d \z &= e + f\end{align}$
\begin{gather}
x = a + b \\
y = c + d
\end{gather}
Result: $\begin{gather}x = a + b \y = c + d\end{gather}$
\frac{numerator}{denominator}
Result:
\sqrt{x}
Result:
\sqrt[n]{x}
Result:
\frac{x^2 + 1}{x - 1}
Result:
\begin{matrix}
a & b \\
c & d
\end{matrix}
Result: $\begin{matrix}a & b \ c & d \end{matrix}$
\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}
Result: $\begin{pmatrix}a & b \c & d\end{pmatrix}$
\begin{bmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{bmatrix}
Result: $\begin{bmatrix}1 & 2 & 3 \4 & 5 & 6 \7 & 8 & 9\end{bmatrix}$
\begin{vmatrix}
a & b \\
c & d
\end{vmatrix}
Result: $\begin{vmatrix}a & b \c & d\end{vmatrix}$
Arrow vector:
\vec{v}
Result:
Vector from A to B:
\overrightarrow{AB}
Result:
Bold vector:
\mathbf{v}
Result:
Unit vector:
\hat{i}
Result:
Column vector:
\vec{v} = \begin{pmatrix} x \\ y \\ z \end{pmatrix}
Dot product:
\vec{a} \cdot \vec{b} = |\vec{a}||\vec{b}|\cos\theta
Basic summation:
\sum_{i=1}^{n} x_i
Result:
Infinite series:
\sum_{i=1}^{\infty} \frac{1}{i^2}
Result:
Product notation:
\prod_{i=1}^{n} x_i
Result:
\lim_{x \to 0} f(x)
Result:
\lim_{x \to \infty} \frac{1}{x} = 0
Result:
\lim_{h \to 0} \frac{f(x+h) - f(x)}{h}
Result:
\int f(x) \, dx
Result:
\int_{a}^{b} f(x) \, dx
Result:
\iint_{D} f(x,y) \, dx \, dy
Result:
\oint_{C} \vec{F} \cdot d\vec{r}
Result:
\frac{d}{dx} f(x)
Result:
\frac{df}{dx}
Result:
f'(x)
Result:
\frac{\partial f}{\partial x}
Result:
\frac{d^2y}{dx^2}
Result:
\alpha, \beta, \gamma, \delta, \epsilon, \theta, \lambda, \mu, \pi, \sigma, \phi, \omega
Result:
\Delta, \Gamma, \Lambda, \Sigma, \Phi, \Omega
Result:
\infty, \pm, \mp
Result:
\leq, \geq, \neq, <, >
Result:
\in, \notin, \subset, \supset, \subseteq, \supseteq
Result:
\cup, \cap, \emptyset, \setminus
Result:
\land, \lor, \neg, \implies, \iff
Result:
\sin x, \cos x, \tan x, \sec x, \csc x, \cot x
Result:
\arcsin x, \arccos x, \arctan x
Result:
\log x, \ln x, \log_a x
Result:
e^x, a^b, \exp(x)
Result:
\sinh x, \cosh x, \tanh x
Result:
a \, b \quad c \qquad d
Result:
\text{This is text in math mode}
Result:
\mathbb{R}, \mathcal{F}, \mathbf{x}, \mathrm{d}x
Result:
\overline{x}, \underline{y}, \hat{z}, \tilde{a}
Result:
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
Result:
e^{i\theta} = \cos\theta + i\sin\theta
Result:
\int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi}
Result:
\mathbf{A}\mathbf{x} = \mathbf{b}
Result:
\begin{cases}
x + y = 1 \\
2x - y = 0
\end{cases}
Result: $\begin{cases}x + y = 1 \2x - y = 0\end{cases}$
- Build complex expressions gradually - Start with simple parts and combine them
- Use proper spacing -
\,for thin space,\quadfor medium,\qquadfor large - Align equations properly - Use
&inalignenvironment for clean alignment - Use
\text{}for words - Don't put regular text directly in math mode - Test your expressions - Always preview to ensure they render correctly
- Use
\leftand\right- For automatically sized parentheses:\left( \frac{a}{b} \right)
align- For aligned equations with&alignment pointsgather- For centered equations without alignmentmatrix- Basic matrix without bracketspmatrix- Matrix with parentheses ( )bmatrix- Matrix with square brackets [ ]vmatrix- Matrix with vertical bars | | (determinant)cases- For piecewise functions and systems