Skip to content

Notation and Symbols

Most of the difficulty in reading a mathematics textbook for the first time is not the mathematics. It is that the author fixed a notation in the front matter, assumed you memorised it, and then wrote four hundred pages in it. Miss one convention and a page that would have been easy becomes unreadable.

This page is that front matter, expanded. It mirrors the Table of Symbols in Mathematics for Machine Learning (pages 6 and 7), adds the chapter where each symbol first does real work, and flags the half-dozen places where the same mark means two different things.

Bookmark it. You will come back.

  • The typeface convention that tells you a scalar from a vector from a matrix, at a glance.
  • Why xy\mathbf{x}^\top\mathbf{y} and x,y\langle\mathbf{x},\mathbf{y}\rangle are written differently even when they are equal.
  • The difference between BB, B\boldsymbol{B} and B\mathcal{B}, which the book uses on the same page.
  • Which symbols are overloaded, and how to tell from context which meaning is in play.
  • Where each symbol first appears, so you can look up the derivation rather than the definition.

Everything else is lookup. This one is worth memorising:

you seeit is aexample
lowercase italicscalar — a single numberaa, bb, cc, α\alpha, β\beta, γ\gamma, λ\lambda
lowercase boldvector — a column of numbersx\mathbf{x}, y\mathbf{y}, z\mathbf{z}, b1\mathbf{b}_1
uppercase boldmatrix — a grid of numbersA\mathbf{A}, B\mathbf{B}, C\mathbf{C}
uppercase italica count, or a random variableDD, NN, XX, YY
calligraphica setA\mathcal{A}, B\mathcal{B}, C\mathcal{C}

So xAx\mathbf{x}^\top\mathbf{A}\mathbf{x} reads immediately as row-vector times matrix times column-vector, which must come out a scalar. Reading shapes off the typeface is how you catch an error in a derivation without doing any arithmetic, and it is the single most useful habit this page can give you.

symbolmeaningfirst used
x\mathbf{x}^\top, A\mathbf{A}^\toptranspose: rows become columns2.2 Matrices
A1\mathbf{A}^{-1}inverse of a matrix2.2 Matrices
x,y\langle\mathbf{x},\mathbf{y}\rangleinner product of x\mathbf{x} and y\mathbf{y}3.2 Inner Products
xy\mathbf{x}^\top\mathbf{y}dot product of x\mathbf{x} and y\mathbf{y}2.2 Matrices
Im\mathbf{I}_midentity matrix, size m×mm\times m2.2 Matrices
0m,n\mathbf{0}_{m,n}matrix of zeros, size m×nm\times n2.2 Matrices
1m,n\mathbf{1}_{m,n}matrix of ones, size m×nm\times n2.2 Matrices
ei\mathbf{e}_istandard basis vector: 11 in component ii, zero elsewhere2.6 Basis and Rank
dim\dimdimension of a vector space2.6 Basis and Rank
rk(A)\operatorname{rk}(\mathbf{A})rank of A\mathbf{A}2.6 Basis and Rank
Im(Φ)\operatorname{Im}(\Phi)image of a linear mapping Φ\Phi2.7 Linear Mappings
ker(Φ)\ker(\Phi)kernel, or null space, of Φ\Phi2.7 Linear Mappings
span[b1]\operatorname{span}[\mathbf{b}_1]span, the set of all multiples and combinations2.4 Vector Spaces
tr(A)\operatorname{tr}(\mathbf{A})trace: the sum of the diagonal4.1 Determinant and Trace
det(A)\det(\mathbf{A})determinant4.1 Determinant and Trace
EλE_\lambdaeigenspace for eigenvalue λ\lambda4.2 Eigenvalues and Eigenvectors

Two notes worth having in advance.

Why both ,\langle\cdot,\cdot\rangle and xy\mathbf{x}^\top\mathbf{y}? The dot product is one inner product — the standard one. ,\langle\cdot,\cdot\rangle is the general notion, and Chapter 3 builds real geometry from any of them, including inner products on spaces of functions where there are no components to multiply pairwise. When the book writes angle brackets it is telling you the argument does not depend on the standard choice.

Why ei\mathbf{e}_i deserves its own symbol. Once you have it, the columns of a matrix are just Aei\mathbf{A}\mathbf{e}_i, and half of Chapter 2 becomes one sentence: a matrix is where the basis vectors go.

symbolmeaning
N\mathbb{N}natural numbers
Z\mathbb{Z}integers
R\mathbb{R}real numbers
C\mathbb{C}complex numbers
Rn\mathbb{R}^nthe nn-dimensional vector space of real column vectors
Rm×n\mathbb{R}^{m\times n}all real matrices with mm rows and nn columns

Rn\mathbb{R}^n is the single most common symbol in the book. Read it as “a list of nn real numbers, which we are treating as a point and as an arrow at the same time”.

C\mathbb{C} appears rarely, and always for one reason: a real matrix can have complex eigenvalues. A rotation is the standard example, and Complex Numbers in One Page covers exactly as much as you need.

symbolmeaning
x\forall xfor all xx
x\exists xthere exists an xx
a:=ba := baa is defined to be bb
a=:ba =: bbb is defined to be aa
aba \propto baa is proportional to bb: a=constba = \text{const}\cdot b
gfg \circ ffunction composition: ”gg after ff
\Longleftrightarrowif and only if
\Longrightarrowimplies
A\mathcal{A}, C\mathcal{C}sets
aAa \in \mathcal{A}aa is an element of A\mathcal{A}
\emptysetthe empty set
symbolmeaning
DDnumber of dimensions, indexed d=1,,Dd = 1,\dots,D
NNnumber of data points, indexed n=1,,Nn = 1,\dots,N

This pairing is fixed throughout the book, and it is worth internalising because it disambiguates almost every summation you will meet: n=1N\sum_{n=1}^{N} runs over examples, and d=1D\sum_{d=1}^{D} runs over features. When you see a double sum, the outer index tells you what the quantity is per.

symbolmeaningfirst used
fx\frac{\partial f}{\partial x}partial derivative of ff with respect to xx5.2 Partial Differentiation
dfdx\frac{\mathrm{d}f}{\mathrm{d}x}total derivative of ff with respect to xx5.1 Differentiation
\nablagradient5.2 Partial Differentiation
θ\boldsymbol{\theta}parameter vector — the thing being learned8.1 Data, Models, Learning
L\mathfrak{L}Lagrangian7.2 Lagrange Multipliers
L\mathcal{L}negative log-likelihood8.3 Parameter Estimation
symbolmeaningfirst used
XpX \sim pthe random variable XX is distributed according to pp6.2 Discrete and Continuous
EX[x]\mathbb{E}_X[\mathbf{x}]expectation of x\mathbf{x} with respect to XX6.4 Summary Statistics
VX[x]\mathbb{V}_X[\mathbf{x}]variance of x\mathbf{x} with respect to XX6.4 Summary Statistics
CovX,Y[x,y]\operatorname{Cov}_{X,Y}[\mathbf{x},\mathbf{y}]covariance between x\mathbf{x} and y\mathbf{y}6.4 Summary Statistics
X ⁣ ⁣ ⁣YZX \perp\!\!\!\perp Y \mid ZXX is conditionally independent of YY given ZZ6.4, 8.5 Graphical Models
(nk)\binom{n}{k}binomial coefficient, ”nn choose kk6.2 Discrete and Continuous
N(μ,Σ)\mathcal{N}(\boldsymbol{\mu},\boldsymbol{\Sigma})Gaussian with mean μ\boldsymbol{\mu}, covariance Σ\boldsymbol{\Sigma}6.5 Gaussian Distribution
Ber(μ)\mathrm{Ber}(\mu)Bernoulli distribution with parameter μ\mu6.2 Discrete and Continuous
Bin(N,μ)\mathrm{Bin}(N,\mu)Binomial with parameters NN and μ\mu6.2 Discrete and Continuous
Beta(α,β)\mathrm{Beta}(\alpha,\beta)Beta distribution with parameters α\alpha, β\beta6.6 Conjugacy

The subscript on EX\mathbb{E}_X is not decoration. When a quantity depends on two random variables, EX[f(X,Y)]\mathbb{E}_X[f(X, Y)] averages over XX and leaves a function of YY; dropping the subscript makes the expression ambiguous. Every derivation in Chapters 8 to 11 leans on this.

acronymmeaning
i.i.d.independent, identically distributed
MLEmaximum likelihood estimation, or estimator
MAPmaximum a posteriori
ONBorthonormal basis
REFrow-echelon form
SPDsymmetric, positive definite
PCAprincipal component analysis
PPCAprobabilistic principal component analysis
GMMGaussian mixture model
SVMsupport vector machine
e.g.exempli gratia — for example
i.e.id est — that is

SPD is worth flagging early. “Symmetric positive definite” is a mouthful that turns up on almost every page from Chapter 3 onward, because it is precisely the condition for a matrix to define an inner product (§3.2), to have a Cholesky factorisation (§4.3), to be a valid covariance matrix (§6.4), and for a quadratic objective to be convex (§7.3). One property, five uses.

you seeit means
Definition 2.4a definition, numbered within its chapter
Theorem 4.15a claim with a proof
Example 3.5a worked instance
(3.41)equation 41 of Chapter 3
Remarka side comment, often the most useful paragraph on the page

Every page in this module ends with a From the book box citing these numbers, so you can read the page and the PDF side by side without hunting.

pch.quizTag Can you read the notation?
  1. You read an expression and see a bold lowercase letter multiplied by a bold uppercase letter. What is the result?

    pch.quizShowAnswer

    B — It depends on the order and the shapes, but bold lowercase is a vector and bold uppercase is a matrix — Bold lowercase is a vector, bold uppercase is a matrix. Whether the product is a vector or a scalar depends on the shapes and on which side the vector sits, and reading that off the typeface is exactly the habit the convention exists to give you.

  2. In a derivation you see a line beginning with a colon-equals rather than a plain equals sign. What does that tell you?

    pch.quizShowAnswer

    B — The line introduces a definition, so there is nothing to prove there — Colon-equals introduces a name. Plain equals asserts a fact you may have to justify. Scanning a derivation for plain equals signs shows you where the actual argument lives.

  3. The symbol lambda appears in Chapter 4 and again in Chapter 7. What has changed?

    pch.quizShowAnswer

    B — It is an eigenvalue in Chapter 4 and a Lagrange multiplier in Chapter 7 — The book's own symbol table lists lambda as eigenvalue or Lagrange multiplier. Chapter 10 then uses both at once when it derives PCA by maximising variance under a constraint, so knowing the overload exists matters.

  4. What does the subscript in an expectation such as E-sub-X tell you?

    pch.quizShowAnswer

    A — Which variable is being averaged over, leaving the others as free variables — It names the variable being integrated out. With two random variables in play, the expectation over one leaves a function of the other, and without the subscript the expression is ambiguous.

  • Typeface rule — lowercase italic is a scalar, lowercase bold a vector, uppercase bold a matrix, calligraphic a set, uppercase italic a count or a random variable.
  • := introduces a definition, = asserts a fact you may have to prove — which is how you find where a derivation’s real argument lives.
  • The three B’s are three different objects: a tuple of vectors, the matrix with those columns, and the unordered set.
  • The absolute-value bars mean determinant when the argument is a matrix — the double bars are the norm, Euclidean unless subscripted.
  • Lambda is an eigenvalue in Chapter 4 and a Lagrange multiplier in Chapter 7 — and PCA uses both meanings on one page.
  • N indexes data points and D indexes dimensions — so the outer index of a double sum tells you what the quantity is measured per.
  • SPD means symmetric positive definite — the condition for an inner product, a Cholesky factorisation, a valid covariance and a convex quadratic.

Next: the notation you will use most often, and the manipulations that go with it — Sums, Products, and Set Notation.

pch.coffeeTagline

pch.coffeeCta

pch.feedbackHeading

pch.feedbackSubheading