◆ AI All-in-One

Level 3 In-Depth AI · Reference

Math Notation Cheat Sheet

Every symbol you will meet in AI papers and in this guide — Σ, ∇, ∂, ‖x‖, E[·], argmax, ∼, ⊙ and the rest — with how to say it out loud, what it means, and a tiny example.

Level
●●●●● Beginner
Reading
15 min
To learn it well
15 minutes to skim, then keep it open
↗ Plan a path here

Read first

Nothing — start here.

This leads to

—

Why it matters

Maths notation is a compressed language. A single line in a paper can stand for a paragraph of words. That makes it efficient for people fluent in it, and a wall for everyone else. The good news is that the vocabulary is small. About sixty symbols cover nearly everything in machine learning papers, and most of them are just shorthand for things you already understand: "add these up", "the biggest one", "how much this changes when that changes".

This page lists those symbols, grouped by topic. For each one you get how to read it aloud (saying a formula in words is the fastest way to understand it), what it means, and a tiny example. Keep it open in a tab while you read other chapters or papers.

Conventions used throughout this guide: vectors are bold lowercase (x\mathbf{x}), matrices are bold uppercase (W\mathbf{W}), plain numbers (scalars) are italic (xx, nn), the learning rate is η\eta, the loss is LL and the model's parameters are θ\theta.

How to read a formula

Before the tables, a worked example of reading one complete formula, the mean squared error loss used in Linear Regression:

L(θ)=1N∑i=1N(y^i−yi)2L(\theta) = \frac{1}{N} \sum_{i=1}^{N} \left( \hat{y}_i - y_i \right)^2
L(θ) = 1 N Σ N i = 1 ( ŷi − yi ) 2 the loss L as a function of the parameters θ one over N divide by N, the numberof examples sum for i from 1 to N add up over every example y-hat i the model's prediction for example i y i the true answer for example i squared makes it positive, punishes big misses
Fig. 1 Anatomy of a formula. Read it from the outside in: the loss, as a function of the parameters, equals one over N times the sum, for i from 1 to N, of the squared difference between the prediction and the true value for example i.

Read aloud: "L of theta equals one over N times the sum, for i from 1 to N, of y-hat i minus y i, squared." In plain words: for every example, take the prediction minus the true answer, square it, add all of those up, and divide by how many examples there are. That is, the average squared error.

Three habits make any formula readable:

  1. Say it aloud using the "read as" column below.
  2. Find the big operator (a sum, an argmax, an expectation) and read from the outside in.
  3. Plug in tiny numbers. With two examples, predictions (3,5)(3, 5) and true values (2,5)(2, 5): L=12((3−2)2+(5−5)2)=12(1+0)=0.5L = \frac{1}{2}\left((3-2)^2 + (5-5)^2\right) = \frac{1}{2}(1 + 0) = 0.5.

Key idea Notation is shorthand, not magic. Every symbol stands for a short phrase. Translate the formula into words, then into a tiny example with real numbers.

Greek letters

Greek letters are just names, like variables. Some have conventional meanings in ML.

Symbol Read as Usual meaning in AI
α\alpha alpha a learning rate or a mixing weight
β\beta beta a coefficient; momentum settings in Adam (β1,β2\beta_1, \beta_2)
γ\gamma gamma discount factor in RL; a scale parameter
δ\delta, Δ\Delta delta a small change (Δx\Delta x: "change in x"); an error term
ϵ\epsilon epsilon a tiny number (e.g. 10−810^{-8}) to avoid dividing by zero; exploration rate in RL; noise
η\eta eta learning rate
θ\theta, Θ\Theta theta all the model's parameters
λ\lambda lambda strength of regularisation; an eigenvalue
μ\mu mu a mean (average)
π\pi pi 3.14159…; in RL, a policy
σ\sigma, Σ\Sigma sigma σ\sigma: standard deviation, or the sigmoid function; Σ\Sigma: a covariance matrix (or a sum, see below)
ϕ\phi, ψ\psi phi, psi parameters of a second network; a feature map
ω\omega omega a weight; a frequency

Arithmetic and relations

Symbol Read as Meaning Tiny example
a⋅ba \cdot b, abab a times b multiplication 3⋅4=123 \cdot 4 = 12
ab\frac{a}{b} a over b division 63=2\frac{6}{3} = 2
ana^n a to the n a multiplied by itself n times 23=82^3 = 8
x\sqrt{x} square root of x number that squared gives x 9=3\sqrt{9} = 3
∣x∣\vert x \vert absolute value of x x without its sign ∣−3∣=3\vert -3 \vert = 3
≈\approx approximately equals close enough π≈3.14\pi \approx 3.14
≠\neq not equal 2≠32 \neq 3
∝\propto is proportional to equal up to a constant factor P(A∣B)∝P(B∣A) P(A)P(A \mid B) \propto P(B \mid A)\,P(A)
:=:= or ≜\triangleq is defined as introduces a new name xˉ:=1n∑ixi\bar{x} := \frac{1}{n}\sum_i x_i
←\leftarrow gets, is replaced by update a value w←w−ηgw \leftarrow w - \eta g
≪\ll, ≫\gg much less / much greater than 0.001≪10000.001 \ll 1000
±\pm plus or minus both signs 3±0.53 \pm 0.5 means 2.5 to 3.5
∞\infty infinity larger than any number
⌊x⌋\lfloor x \rfloor, ⌈x⌉\lceil x \rceil floor, ceiling of x round down / round up ⌊2.7⌋=2\lfloor 2.7 \rfloor = 2, ⌈2.1⌉=3\lceil 2.1 \rceil = 3
n!n! n factorial 1×2×⋯×n1 \times 2 \times \dots \times n 4!=244! = 24
exp⁡(x)\exp(x), exe^x e to the x exponential, with e≈2.718e \approx 2.718 e0=1e^0 = 1
log⁡x\log x, ln⁡x\ln x log of x natural logarithm (base ee) in ML papers, the inverse of exe^x ln⁡e2=2\ln e^2 = 2
log⁡2x\log_2 x log base 2 of x how many times to halve to reach 1 log⁡28=3\log_2 8 = 3

Sets and logic

A set is a collection of distinct things, written with curly braces.

Symbol Read as Meaning Tiny example
{a,b,c}\{a, b, c\} the set a, b, c a collection {1,2,3}\{1, 2, 3\}
x∈Sx \in S x is in S, x is an element of S membership 2∈{1,2,3}2 \in \{1, 2, 3\}
x∉Sx \notin S x is not in S 5∉{1,2,3}5 \notin \{1, 2, 3\}
A⊆BA \subseteq B A is a subset of B everything in A is in B {1}⊆{1,2}\{1\} \subseteq \{1, 2\}
A∪BA \cup B A union B in A or B (or both) {1,2}∪{2,3}={1,2,3}\{1,2\} \cup \{2,3\} = \{1,2,3\}
A∩BA \cap B A intersect B in both {1,2}∩{2,3}={2}\{1,2\} \cap \{2,3\} = \{2\}
∅\emptyset the empty set nothing
∣S∣\vert S \vert size of S number of elements ∣{a,b,c}∣=3\vert\{a,b,c\}\vert = 3
R\mathbb{R} the reals, "R" all ordinary numbers −1.5∈R-1.5 \in \mathbb{R}
Rn\mathbb{R}^n R n lists (vectors) of n real numbers (1,2,3)∈R3(1, 2, 3) \in \mathbb{R}^3
Rm×n\mathbb{R}^{m \times n} R m by n matrices with m rows, n columns a 2×32 \times 3 table
N\mathbb{N}, Z\mathbb{Z} naturals, integers 0,1,2,…0,1,2,\dots and …,−1,0,1,…\dots,-1,0,1,\dots
{x∣x>0}\{x \mid x > 0\} the set of x such that x is positive set-builder notation
[a,b][a, b], (a,b)(a, b) closed / open interval numbers from a to b, with / without the ends [0,1][0, 1] includes 0 and 1
∀\forall for all ∀x:x2≥0\forall x: x^2 \geq 0
∃\exists there exists ∃x:x2=4\exists x: x^2 = 4
⇒\Rightarrow,   ⟺  \iff implies; if and only if
f:A→Bf: A \to B f maps A to B a function from inputs in A to outputs in B f:R2→Rf: \mathbb{R}^2 \to \mathbb{R}

Sums, products and indices

Symbol Read as Meaning Tiny example
xix_i x sub i the i-th item of a list (a subscript is an index, not a power) if x=(4,7,9)\mathbf{x} = (4, 7, 9), x2=7x_2 = 7
x(i)x^{(i)} x superscript i the i-th training example (brackets mean "not a power") x(3)\mathbf{x}^{(3)}: third example
∑i=1nxi\sum_{i=1}^{n} x_i sum for i from 1 to n of x i add them all up (summation) ∑i=13i=1+2+3=6\sum_{i=1}^{3} i = 1+2+3 = 6
∏i=1nxi\prod_{i=1}^{n} x_i product for i from 1 to n of x i multiply them all ∏i=13i=6\prod_{i=1}^{3} i = 6
∑i\sum_i, ∑x∈S\sum_{x \in S} sum over i; sum over x in S range left implicit, or over a set
max⁡ixi\max_i x_i max over i of x i the largest value max⁡(4,7,9)=9\max(4, 7, 9) = 9
arg⁡max⁡ixi\arg\max_i x_i arg max over i which i gives the largest value (argmax) arg⁡max⁡(4,7,9)=3\arg\max(4, 7, 9) = 3
arg⁡min⁡θL(θ)\arg\min_\theta L(\theta) arg min over theta of L the parameters that make the loss smallest the goal of training
xˉ\bar{x} x bar the mean (average) (2,4)‾=3\overline{(2,4)} = 3
y^\hat{y} y hat an estimate or prediction (hat notation) model predicts y^=0.8\hat{y} = 0.8, truth y=1y = 1
x∗x^*, θ∗\theta^* x star the optimal value θ∗=arg⁡min⁡θL(θ)\theta^* = \arg\min_\theta L(\theta)
x′x' x prime a new or modified x; sometimes a derivative

Tip Read ∑\sum as a for-loop that adds: total = 0; for i in range(1, n+1): total += x[i]. Read arg⁡max⁡\arg\max as Python's index of max, or NumPy's np.argmax.

Vectors and matrices

See Vectors, Matrices and Matrix Multiplication and Dot Product, Norms and Similarity for the ideas behind these.

Symbol Read as Meaning Tiny example
x\mathbf{x}, x⃗\vec{x} vector x an ordered list of numbers x=(1,2)\mathbf{x} = (1, 2)
W\mathbf{W} matrix W a table of numbers (1234)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}
WijW_{ij} W i j entry in row i, column j above, W12=2W_{12} = 2
x⊤\mathbf{x}^\top, W⊤\mathbf{W}^\top x transpose rows become columns (12)⊤=(1  2)\begin{pmatrix} 1 \\ 2 \end{pmatrix}^\top = (1\ \ 2)
x⋅y\mathbf{x} \cdot \mathbf{y}, x⊤y\mathbf{x}^\top \mathbf{y}, ⟨x,y⟩\langle \mathbf{x}, \mathbf{y} \rangle x dot y dot product: multiply matching entries and add (1,2)⋅(3,4)=3+8=11(1,2)\cdot(3,4) = 3 + 8 = 11
Wx\mathbf{W}\mathbf{x}, AB\mathbf{AB} W times x matrix multiplication (1234)(11)=(37)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} 1 \\ 1 \end{pmatrix} = \begin{pmatrix} 3 \\ 7 \end{pmatrix}
x⊙y\mathbf{x} \odot \mathbf{y} x Hadamard y, element-wise times element-wise product: multiply matching entries, keep the list (1,2)⊙(3,4)=(3,8)(1,2) \odot (3,4) = (3, 8)
x⊗y\mathbf{x} \otimes \mathbf{y} x outer y, tensor product every pair multiplied, giving a matrix (meaning varies by paper)
∥x∥\lVert \mathbf{x} \rVert, ∥x∥2\lVert \mathbf{x} \rVert_2 norm of x length of a vector ∥(3,4)∥=5\lVert (3,4) \rVert = 5
∥x∥1\lVert \mathbf{x} \rVert_1 L1 norm of x sum of absolute values ∥(3,−4)∥1=7\lVert (3,-4) \rVert_1 = 7
I\mathbf{I} identity matrix 1s on the diagonal, 0s elsewhere; Ix=x\mathbf{I}\mathbf{x} = \mathbf{x}
W−1\mathbf{W}^{-1} W inverse the matrix that undoes W W−1W=I\mathbf{W}^{-1}\mathbf{W} = \mathbf{I}
det⁡(W)\det(\mathbf{W}) determinant of W how much W scales areas
diag(x)\mathrm{diag}(\mathbf{x}) diag of x matrix with x on its diagonal
x∈Rd\mathbf{x} \in \mathbb{R}^{d} x is a d-dimensional vector tells you the shape an embedding in R768\mathbb{R}^{768}
W₁₁W₁₂W₁₃W₁₄ W₂₁W₂₂W₂₃W₂₄ W₃₁W₃₂W₃₃W₃₄ W ∈ ℝ³ˣ⁴ 3 rows × 4 columns: always rows first col 1col 2col 3col 4 row 1row 2row 3 W₂₃ = row 2, column 3 × = x₁x₂x₃x₄ x ∈ ℝ⁴ a vector of 4 numbers y₁y₂y₃ Wx ∈ ℝ³ a vector of 3 numbers (3×4) times (4) gives (3): the inner sizes must match
Fig. 2 Reading matrix notation. A matrix W in R^(3×4) has 3 rows and 4 columns; W with subscript 2,3 is the entry in row 2, column 3. Multiplying W by a vector x in R^4 gives a vector in R^3.

Calculus

See Derivatives and Slopes, The Chain Rule and Partial Derivatives and Gradients.

Symbol Read as Meaning Tiny example
f(x)f(x) f of x a function applied to x f(x)=x2f(x) = x^2, f(3)=9f(3) = 9
dfdx\frac{df}{dx}, f′(x)f'(x) d f d x; f prime of x derivative: slope of f at x ddxx2=2x\frac{d}{dx}x^2 = 2x
∂f∂x\frac{\partial f}{\partial x} partial f partial x, "del f del x" slope with respect to x, holding other inputs fixed ∂∂x(xy)=y\frac{\partial}{\partial x}(xy) = y
∇f\nabla f, ∇θL\nabla_\theta L nabla f, grad f; gradient of L with respect to theta vector of all partial derivatives ∇(x2+y2)=(2x,2y)\nabla (x^2 + y^2) = (2x, 2y)
d2fdx2\frac{d^2 f}{dx^2}, f′′f'' second derivative how the slope changes (curvature) d2dx2x3=6x\frac{d^2}{dx^2}x^3 = 6x
J\mathbf{J} Jacobian matrix of partial derivatives of a vector function
H\mathbf{H}, ∇2f\nabla^2 f Hessian matrix of second derivatives
∫abf(x) dx\int_a^b f(x)\,dx integral from a to b of f area under f; a continuous sum ∫012x dx=1\int_0^1 2x\,dx = 1
lim⁡x→a\lim_{x \to a} limit as x goes to a value approached lim⁡n→∞1n=0\lim_{n \to \infty} \frac{1}{n} = 0
O(n2)O(n^2) big O of n squared grows at most like n2n^2 (cost of an algorithm) attention is O(n2)O(n^2) in sequence length

Probability and statistics

See Probability Basics, Probability Distributions and Bayes' Theorem.

Symbol Read as Meaning Tiny example
P(A)P(A), Pr⁡(A)\Pr(A) probability of A chance A happens, 0 to 1 fair coin: P(heads)=0.5P(\text{heads}) = 0.5
p(x)p(x) p of x probability (or density) of value x
P(A,B)P(A, B), P(A∩B)P(A \cap B) probability of A and B both happen two heads: 0.250.25
P(A∣B)P(A \mid B) probability of A given B conditional probability: chance of A if we know B P(rain∣clouds)P(\text{rain} \mid \text{clouds})
pθ(y∣x)p_\theta(y \mid x) p theta of y given x a model with parameters θ giving probabilities of outputs y for input x an LLM's next-token probabilities
X∼DX \sim \mathcal{D} X is distributed as D; X is drawn from D X is a random sample from that distribution x∼N(0,1)x \sim \mathcal{N}(0, 1)
N(μ,σ2)\mathcal{N}(\mu, \sigma^2) normal with mean mu, variance sigma squared the bell curve N(0,1)\mathcal{N}(0, 1): standard normal
E[X]\mathbb{E}[X], Ex∼p[f(x)]\mathbb{E}_{x \sim p}[f(x)] expectation of X; expected value of f of x, x drawn from p expected value: the long-run average fair die: E[X]=3.5\mathbb{E}[X] = 3.5
Var(X)\mathrm{Var}(X), σ2\sigma^2 variance of X average squared distance from the mean
σ\sigma sigma standard deviation: typical spread
1[⋅]\mathbb{1}[\cdot], 1A\mathbb{1}_{A} indicator of… indicator function: 1 if the condition is true, else 0 1[3>2]=1\mathbb{1}[3 > 2] = 1
H(p)H(p) entropy of p average surprise, in bits or nats fair coin: 1 bit
DKL(p∥q)D_{\mathrm{KL}}(p \parallel q) KL divergence of p from q how different q is from p 0 when p=qp = q
i.i.d. independent and identically distributed samples drawn separately from the same distribution standard assumption about data

Common ML functions and conventions

Symbol Read as Meaning
LL, L\mathcal{L}, JJ loss, cost the number training tries to minimise (Loss Functions)
θ\theta theta all parameters; W\mathbf{W} and b\mathbf{b} for weights and biases
η\eta eta learning rate (Gradient Descent)
NN, nn, mm number of examples; dd or DD for dimensions; BB for batch size
σ(z)=11+e−z\sigma(z) = \frac{1}{1 + e^{-z}} sigmoid of z squashes any number into (0, 1)
softmax(z)i=ezi∑jezj\mathrm{softmax}(\mathbf{z})_i = \frac{e^{z_i}}{\sum_j e^{z_j}} softmax turns a list of scores into probabilities that sum to 1
ReLU(z)=max⁡(0,z)\mathrm{ReLU}(z) = \max(0, z) ReLU of z the most common activation function (Activation Functions)
fθ(x)f_\theta(\mathbf{x}) f theta of x the model with parameters θ applied to input x
D\mathcal{D} script D the dataset
Q,K,V\mathbf{Q}, \mathbf{K}, \mathbf{V} queries, keys, values the three matrices in Attention
Attention(Q,K,V)=softmax ⁣(QK⊤dk)V\mathrm{Attention}(\mathbf{Q},\mathbf{K},\mathbf{V}) = \mathrm{softmax}\!\left(\frac{\mathbf{Q}\mathbf{K}^\top}{\sqrt{d_k}}\right)\mathbf{V} the Transformer's core equation

Common confusions

  • xix_i versus xix^i. A subscript is an index ("the i-th"). A superscript is usually a power, unless it's in brackets, x(i)x^{(i)}, which means "the i-th example".
  • Σ\Sigma versus σ\sigma. Capital sigma as a big operator, ∑\sum, is a sum. Capital sigma as a letter, Σ\Sigma, is often a covariance matrix. Lowercase σ\sigma is a standard deviation or the sigmoid function. Context decides.
  • log⁡\log. In ML papers, log⁡\log almost always means the natural log, ln⁡\ln. In information theory it is often base 2.
  • ⋅\cdot for products. a⋅ba \cdot b is ordinary multiplication for numbers but the dot product for vectors.
  • max⁡\max versus arg⁡max⁡\arg\max. max⁡\max gives the biggest value. arg⁡max⁡\arg\max gives where it is. An LLM using greedy decoding outputs arg⁡max⁡\arg\max of its next-token probabilities.
  • Different papers, different conventions. Notation is not standardised. Good papers define their symbols near the start. Look for that paragraph.

Watch out Don't try to memorise this page. Look things up as you meet them. After a few weeks of reading formulas aloud, the common symbols become as automatic as ++ and ==.

Try it

  1. Read aloud, then explain in plain words: θ∗=arg⁡min⁡θ1N∑i=1Nℓ(fθ(x(i)),y(i))\theta^* = \arg\min_\theta \frac{1}{N}\sum_{i=1}^{N} \ell\big(f_\theta(\mathbf{x}^{(i)}), y^{(i)}\big).
  2. Compute by hand: ∑i=14i2\sum_{i=1}^{4} i^2,   (1,0,2)⋅(3,5,1)\;(1, 0, 2) \cdot (3, 5, 1),   ∥(6,8)∥\;\lVert (6, 8) \rVert,   arg⁡max⁡(0.1,0.7,0.2)\;\arg\max(0.1, 0.7, 0.2).
  3. Open the paper "Attention Is All You Need" (see The Papers That Shaped AI) and find three symbols from this page in its equations.

Answers to 2: 30; 5; 10; 2 (the second position).

Answer to 1: "The best parameters are the ones that make the average loss over all N training examples smallest", which is the definition of training.

Check your understanding

5 quick questions. Pick an answer to see whether you were right and why. Your best score is saved on this device.

  1. What is Σᵢ₌₁³ i², the sum for i from 1 to 3 of i squared?

  2. A model outputs next-token probabilities (0.1, 0.7, 0.2). What are max and argmax of this list?

  3. What is (1, 2) ⊙ (3, 4), the element-wise product?

  4. In a paper you see x₃ and x⁽³⁾. What is the difference?

  5. In the formula L = (1/N) Σ (ŷᵢ − yᵢ)², what does the hat on ŷᵢ tell you?

Finished this chapter?

Learn more

Hand-picked courses, books, videos and tutorials for going deeper. See all resources →

Book

Mathematics for Machine Learning

Deisenroth, Faisal & Ong · 2020 · Intermediate · Free

The linear algebra, calculus, probability and optimisation that ML uses, in one free book.

Video

Essence of Linear Algebra

3Blue1Brown · Beginner · Free

A visual intuition for vectors, matrices, determinants and eigenvectors. You will see the ideas, not just the rules.

Video

Essence of Calculus

3Blue1Brown · Beginner · Free

Derivatives, the chain rule and integrals, explained visually in short videos.

Course

Linear Algebra

Khan Academy · Beginner · Free

Patient video lessons with exercises on vectors, matrices and transformations.

Book

Deep Learning

Goodfellow, Bengio & Courville · 2016 · Advanced · Free

The classic deep learning textbook, especially strong on the maths foundations. Free to read online.

Facts checked as of 30 November 2026. Fast-moving details (products, prices, laws) change often. · Source: content/entries/reference/math-notation.md