amsmath
LaTeX amsmath/amssymb/mathtools packages for mathematical typesetting. Use when helping users write equations, align math, use mathematical symbols, matrices, theorems, or any advanced math formatting.
What this skill does
# amsmath + amssymb + mathtools — Math Typesetting
**CTAN:** https://ctan.org/pkg/amsmath | https://ctan.org/pkg/mathtools
**Manual:** `texdoc amsmath`, `texdoc mathtools`
## Setup
```latex
\usepackage{amsmath} % core math environments
\usepackage{amssymb} % extra symbols (loads amsfonts)
\usepackage{mathtools} % fixes + extensions for amsmath (loads amsmath)
\usepackage{amsthm} % theorem environments
% mathtools loads amsmath, so you can just use:
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{amsthm}
```
## Equation Environments
### Single Equations
```latex
% Numbered
\begin{equation}
E = mc^2
\label{eq:einstein}
\end{equation}
% Unnumbered
\begin{equation*}
E = mc^2
\end{equation*}
% or: \[ E = mc^2 \]
```
### align — Multiple Aligned Equations
```latex
\begin{align}
f(x) &= x^2 + 2x + 1 \label{eq:f} \\
&= (x+1)^2 \label{eq:f2}
\end{align}
% Unnumbered: align*
% Suppress single number: \nonumber or \notag before \\
```
### gather — Centered, No Alignment
```latex
\begin{gather}
x + y = 1 \\
x - y = 3
\end{gather}
```
### multline — Long Single Equation
```latex
\begin{multline}
f(x) = a_0 + a_1 x + a_2 x^2 + a_3 x^3 \\
+ a_4 x^4 + a_5 x^5 + a_6 x^6
\end{multline}
```
First line left-aligned, last line right-aligned, middle centered.
### split — Sub-alignment Inside equation
```latex
\begin{equation}
\begin{split}
f(x) &= a + b + c \\
&\quad + d + e
\end{split}
\end{equation}
```
Single equation number for the group.
### cases
```latex
\begin{equation}
|x| = \begin{cases}
x & \text{if } x \geq 0 \\
-x & \text{if } x < 0
\end{cases}
\end{equation}
% mathtools: dcases (displaystyle), rcases (right brace)
\begin{dcases}
\frac{x}{2} & x > 0 \\
0 & x = 0
\end{dcases}
```
### aligned / gathered — Inline Sub-environments
```latex
% Use inside equation or \[ \] for sub-alignment
\begin{equation}
\left\{
\begin{aligned}
2x + 3y &= 7 \\
x - y &= 1
\end{aligned}
\right.
\end{equation}
```
### subequations
```latex
\begin{subequations} \label{eq:system}
\begin{align}
x + y &= 1 \label{eq:system_a} \\
x - y &= 3 \label{eq:system_b}
\end{align}
\end{subequations}
% Produces (1a), (1b)
```
## Environment Summary
| Environment | Alignment | Numbering | Use for |
|-------------|-----------|-----------|---------|
| `equation` | centered | one number | single equation |
| `align` | `&` columns | per line | aligned equations |
| `gather` | centered | per line | unrelated equations |
| `multline` | first L, last R | one number | long equation |
| `split` | `&` columns | one number (parent) | sub-align in equation |
| `cases` | `&` columns | none (in equation) | piecewise functions |
| `aligned` | `&` columns | none (in equation) | inline sub-alignment |
| `flalign` | `&` columns | per line | full-width alignment |
Add `*` for unnumbered variants (except `split`, `aligned`, `gathered`).
## Text in Math
```latex
\text{if } % normal text (respects surrounding font)
\mathrm{const} % upright roman
\textit{word} % italic text
\mathit{diff} % math italic (different spacing than default)
\mathbf{v} % bold (not for Greek — use \boldsymbol)
\boldsymbol{\alpha} % bold Greek
\mathbb{R} % blackboard bold: ℝ (amssymb)
\mathcal{L} % calligraphic: ℒ
\mathfrak{g} % Fraktur (amssymb)
\mathsf{X} % sans-serif
\mathtt{code} % monospace
\operatorname{span} % upright operator (one-off)
```
## Spacing in Math
| Command | Width | Example |
|---------|-------|---------|
| `\,` | 3/18 em (thin) | `\int f(x)\, dx` |
| `\:` or `\>` | 4/18 em (medium) | |
| `\;` | 5/18 em (thick) | |
| `\!` | −3/18 em (negative thin) | `\!\!` to tighten |
| `\quad` | 1 em | `x \quad y` |
| `\qquad` | 2 em | |
| `\phantom{x}` | space of "x" | alignment trick |
| `\hphantom{x}` | horizontal only | |
| `\vphantom{x}` | vertical only | |
## Operators
```latex
% Built-in: \sin, \cos, \tan, \log, \ln, \exp, \min, \max,
% \sup, \inf, \lim, \det, \dim, \ker, \gcd, \Pr, \hom, ...
% Custom operator (preamble)
\DeclareMathOperator{\tr}{tr} % like \sin
\DeclareMathOperator*{\argmax}{arg\,max} % limits below in display
% Usage
\tr(A) = \sum_i a_{ii} \qquad x^* = \argmax_x f(x)
```
## Matrices
```latex
\begin{pmatrix} a & b \\ c & d \end{pmatrix} % ( )
\begin{bmatrix} a & b \\ c & d \end{bmatrix} % [ ]
\begin{Bmatrix} a & b \\ c & d \end{Bmatrix} % { }
\begin{vmatrix} a & b \\ c & d \end{vmatrix} % | | (determinant)
\begin{Vmatrix} a & b \\ c & d \end{Vmatrix} % ‖ ‖
\begin{matrix} a & b \\ c & d \end{matrix} % no delimiters
% Small inline matrix
$\bigl(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\bigr)$
```
**Max columns default = 10.** For more: `\setcounter{MaxMatrixCols}{20}`
## Delimiters
```latex
% Auto-sizing (use sparingly — can oversize)
\left( \frac{a}{b} \right)
\left[ \sum_i x_i \right]
\left\{ x \in \mathbb{R} \mid x > 0 \right\}
\left. \frac{df}{dx} \right|_{x=0} % \left. = invisible delimiter
% Manual sizing (preferred for control)
\bigl( \bigr) % slightly bigger
\Bigl( \Bigr) % bigger
\biggl( \biggr) % even bigger
\Biggl( \Biggr) % biggest
% mathtools paired delimiters (best approach)
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\DeclarePairedDelimiter\set{\{}{\}}
% Usage:
\abs{x} % |x| (no sizing)
\abs*{x} % \left|x\right| (auto-sizing)
\abs[\big]{x} % \bigl|x\bigr| (manual)
```
## mathtools Additions
```latex
% Colon equals
\coloneqq % :=
\eqqcolon % =:
% dcases (displaystyle fractions in cases)
\begin{dcases} ... \end{dcases}
% rcases (right brace)
\begin{rcases} ... \end{rcases}
% Short intertext (less vertical space than \intertext)
\begin{align}
f(x) &= x^2 \\
\shortintertext{where}
x &> 0
\end{align}
% Prescript (left sub/superscript)
\prescript{14}{6}{\mathrm{C}} % ¹⁴₆C
% Cramped styles
\cramped{x^{x^x}} % reduces height
% Smashed operator limits
\smashoperator{\sum_{i=1}^{n}}
```
## Symbol Reference
### Greek Letters
| Lower | Upper | Lower | Upper |
|-------|-------|-------|-------|
| `\alpha` α | — | `\nu` ν | — |
| `\beta` β | — | `\xi` ξ | `\Xi` Ξ |
| `\gamma` γ | `\Gamma` Γ | `\pi` π | `\Pi` Π |
| `\delta` δ | `\Delta` Δ | `\rho` ρ | — |
| `\epsilon` ε | — | `\sigma` σ | `\Sigma` Σ |
| `\varepsilon` ε | — | `\tau` τ | — |
| `\zeta` ζ | — | `\upsilon` υ | `\Upsilon` Υ |
| `\eta` η | — | `\phi` ϕ | `\Phi` Φ |
| `\theta` θ | `\Theta` Θ | `\varphi` φ | — |
| `\iota` ι | — | `\chi` χ | — |
| `\kappa` κ | — | `\psi` ψ | `\Psi` Ψ |
| `\lambda` λ | `\Lambda` Λ | `\omega` ω | `\Omega` Ω |
| `\mu` μ | — | | |
Variants: `\varepsilon`, `\vartheta`, `\varphi`, `\varrho`, `\varsigma`
### Relations
| Symbol | Command | Symbol | Command |
|--------|---------|--------|---------|
| ≤ | `\leq` | ≥ | `\geq` |
| ≪ | `\ll` | ≫ | `\gg` |
| ≠ | `\neq` | ≈ | `\approx` |
| ∼ | `\sim` | ≃ | `\simeq` |
| ≡ | `\equiv` | ≅ | `\cong` |
| ∝ | `\propto` | ∈ | `\in` |
| ∉ | `\notin` | ⊂ | `\subset` |
| ⊆ | `\subseteq` | ⊃ | `\supset` |
| ⊇ | `\supseteq` | ⊄ | `\not\subset` |
| ≺ | `\prec` | ≻ | `\succ` |
| ⊥ | `\perp` | ∥ | `\parallel` |
| ⊢ | `\vdash` | ⊣ | `\dashv` |
| ⊨ | `\models` | | |
### Binary Operators
| Symbol | Command | Symbol | Command |
|--------|---------|--------|---------|
| ± | `\pm` | ∓ | `\mp` |
| × | `\times` | ÷ | `\div` |
| · | `\cdot` | ∗ | `\ast` |
| ⊕ | `\oplus` | ⊗ | `\otimes` |
| ∪ | `\cup` | ∩ | `\cap` |
| ∨ | `\vee` | ∧ | `\wedge` |
| ∘ | `\circ` | • | `\bullet` |
| † | `\dagger` | ‡ | `\ddagger` |
### Arrows
| Symbol | Command | Symbol | Command |
|--------|---------|--------|---------|
| → | `\to` / `\rightarrow` | ← | `\leftarrow` |
| ⇒ | `\Rightarrow` | ⇐ | `\Leftarrow` |
| ↔ | `\leftrightarrow` | ⇔ | `\Leftrightarrow` |
| ↦ | `\mapstoRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.