Math¶
Mathematical notation rendered by MathJax. Enabled by the dollarmath and amsmath MyST extensions.
Note
See MathJax for setup instructions.
Inline Math¶
Embed math expressions within a line of text.
The equation \(E = mc^2\) describes mass-energy equivalence. The quadratic formula is \(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\).
The MyST syntax:
The equation $E = mc^2$ is inline math.
Display Math¶
Standalone equations centered on their own line.
The MyST syntax:
$$
\int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi}
$$
Labeled Equations¶
Add a label to reference an equation elsewhere in the document.
Euler’s identity is shown in equation (1).
The MyST syntax:
```{math}
:label: euler
e^{i\pi} + 1 = 0
```
See equation {eq}`euler`.
Long Equations¶
Equations wider than the column scroll sideways inside their own box, so the page never scrolls. The equation number stays visible beside the formula. Narrow your browser window to try it.
Multi-line Equations¶
Use the amsmath environment for aligned multi-line equations.
Maxwell’s equations (3) describe classical electromagnetism.
Piecewise Functions¶
The MyST syntax:
$$
f(x) = \begin{cases}
x^2 & \text{if } x \geq 0 \\
-x & \text{if } x < 0
\end{cases}
$$
Matrix Notation¶
Different bracket styles:
Syntax |
Brackets |
Result |
|---|---|---|
|
Parentheses |
\(\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\) |
|
Square |
\(\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\) |
|
Vertical bars |
\(\begin{vmatrix} 1 & 2 \\ 3 & 4 \end{vmatrix}\) |
Limits and Series¶
Common Symbols Reference¶
Greek Letters¶
Lowercase |
Command |
Uppercase |
Command |
|---|---|---|---|
\(\alpha\) |
|
\(A\) |
|
\(\beta\) |
|
\(B\) |
|
\(\gamma\) |
|
\(\Gamma\) |
|
\(\delta\) |
|
\(\Delta\) |
|
\(\epsilon\) |
|
\(E\) |
|
\(\lambda\) |
|
\(\Lambda\) |
|
\(\mu\) |
|
\(M\) |
|
\(\pi\) |
|
\(\Pi\) |
|
\(\sigma\) |
|
\(\Sigma\) |
|
\(\omega\) |
|
\(\Omega\) |
|
Operators and Relations¶
Symbol |
Command |
Symbol |
Command |
|---|---|---|---|
\(\leq\) |
|
\(\geq\) |
|
\(\neq\) |
|
\(\approx\) |
|
\(\pm\) |
|
\(\times\) |
|
\(\div\) |
|
\(\cdot\) |
|
\(\in\) |
|
\(\notin\) |
|
\(\subset\) |
|
\(\subseteq\) |
|
\(\cup\) |
|
\(\cap\) |
|
\(\infty\) |
|
\(\partial\) |
|
\(\nabla\) |
|
\(\forall\) |
|
Arrows¶
Symbol |
Command |
Symbol |
Command |
|---|---|---|---|
\(\rightarrow\) |
|
\(\leftarrow\) |
|
\(\Rightarrow\) |
|
\(\Leftarrow\) |
|
\(\leftrightarrow\) |
|
\(\Leftrightarrow\) |
|
\(\mapsto\) |
|
\(\implies\) |
|
Tip
Use
\text{}to include words inside math: \(P(\text{error}) < 0.05\)Use
\mathbf{}for bold vectors: \(\mathbf{v} = (v_1, v_2, v_3)\)Use
\,for thin spacing and\quadfor wider spacing inside equations