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.
What you’ll learn
Section titled “What you’ll learn”- The typeface convention that tells you a scalar from a vector from a matrix, at a glance.
- Why and are written differently even when they are equal.
- The difference between , and , 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.
The one convention that matters most
Section titled “The one convention that matters most”Everything else is lookup. This one is worth memorising:
| you see | it is a | example |
|---|---|---|
| lowercase italic | scalar — a single number | , , , , , , |
| lowercase bold | vector — a column of numbers | , , , |
| uppercase bold | matrix — a grid of numbers | , , |
| uppercase italic | a count, or a random variable | , , , |
| calligraphic | a set | , , |
So 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.
Vectors and matrices
Section titled “Vectors and matrices”| symbol | meaning | first used |
|---|---|---|
| , | transpose: rows become columns | 2.2 Matrices |
| inverse of a matrix | 2.2 Matrices | |
| inner product of and | 3.2 Inner Products | |
| dot product of and | 2.2 Matrices | |
| identity matrix, size | 2.2 Matrices | |
| matrix of zeros, size | 2.2 Matrices | |
| matrix of ones, size | 2.2 Matrices | |
| standard basis vector: in component , zero elsewhere | 2.6 Basis and Rank | |
| dimension of a vector space | 2.6 Basis and Rank | |
| rank of | 2.6 Basis and Rank | |
| image of a linear mapping | 2.7 Linear Mappings | |
| kernel, or null space, of | 2.7 Linear Mappings | |
| span, the set of all multiples and combinations | 2.4 Vector Spaces | |
| trace: the sum of the diagonal | 4.1 Determinant and Trace | |
| determinant | 4.1 Determinant and Trace | |
| eigenspace for eigenvalue | 4.2 Eigenvalues and Eigenvectors |
Two notes worth having in advance.
Why both and ? The dot product is one inner product — the standard one. 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 deserves its own symbol. Once you have it, the columns of a matrix are just , and half of Chapter 2 becomes one sentence: a matrix is where the basis vectors go.
Number systems
Section titled “Number systems”| symbol | meaning |
|---|---|
| natural numbers | |
| integers | |
| real numbers | |
| complex numbers | |
| the -dimensional vector space of real column vectors | |
| all real matrices with rows and columns |
is the single most common symbol in the book. Read it as “a list of real numbers, which we are treating as a point and as an arrow at the same time”.
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.
Logic, sets and definitions
Section titled “Logic, sets and definitions”| symbol | meaning |
|---|---|
| for all | |
| there exists an | |
| is defined to be | |
| is defined to be | |
| is proportional to : | |
| function composition: ” after ” | |
| if and only if | |
| implies | |
| , | sets |
| is an element of | |
| the empty set |
Counting and indexing
Section titled “Counting and indexing”| symbol | meaning |
|---|---|
| number of dimensions, indexed | |
| number of data points, indexed |
This pairing is fixed throughout the book, and it is worth internalising because it disambiguates almost every summation you will meet: runs over examples, and runs over features. When you see a double sum, the outer index tells you what the quantity is per.
Calculus
Section titled “Calculus”| symbol | meaning | first used |
|---|---|---|
| partial derivative of with respect to | 5.2 Partial Differentiation | |
| total derivative of with respect to | 5.1 Differentiation | |
| gradient | 5.2 Partial Differentiation | |
| parameter vector — the thing being learned | 8.1 Data, Models, Learning | |
| Lagrangian | 7.2 Lagrange Multipliers | |
| negative log-likelihood | 8.3 Parameter Estimation |
Probability and statistics
Section titled “Probability and statistics”| symbol | meaning | first used |
|---|---|---|
| the random variable is distributed according to | 6.2 Discrete and Continuous | |
| expectation of with respect to | 6.4 Summary Statistics | |
| variance of with respect to | 6.4 Summary Statistics | |
| covariance between and | 6.4 Summary Statistics | |
| is conditionally independent of given | 6.4, 8.5 Graphical Models | |
| binomial coefficient, ” choose ” | 6.2 Discrete and Continuous | |
| Gaussian with mean , covariance | 6.5 Gaussian Distribution | |
| Bernoulli distribution with parameter | 6.2 Discrete and Continuous | |
| Binomial with parameters and | 6.2 Discrete and Continuous | |
| Beta distribution with parameters , | 6.6 Conjugacy |
The subscript on is not decoration. When a quantity depends on two random variables, averages over and leaves a function of ; dropping the subscript makes the expression ambiguous. Every derivation in Chapters 8 to 11 leans on this.
Abbreviations
Section titled “Abbreviations”| acronym | meaning |
|---|---|
| i.i.d. | independent, identically distributed |
| MLE | maximum likelihood estimation, or estimator |
| MAP | maximum a posteriori |
| ONB | orthonormal basis |
| REF | row-echelon form |
| SPD | symmetric, positive definite |
| PCA | principal component analysis |
| PPCA | probabilistic principal component analysis |
| GMM | Gaussian mixture model |
| SVM | support 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.
How the book cross-references itself
Section titled “How the book cross-references itself”| you see | it means |
|---|---|
| Definition 2.4 | a definition, numbered within its chapter |
| Theorem 4.15 | a claim with a proof |
| Example 3.5 | a worked instance |
| (3.41) | equation 41 of Chapter 3 |
| Remark | a 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.
See it move
Section titled “See it move”The convention is only worth memorising if you can run it. Drag the knobs to build a product out of two operands, and read off whether the typefaces you chose can legally be multiplied at all — before any numbers exist.
On real data
Section titled “On real data”Reading the plot
Section titled “Reading the plot”The first figure is the convention doing work. Read the left panel left to right and notice that no numbers appear anywhere. is lowercase bold and transposed, so it is ; is uppercase bold, so it is ; is . Each join has matching inner dimensions, the outer dimensions are and , and therefore is a scalar. The red box below shows the same reading applied to : , inner dimensions and , malformed. You did not need to know a single entry of either object to say that.
The right panel is the reason this is a habit worth having rather than a nicety. It runs all sixteen
pairings of the shapes (3,), (3,1), (1,3) and (3,3) through both operators. @ refuses six of
them, which is helpful. * refuses none. All sixteen returned an array. Twelve of those sixteen
were between shapes that are not equal, and the worst case is the pairing highlighted in the caption:
a (3,) times a (3,1) returns a (3,3) — an outer product where almost anyone writing that line
meant an elementwise one. There is no exception, no warning, and the downstream code will happily
consume a matrix where a vector belonged. The typeface convention is the check that catches this,
because it fixes the intended shape at the point where you write the mathematics.
The second figure is the / / distinction made concrete. The same three vectors appear in all three panels. As a tuple they have positions, which is what makes “the coordinates of with respect to ” a well-defined phrase — permute the tuple and every coordinate vector changes. As a matrix they have a shape, here and measured rank , and you can multiply by it. As a set they have only membership: three elements, no first element, no order. The reason the book keeps all three rather than picking one is that each throws away exactly what the other two need to keep, and each of §2.6, §2.6.1 and §2.7 needs a different one.
The third figure is the lookup table for ambiguity, and it has one structural lesson. Scan the third column. Every disambiguating cue is a fact about the argument, not about the mark: single bars mean absolute value around a scalar, a determinant around a square matrix, a cardinality around a set. The centred dot is multiplication between two things and a placeholder when it stands alone. Italic uppercase is a random variable in Chapter 6 and a count when it bounds a sum. So the marks are not really ambiguous once you have read the typefaces — which is the argument for doing that first, and the reason this page puts the typeface table above everything else.
-
You read an expression and see a bold lowercase letter multiplied by a bold uppercase letter. What is the result?
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.
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.
-
In a derivation you see a line beginning with a colon-equals rather than a plain equals sign. What does that tell you?
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.
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.
-
The symbol lambda appears in Chapter 4 and again in Chapter 7. What has changed?
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.
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.
-
What does the subscript in an expectation such as E-sub-X tell you?
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.
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.
🧪 Try It Yourself
Section titled “🧪 Try It Yourself”Exercise 1 – Read the shape, then check it
Section titled “Exercise 1 – Read the shape, then check it”Exercise 2 – One mark, four meanings
Section titled “Exercise 2 – One mark, four meanings”Exercise 3 – Tuple, matrix, set
Section titled “Exercise 3 – Tuple, matrix, set”Exercise 4 – The trap the typeface exists to prevent
Section titled “Exercise 4 – The trap the typeface exists to prevent”Exercise 5 – The N-by-D convention, and why it is a convention
Section titled “Exercise 5 – The N-by-D convention, and why it is a convention”Recall card
Section titled “Recall card”- 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.coffeeCtapch.feedbackHeading
pch.feedbackSubheading