Reference
The Notation Glossary
Every symbol the academy teaches, in one place: how to say it aloud, what it means and how to type it in LaTeX. Keep it open in a tab while you read papers.
Mathematics for Machine Learning · Chamber 1
Reading Mathematics Aloud
- “alpha”A step size or learning rate (Adam calls it ), or a coefficient in a weighted mix.
- “beta”Decay rates, like Adam's and ; also regression coefficients.
- “gamma”The discount factor in reinforcement learning; the learned scale in batch normalisation.
- “delta”A small change, or the error signal flowing backwards through a network.
- “capital delta”A difference or change: is “the change in ”.
- “epsilon”A tiny positive number, like , added to avoid dividing by zero. In proofs, an arbitrarily small tolerance.
- “curly epsilon”The same letter in another style, often used for random noise.
- “eta”The learning rate in gradient descent and its relatives.
- “theta”The parameters of a model: every weight and bias, bundled together.
- “lambda”The strength of a penalty (regularisation); later, an eigenvalue.
- “mu”A mean (average), especially of a distribution.
- “sigma”A standard deviation (how spread out values are), or the sigmoid function .
- “capital sigma”“Add them all up” (Chamber 5), or a covariance matrix.
- “pi”The constant ; in reinforcement learning, a policy.
- “capital pi”“Multiply them all together” (Chamber 5).
- “phi”A feature map , or the parameters of a second network.
- “omega”A weight or a frequency. Easy to mistake for .
- “tau”A temperature (how soft a softmax is) or a time constant.
- “rho”A correlation or a density. Easy to mistake for .
- “kappa”A condition number: how badly scaled an optimisation problem is.
- “nu”Degrees of freedom, or another rate. Looks almost exactly like .
- “xi”Often a random variable or noise. Said “ksee” or “zai”, and famously hard to handwrite.
- “chi”Said “kai”. Best known from the (chi-squared) test.
- “x”Plain italic lower case: a scalar, one single number.
- “bold x”Bold lower case: a vector, an ordered list of numbers.
- “bold capital X”Bold (or plain) upper case: a matrix, a grid of numbers. Often a whole dataset, one example per row.
- “calligraphic L”Curly capitals name special objects: a loss, a dataset, the normal distribution.
- “blackboard bold R”Double-struck capitals name number systems. is the real numbers (Chamber 2).
- “upright softmax”Upright letters spell the names of functions (, , ), never a product of variables.
- “x sub i”The -th entry of a list (or the -th example). A subscript is an index: a position.
- “A sub i j”The entry in row and column of a matrix. Two indices, two directions.
- “x squared”A superscript number is usually a power: .
- “x superscript i”A superscript in brackets is an index, not a power: the -th training example.
- “theta at step t”A subscript often means “at time step ”: the value after updates.
- “x prime”Another (a second point, a new value). On a function, means its derivative (Chamber 7).
- “y hat”A hat means estimated or predicted: is the model's guess at .
- “x bar”A bar means an average: is the mean of the values.
- “x tilde”A tilde means a modified version: noisy, approximate or transformed.
- “theta star”A star means optimal: the best possible value. Also written .
- “v arrow”An arrow marks a vector in school and physics. ML papers prefer bold, .
- “equals”Both sides are the same value. A claim you could check.
- “is defined as”The left side is a new name for the right side. Not a claim to check: a definition.
- “is defined as (delta-equals)”Another way to write a definition, common in engineering papers.
- “is identical to”Equal for every value of the variables (an identity). Some authors also use it for definitions.
- “is approximately”Close, but not exactly equal.
- “is proportional to”Equal up to a constant factor: means for some fixed .
- “is much less than”Smaller by a large factor.
- “gets”Assignment in an algorithm: compute the right side, store it in the left. An update, not an equation.
- “end of proof”The “tombstone”: the proof is finished. Older texts write Q.E.D.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “alpha” | A step size or learning rate (Adam calls it ), or a coefficient in a weighted mix. | ||
| “beta” | Decay rates, like Adam's and ; also regression coefficients. | ||
| “gamma” | The discount factor in reinforcement learning; the learned scale in batch normalisation. | ||
| “delta” | A small change, or the error signal flowing backwards through a network. | ||
| “capital delta” | A difference or change: is “the change in ”. | ||
| “epsilon” | A tiny positive number, like , added to avoid dividing by zero. In proofs, an arbitrarily small tolerance. | ||
| “curly epsilon” | The same letter in another style, often used for random noise. | ||
| “eta” | The learning rate in gradient descent and its relatives. | ||
| “theta” | The parameters of a model: every weight and bias, bundled together. | ||
| “lambda” | The strength of a penalty (regularisation); later, an eigenvalue. | ||
| “mu” | A mean (average), especially of a distribution. | ||
| “sigma” | A standard deviation (how spread out values are), or the sigmoid function . | ||
| “capital sigma” | “Add them all up” (Chamber 5), or a covariance matrix. | ||
| “pi” | The constant ; in reinforcement learning, a policy. | ||
| “capital pi” | “Multiply them all together” (Chamber 5). | ||
| “phi” | A feature map , or the parameters of a second network. | ||
| “omega” | A weight or a frequency. Easy to mistake for . | ||
| “tau” | A temperature (how soft a softmax is) or a time constant. | ||
| “rho” | A correlation or a density. Easy to mistake for . | ||
| “kappa” | A condition number: how badly scaled an optimisation problem is. | ||
| “nu” | Degrees of freedom, or another rate. Looks almost exactly like . | ||
| “xi” | Often a random variable or noise. Said “ksee” or “zai”, and famously hard to handwrite. | ||
| “chi” | Said “kai”. Best known from the (chi-squared) test. | ||
| “x” | Plain italic lower case: a scalar, one single number. | ||
| “bold x” | Bold lower case: a vector, an ordered list of numbers. | ||
| “bold capital X” | Bold (or plain) upper case: a matrix, a grid of numbers. Often a whole dataset, one example per row. | ||
| “calligraphic L” | Curly capitals name special objects: a loss, a dataset, the normal distribution. | ||
| “blackboard bold R” | Double-struck capitals name number systems. is the real numbers (Chamber 2). | ||
| “upright softmax” | Upright letters spell the names of functions (, , ), never a product of variables. | ||
| “x sub i” | The -th entry of a list (or the -th example). A subscript is an index: a position. | ||
| “A sub i j” | The entry in row and column of a matrix. Two indices, two directions. | ||
| “x squared” | A superscript number is usually a power: . | ||
| “x superscript i” | A superscript in brackets is an index, not a power: the -th training example. | ||
| “theta at step t” | A subscript often means “at time step ”: the value after updates. | ||
| “x prime” | Another (a second point, a new value). On a function, means its derivative (Chamber 7). | ||
| “y hat” | A hat means estimated or predicted: is the model's guess at . | ||
| “x bar” | A bar means an average: is the mean of the values. | ||
| “x tilde” | A tilde means a modified version: noisy, approximate or transformed. | ||
| “theta star” | A star means optimal: the best possible value. Also written . | ||
| “v arrow” | An arrow marks a vector in school and physics. ML papers prefer bold, . | ||
| “equals” | Both sides are the same value. A claim you could check. | ||
| “is defined as” | The left side is a new name for the right side. Not a claim to check: a definition. | ||
| “is defined as (delta-equals)” | Another way to write a definition, common in engineering papers. | ||
| “is identical to” | Equal for every value of the variables (an identity). Some authors also use it for definitions. | ||
| “is approximately” | Close, but not exactly equal. | ||
| “is proportional to” | Equal up to a constant factor: means for some fixed . | ||
| “is much less than” | Smaller by a large factor. | ||
| “gets” | Assignment in an algorithm: compute the right side, store it in the left. An update, not an equation. | ||
| “end of proof” | The “tombstone”: the proof is finished. Older texts write Q.E.D. |
Mathematics for Machine Learning · Chamber 2
Sets: The Nouns of Mathematics
- “is an element of”Membership: says the object belongs to the set . Also read “is in” or “belongs to”.
- “is not an element of”says does not belong to .
- “the set containing a, b and c”Curly braces list a set's elements (roster notation). Order and repeats don't matter: .
- “the empty set”The set with no elements at all, . Also printed .
- “the size of A”The number of elements of a finite set , called its cardinality. Around a number the same bars mean absolute value, so check what's inside.
- “is a subset of”: every element of is also an element of . is allowed to equal .
- “is a proper subset of”: and , so has at least one element that lacks.
- “is a subset of (strict or not, check)”Ambiguous: some authors mean , others . ML papers mostly use it loosely for . Check the paper's convention.
- “the set of x in S such that P of x”Go through and keep each that passes the test . The colon reads “such that”.
- “the set of all x such that P of x”The same idea with a vertical bar instead of a colon: . Where comes from should be clear from context.
- “the set of f of x for x in S”A formula on the left builds the elements: apply to every in and collect the results.
- “the natural numbers”The counting numbers. Authors disagree about whether , so check. or removes the doubt.
- “the integers”Whole numbers, positive, negative and zero: .
- “the rational numbers”Fractions with and .
- “the real numbers”Every point on the number line, including and . The home of weights, losses and learning rates.
- “the non-negative reals”Real numbers that are : distances, variances, ReLU outputs.
- “R plus”The positive reals, or the non-negative reals: authors differ, so check. Learning rates live here.
- “the closed interval from a to b”All reals with : both ends included.
- “the open interval from a to b”All reals with : both ends excluded. The same brackets also write an ordered pair, so read the context.
- “the half-open interval from a to b”All reals with . A square bracket includes its end, a round one excludes it.
- “union”: everything in or in (or in both).
- “intersection”: everything in both and .
- “set minus”: everything in that is not in . Some authors write .
- “the complement of A”Everything in the universe that is not in : .
- “A bar, the complement”Another way to write the complement. In statistics the same bar means an average (, Chamber 1), so read the context.
- “the universal set”Everything under discussion. Complements are taken inside it. Also written or .
- “A and B are disjoint”The two sets share no elements, like a training set and a test set should.
- “the ordered pair a, b”Two objects in a fixed order: , unlike the set .
- “the tuple x one to x n”An ordered list of entries, called an -tuple. Order and repeats both count.
- “A cross B”The Cartesian product: every ordered pair with and . It has elements.
- “R n”All -tuples of real numbers, with factors. A vector is one element.
- “R m by n”All grids of real numbers with rows and columns: real matrices (Chamber 6).
- “the set one to K”The integers from 1 to : the usual label set for a classifier with classes. Some papers write .
- “the set of pairs x i, y i for i from 1 to n”A dataset: one (input, label) pair for each index from 1 to .
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “is an element of” | Membership: says the object belongs to the set . Also read “is in” or “belongs to”. | ||
| “is not an element of” | says does not belong to . | ||
| “the set containing a, b and c” | Curly braces list a set's elements (roster notation). Order and repeats don't matter: . | ||
| “the empty set” | The set with no elements at all, . Also printed . | ||
| “the size of A” | The number of elements of a finite set , called its cardinality. Around a number the same bars mean absolute value, so check what's inside. | ||
| “is a subset of” | : every element of is also an element of . is allowed to equal . | ||
| “is a proper subset of” | : and , so has at least one element that lacks. | ||
| “is a subset of (strict or not, check)” | Ambiguous: some authors mean , others . ML papers mostly use it loosely for . Check the paper's convention. | ||
| “the set of x in S such that P of x” | Go through and keep each that passes the test . The colon reads “such that”. | ||
| “the set of all x such that P of x” | The same idea with a vertical bar instead of a colon: . Where comes from should be clear from context. | ||
| “the set of f of x for x in S” | A formula on the left builds the elements: apply to every in and collect the results. | ||
| “the natural numbers” | The counting numbers. Authors disagree about whether , so check. or removes the doubt. | ||
| “the integers” | Whole numbers, positive, negative and zero: . | ||
| “the rational numbers” | Fractions with and . | ||
| “the real numbers” | Every point on the number line, including and . The home of weights, losses and learning rates. | ||
| “the non-negative reals” | Real numbers that are : distances, variances, ReLU outputs. | ||
| “R plus” | The positive reals, or the non-negative reals: authors differ, so check. Learning rates live here. | ||
| “the closed interval from a to b” | All reals with : both ends included. | ||
| “the open interval from a to b” | All reals with : both ends excluded. The same brackets also write an ordered pair, so read the context. | ||
| “the half-open interval from a to b” | All reals with . A square bracket includes its end, a round one excludes it. | ||
| “union” | : everything in or in (or in both). | ||
| “intersection” | : everything in both and . | ||
| “set minus” | : everything in that is not in . Some authors write . | ||
| “the complement of A” | Everything in the universe that is not in : . | ||
| “A bar, the complement” | Another way to write the complement. In statistics the same bar means an average (, Chamber 1), so read the context. | ||
| “the universal set” | Everything under discussion. Complements are taken inside it. Also written or . | ||
| “A and B are disjoint” | The two sets share no elements, like a training set and a test set should. | ||
| “the ordered pair a, b” | Two objects in a fixed order: , unlike the set . | ||
| “the tuple x one to x n” | An ordered list of entries, called an -tuple. Order and repeats both count. | ||
| “A cross B” | The Cartesian product: every ordered pair with and . It has elements. | ||
| “R n” | All -tuples of real numbers, with factors. A vector is one element. | ||
| “R m by n” | All grids of real numbers with rows and columns: real matrices (Chamber 6). | ||
| “the set one to K” | The integers from 1 to : the usual label set for a classifier with classes. Some papers write . | ||
| “the set of pairs x i, y i for i from 1 to n” | A dataset: one (input, label) pair for each index from 1 to . |
Mathematics for Machine Learning · Chamber 3
Logic: For All and There Exists
- “not”Negation: is true exactly when is false. Some authors write .
- “and”Conjunction: is true only when both and are true.
- “or”Disjunction: is true when at least one of them is. Mathematical “or” is inclusive: both is fine.
- “implies”, “if then ”: false only when is true and is false. Also written or .
- “is implied by”means . Proofs of an “if and only if” often label their two halves and .
- “if and only if”: each implies the other, so they are always true or false together. Also written .
- “is logically equivalent to”Two statements with identical truth tables, like an implication and its contrapositive. (Chamber 1 met as “is identical to”: the same idea, for logic.)
- “for all”The universal quantifier: what follows holds for every element. Also read “for every” or “for each”.
- “there exists”The existential quantifier: at least one element makes what follows true. One witness is enough.
- “there exists exactly one”Existence and uniqueness: one element works, and no second one does.
- “there does not exist”No element works: the same as , or “for all, not”.
- “such that”Introduces the condition after a quantifier. Papers also use a colon, a vertical bar or just a comma.
- “if and only if”The written-out form of , said exactly the same way. Two statements are claimed, one in each direction.
- “without loss of generality”“The other cases work the same way, so we only treat this one.” Honest only when the cases really are symmetric.
- “that is”Latin id est: a restatement of what was just said, in other words.
- “for example”Latin exempli gratia: one example among several, not a restatement.
- “therefore”Marks a conclusion. Rare in papers, common on whiteboards.
- “contradiction”Marks the moment a proof by contradiction reaches something impossible. Also drawn as or a lightning bolt.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “not” | Negation: is true exactly when is false. Some authors write . | ||
| “and” | Conjunction: is true only when both and are true. | ||
| “or” | Disjunction: is true when at least one of them is. Mathematical “or” is inclusive: both is fine. | ||
| “implies” | , “if then ”: false only when is true and is false. Also written or . | ||
| “is implied by” | means . Proofs of an “if and only if” often label their two halves and . | ||
| “if and only if” | : each implies the other, so they are always true or false together. Also written . | ||
| “is logically equivalent to” | Two statements with identical truth tables, like an implication and its contrapositive. (Chamber 1 met as “is identical to”: the same idea, for logic.) | ||
| “for all” | The universal quantifier: what follows holds for every element. Also read “for every” or “for each”. | ||
| “there exists” | The existential quantifier: at least one element makes what follows true. One witness is enough. | ||
| “there exists exactly one” | Existence and uniqueness: one element works, and no second one does. | ||
| “there does not exist” | No element works: the same as , or “for all, not”. | ||
| “such that” | Introduces the condition after a quantifier. Papers also use a colon, a vertical bar or just a comma. | ||
| “if and only if” | The written-out form of , said exactly the same way. Two statements are claimed, one in each direction. | ||
| “without loss of generality” | “The other cases work the same way, so we only treat this one.” Honest only when the cases really are symmetric. | ||
| “that is” | Latin id est: a restatement of what was just said, in other words. | ||
| “for example” | Latin exempli gratia: one example among several, not a restatement. | ||
| “therefore” | Marks a conclusion. Rare in papers, common on whiteboards. | ||
| “contradiction” | Marks the moment a proof by contradiction reaches something impossible. Also drawn as or a lightning bolt. |
Mathematics for Machine Learning · Chamber 4
Functions: Machines That Map
- “f from X to Y”A function named with domain (the allowed inputs) and codomain (where outputs are promised to live). Every input gets exactly one output.
- “x maps to x squared”The rule: what happens to a single input. This arrow has a little tail; the plain arrow connects whole sets.
- “f of x”The output of at the input . The brackets mean “of”, not multiplication.
- “the image of X under f”The set of outputs actually produces, . It sits inside the codomain and can be smaller.
- “f of x semicolon theta”A model: the input before the semicolon, the parameters after it. Training changes ; prediction changes .
- “f sub theta of x”The same idea with the parameters as a subscript: one function for every choice of .
- “f of x and y”A function of two inputs. Its domain is a Cartesian product such as (Chamber 2).
- “f composed with g”“ after ”: apply first, then . The notation reads right to left.
- “f of g of x”Nested brackets: the innermost function acts first, exactly as in code.
- “the identity function”The machine that changes nothing: . Composing with it leaves any function unchanged.
- “f inverse”The function that undoes : . It is not . It exists only when is a bijection.
- “f L after dots after f 1”A deep network: layers applied in turn, first and last.
- “a if P, otherwise b”A piecewise definition. The brace lists the cases, and exactly one applies to each input.
- “the absolute value of x”The size of without its sign: if , and if .
- “the floor of x”Round down to the nearest integer. Careful with negatives: .
- “the ceiling of x”Round up to the nearest integer.
- “the max of a and b”The larger of the two numbers.
- “the min of a and b”The smaller of the two numbers.
- “the indicator of P”1 if the statement is true, 0 if it's false. Also written , or with a double-struck one.
- “Kronecker delta i j”1 if and 0 otherwise: an indicator for “same index”.
- “e, Euler's number”The constant , the natural base for exponentials and logarithms.
- “e to the x”The exponential function. Always positive, and it turns sums into products: .
- “exp of x”The same function written as a name, easier to read when the exponent is long.
- “log x”The inverse of exp. In ML papers a log with no base almost always means the natural log, base .
- “natural log of x”The natural log, written explicitly. The same function as ML's , and as Python's
math.log. - “log base two of x”How many times you must double 1 to reach . Information measured in bits uses base 2.
- “log base ten of x”How many times you must multiply 1 by ten to reach : roughly, the number of digits.
- “sigma of z”The sigmoid . It squashes any real number into , so its output can be read as a probability.
- “tanh of z”The hyperbolic tangent: squashes into . It is a sigmoid, stretched and shifted: .
- “relu of z”The rectified linear unit, : negative inputs become 0, positive ones pass through.
- “softplus of z”: a smooth version of ReLU that is always positive. The Deep Learning book writes it .
- “logit of p”The inverse of the sigmoid, . The raw scores a classifier feeds to its sigmoid or softmax are called logits after it.
- “softmax of z, entry i”A preview: turns a vector of scores into a vector of probabilities. The in its formula is Chamber 5's, and Chamber 9 decodes it in full.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “f from X to Y” | A function named with domain (the allowed inputs) and codomain (where outputs are promised to live). Every input gets exactly one output. | ||
| “x maps to x squared” | The rule: what happens to a single input. This arrow has a little tail; the plain arrow connects whole sets. | ||
| “f of x” | The output of at the input . The brackets mean “of”, not multiplication. | ||
| “the image of X under f” | The set of outputs actually produces, . It sits inside the codomain and can be smaller. | ||
| “f of x semicolon theta” | A model: the input before the semicolon, the parameters after it. Training changes ; prediction changes . | ||
| “f sub theta of x” | The same idea with the parameters as a subscript: one function for every choice of . | ||
| “f of x and y” | A function of two inputs. Its domain is a Cartesian product such as (Chamber 2). | ||
| “f composed with g” | “ after ”: apply first, then . The notation reads right to left. | ||
| “f of g of x” | Nested brackets: the innermost function acts first, exactly as in code. | ||
| “the identity function” | The machine that changes nothing: . Composing with it leaves any function unchanged. | ||
| “f inverse” | The function that undoes : . It is not . It exists only when is a bijection. | ||
| “f L after dots after f 1” | A deep network: layers applied in turn, first and last. | ||
| “a if P, otherwise b” | A piecewise definition. The brace lists the cases, and exactly one applies to each input. | ||
| “the absolute value of x” | The size of without its sign: if , and if . | ||
| “the floor of x” | Round down to the nearest integer. Careful with negatives: . | ||
| “the ceiling of x” | Round up to the nearest integer. | ||
| “the max of a and b” | The larger of the two numbers. | ||
| “the min of a and b” | The smaller of the two numbers. | ||
| “the indicator of P” | 1 if the statement is true, 0 if it's false. Also written , or with a double-struck one. | ||
| “Kronecker delta i j” | 1 if and 0 otherwise: an indicator for “same index”. | ||
| “e, Euler's number” | The constant , the natural base for exponentials and logarithms. | ||
| “e to the x” | The exponential function. Always positive, and it turns sums into products: . | ||
| “exp of x” | The same function written as a name, easier to read when the exponent is long. | ||
| “log x” | The inverse of exp. In ML papers a log with no base almost always means the natural log, base . | ||
| “natural log of x” | The natural log, written explicitly. The same function as ML's , and as Python's math.log. | ||
| “log base two of x” | How many times you must double 1 to reach . Information measured in bits uses base 2. | ||
| “log base ten of x” | How many times you must multiply 1 by ten to reach : roughly, the number of digits. | ||
| “sigma of z” | The sigmoid . It squashes any real number into , so its output can be read as a probability. | ||
| “tanh of z” | The hyperbolic tangent: squashes into . It is a sigmoid, stretched and shifted: . | ||
| “relu of z” | The rectified linear unit, : negative inputs become 0, positive ones pass through. | ||
| “softplus of z” | : a smooth version of ReLU that is always positive. The Deep Learning book writes it . | ||
| “logit of p” | The inverse of the sigmoid, . The raw scores a classifier feeds to its sigmoid or softmax are called logits after it. | ||
| “softmax of z, entry i” | A preview: turns a vector of scores into a vector of probabilities. The in its formula is Chamber 5's, and Chamber 9 decodes it in full. |
Mathematics for Machine Learning · Chamber 5
Σ and Π: Loops Written in Maths
- “the sum from i equals 1 to n of x sub i”Add for . Below the : the index and where it starts. Above: where it stops. Both ends are included.
- “the index”The dummy variable: a loop counter that exists only inside the sum. Renaming it changes nothing.
- “the sum over i of x sub i”Bounds left out: add over every that makes sense in context, usually all the data.
- “the sum over i in B of x sub i”Add over the elements of a set, such as a mini-batch . There are terms.
- “the sum over j not equal to i”A condition under the : add over every except .
- “the double sum over i and j of a sub i j”A sum of sums: two nested loops over a grid of terms. For finite sums the two sums can be swapped.
- “x 1 plus dots plus x n”An ellipsis: “and so on, following the pattern”. Centred dots go between operations, low dots in lists.
- “the product from i equals 1 to n of x sub i”Multiply the terms instead of adding them. An empty product is 1.
- “n factorial”, the number of ways to put things in order. By the empty-product rule, .
- “the log of the product of p sub i”Equals : a product of many small probabilities becomes a sum that a computer can store.
- “mu, the mean”The average, . Also written .
- “sigma squared, the variance”The average squared distance from the mean: how spread out the values are.
- “sigma, the standard deviation”: the spread in the same units as the data.
- “mu B and sigma squared B”The mean and variance of one mini-batch , as in batch normalisation.
- “x hat sub i, normalised”In batch normalisation, minus the batch mean, divided by the batch standard deviation: how many standard deviations sits from the mean.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “the sum from i equals 1 to n of x sub i” | Add for . Below the : the index and where it starts. Above: where it stops. Both ends are included. | ||
| “the index” | The dummy variable: a loop counter that exists only inside the sum. Renaming it changes nothing. | ||
| “the sum over i of x sub i” | Bounds left out: add over every that makes sense in context, usually all the data. | ||
| “the sum over i in B of x sub i” | Add over the elements of a set, such as a mini-batch . There are terms. | ||
| “the sum over j not equal to i” | A condition under the : add over every except . | ||
| “the double sum over i and j of a sub i j” | A sum of sums: two nested loops over a grid of terms. For finite sums the two sums can be swapped. | ||
| “x 1 plus dots plus x n” | An ellipsis: “and so on, following the pattern”. Centred dots go between operations, low dots in lists. | ||
| “the product from i equals 1 to n of x sub i” | Multiply the terms instead of adding them. An empty product is 1. | ||
| “n factorial” | , the number of ways to put things in order. By the empty-product rule, . | ||
| “the log of the product of p sub i” | Equals : a product of many small probabilities becomes a sum that a computer can store. | ||
| “mu, the mean” | The average, . Also written . | ||
| “sigma squared, the variance” | The average squared distance from the mean: how spread out the values are. | ||
| “sigma, the standard deviation” | : the spread in the same units as the data. | ||
| “mu B and sigma squared B” | The mean and variance of one mini-batch , as in batch normalisation. | ||
| “x hat sub i, normalised” | In batch normalisation, minus the batch mean, divided by the batch standard deviation: how many standard deviations sits from the mean. |
Mathematics for Machine Learning · Chamber 6
Vectors and Matrices: Reading the Shapes
- “x in R n”is a list of real numbers: a vector with entries. Unless a paper says otherwise, it stands as a column, .
- “x sub i”The -th entry of . It's a single number, so it's printed plain, not bold.
- “x transpose”The same numbers laid out as a row, . Also printed , or . It is never a power.
- “the zero vector”Every entry is . Its length comes from context, or a subscript: .
- “the ones vector”Every entry is . Handy for sums: .
- “e sub i”The -th standard basis vector: zeros everywhere except a in position . In ML it's a one-hot vector.
- “the two-norm of x”The ordinary length, . Often written just .
- “the one-norm of x”Add up the sizes of the entries: .
- “the squared two-norm of x”, with no square root. Squared errors and weight penalties are written this way.
- “the inner product of x and y, in angle brackets”Multiply matching entries and add: . Both vectors need the same length.
- “x transpose y”The same number as , written as a matrix product: a row times an column.
- “x dot y”A third name for the same number, the dot product. Physics and school books prefer this one.
- “A is an m by n matrix”A grid of real numbers with rows and columns: numbers in all. Rows first, always.
- “A sub i j”The entry in row , column . Also written , or .
- “row i of A”The whole -th row, a row. The colon means “every index here”, just as in NumPy.
- “column j of A”The whole -th column, an column.
- “A transpose”Flip across the diagonal: . Rows become columns, so an matrix becomes .
- “the identity matrix”Square, with ones on the diagonal and zeros elsewhere, so . Written when the size matters.
- “diag of d”The square matrix with the entries of down its diagonal and zeros everywhere else.
- “the data matrix X”A dataset of examples with features each: one example per row, one feature per column.
- “A times x”A new vector whose -th entry is row of dotted with . Needs 's column count to equal 's length.
- “A times B”. Shapes: . The inner sizes must match; the outer ones survive.
- “A Hadamard B”Multiply entry by entry: . Both must have the same shape. Also called the element-wise product.
- “A plus B”Add entry by entry. As with , both must have exactly the same shape.
- “the outer product of x and y”A column times a row makes a whole matrix: . For and it is .
- “the transpose of A B is B transpose A transpose”Transposing a product reverses the order of the factors. Proved in this chamber, entry by entry.
- “X is B by n by d”A tensor: a grid with three indices. Here, a batch of sequences, each of tokens, each token a -dimensional vector.
- “X b colon colon”Fix the first index and keep the rest: example of the batch, an matrix.
- “A plus b, broadcast”Deep-learning shorthand (and NumPy behaviour): add the vector to every row of . Strict matrix algebra would call it undefined.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “x in R n” | is a list of real numbers: a vector with entries. Unless a paper says otherwise, it stands as a column, . | ||
| “x sub i” | The -th entry of . It's a single number, so it's printed plain, not bold. | ||
| “x transpose” | The same numbers laid out as a row, . Also printed , or . It is never a power. | ||
| “the zero vector” | Every entry is . Its length comes from context, or a subscript: . | ||
| “the ones vector” | Every entry is . Handy for sums: . | ||
| “e sub i” | The -th standard basis vector: zeros everywhere except a in position . In ML it's a one-hot vector. | ||
| “the two-norm of x” | The ordinary length, . Often written just . | ||
| “the one-norm of x” | Add up the sizes of the entries: . | ||
| “the squared two-norm of x” | , with no square root. Squared errors and weight penalties are written this way. | ||
| “the inner product of x and y, in angle brackets” | Multiply matching entries and add: . Both vectors need the same length. | ||
| “x transpose y” | The same number as , written as a matrix product: a row times an column. | ||
| “x dot y” | A third name for the same number, the dot product. Physics and school books prefer this one. | ||
| “A is an m by n matrix” | A grid of real numbers with rows and columns: numbers in all. Rows first, always. | ||
| “A sub i j” | The entry in row , column . Also written , or . | ||
| “row i of A” | The whole -th row, a row. The colon means “every index here”, just as in NumPy. | ||
| “column j of A” | The whole -th column, an column. | ||
| “A transpose” | Flip across the diagonal: . Rows become columns, so an matrix becomes . | ||
| “the identity matrix” | Square, with ones on the diagonal and zeros elsewhere, so . Written when the size matters. | ||
| “diag of d” | The square matrix with the entries of down its diagonal and zeros everywhere else. | ||
| “the data matrix X” | A dataset of examples with features each: one example per row, one feature per column. | ||
| “A times x” | A new vector whose -th entry is row of dotted with . Needs 's column count to equal 's length. | ||
| “A times B” | . Shapes: . The inner sizes must match; the outer ones survive. | ||
| “A Hadamard B” | Multiply entry by entry: . Both must have the same shape. Also called the element-wise product. | ||
| “A plus B” | Add entry by entry. As with , both must have exactly the same shape. | ||
| “the outer product of x and y” | A column times a row makes a whole matrix: . For and it is . | ||
| “the transpose of A B is B transpose A transpose” | Transposing a product reverses the order of the factors. Proved in this chamber, entry by entry. | ||
| “X is B by n by d” | A tensor: a grid with three indices. Here, a batch of sequences, each of tokens, each token a -dimensional vector. | ||
| “X b colon colon” | Fix the first index and keep the rest: example of the batch, an matrix. | ||
| “A plus b, broadcast” | Deep-learning shorthand (and NumPy behaviour): add the vector to every row of . Strict matrix algebra would call it undefined. |
Mathematics for Machine Learning · Chamber 7
Change: The Notation of Calculus
- “delta x”A finite change in : new value minus old value. Capital delta means “difference” (Chamber 1).
- “delta y over delta x”Rise over run: the slope of the straight line (the secant) through two points of a curve.
- “the limit as h tends to zero”The value that the expression after it approaches as gets closer and closer to , without ever being set to .
- “d x”What becomes in the limit: an infinitesimally small change in . Thompson's Calculus Made Easy calls it “a little bit of ”.
- “d y by d x”Leibniz's notation for the derivative of with respect to : the limit of . It often behaves like a fraction, but it is one symbol.
- “f prime of x”Lagrange's notation: is the derivative of , a new function, and is its value at .
- “d by d x”An operator: “take the derivative, with respect to , of whatever follows”.
- “f double prime of x”The second derivative, the derivative of the derivative. It measures how the slope itself changes: curvature. Leibniz writes it .
- “d f by d x, evaluated at a”The derivative, evaluated at the point . The same number as .
- “the chain rule”Differentiating a function of a function: multiply the rates. If depends on and on , the rates chain together. Backpropagation is this rule, applied over and over.
- “partial f by partial x i”The partial derivative: how changes when only moves and every other input is held fixed. The curly warns you there are other inputs.
- “grad f”The gradient: every partial derivative of stacked into a vector, the same shape as the input. is called nabla.
- “grad theta of L”The gradient of the loss with respect to the parameters only. The subscript names the variables being nudged; everything else is held fixed.
- “the Jacobian of f”For , the matrix of all first partials, . Also written .
- “the Hessian of f”For , the matrix of second partials, . Also written .
- “the integral from a to b of f of x, d x”A continuous sum: add up height times a little bit of width , for every from to . The area under the curve.
- “the Riemann sum”The finite version: cut into strips of width and add up over the strips. As it becomes the integral, and turns into .
- “the minimum over x of f”The smallest value that takes: a number on the output side.
- “the arg min over x of f”The input at which is smallest. Read it “the that minimises ”.
- “the arg max over k of p k”The index of the largest entry. A classifier's predicted class is of its predicted probabilities.
- “theta star is the arg min of L”The best parameters: the with the lowest loss. The star marks the optimum, as in Chamber 1.
- “the supremum”The least upper bound. Like , but it exists even when no element reaches it.
- “the first-order approximation”Close to , a smooth function is almost a straight line through with slope .
- “big O of h”Some quantity no bigger than a constant times , once is small enough. It hides the constant to show the rate: halve , roughly halve the error.
- “big O of n squared”A cost that grows at most like for large : double and the work roughly quadruples. Self-attention's cost in the sequence length is quoted this way.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “delta x” | A finite change in : new value minus old value. Capital delta means “difference” (Chamber 1). | ||
| “delta y over delta x” | Rise over run: the slope of the straight line (the secant) through two points of a curve. | ||
| “the limit as h tends to zero” | The value that the expression after it approaches as gets closer and closer to , without ever being set to . | ||
| “d x” | What becomes in the limit: an infinitesimally small change in . Thompson's Calculus Made Easy calls it “a little bit of ”. | ||
| “d y by d x” | Leibniz's notation for the derivative of with respect to : the limit of . It often behaves like a fraction, but it is one symbol. | ||
| “f prime of x” | Lagrange's notation: is the derivative of , a new function, and is its value at . | ||
| “d by d x” | An operator: “take the derivative, with respect to , of whatever follows”. | ||
| “f double prime of x” | The second derivative, the derivative of the derivative. It measures how the slope itself changes: curvature. Leibniz writes it . | ||
| “d f by d x, evaluated at a” | The derivative, evaluated at the point . The same number as . | ||
| “the chain rule” | Differentiating a function of a function: multiply the rates. If depends on and on , the rates chain together. Backpropagation is this rule, applied over and over. | ||
| “partial f by partial x i” | The partial derivative: how changes when only moves and every other input is held fixed. The curly warns you there are other inputs. | ||
| “grad f” | The gradient: every partial derivative of stacked into a vector, the same shape as the input. is called nabla. | ||
| “grad theta of L” | The gradient of the loss with respect to the parameters only. The subscript names the variables being nudged; everything else is held fixed. | ||
| “the Jacobian of f” | For , the matrix of all first partials, . Also written . | ||
| “the Hessian of f” | For , the matrix of second partials, . Also written . | ||
| “the integral from a to b of f of x, d x” | A continuous sum: add up height times a little bit of width , for every from to . The area under the curve. | ||
| “the Riemann sum” | The finite version: cut into strips of width and add up over the strips. As it becomes the integral, and turns into . | ||
| “the minimum over x of f” | The smallest value that takes: a number on the output side. | ||
| “the arg min over x of f” | The input at which is smallest. Read it “the that minimises ”. | ||
| “the arg max over k of p k” | The index of the largest entry. A classifier's predicted class is of its predicted probabilities. | ||
| “theta star is the arg min of L” | The best parameters: the with the lowest loss. The star marks the optimum, as in Chamber 1. | ||
| “the supremum” | The least upper bound. Like , but it exists even when no element reaches it. | ||
| “the first-order approximation” | Close to , a smooth function is almost a straight line through with slope . | ||
| “big O of h” | Some quantity no bigger than a constant times , once is small enough. It hides the constant to show the rate: halve , roughly halve the error. | ||
| “big O of n squared” | A cost that grows at most like for large : double and the work roughly quadruples. Self-attention's cost in the sequence length is quoted this way. |
Mathematics for Machine Learning · Chamber 8
Chance: The Notation of Probability
- “capital omega, the sample space”The sample space: the set of every possible outcome of the experiment.
- “A, an event”An event is a set of outcomes, so a subset of . “The roll is even” is the event .
- “P of A”The probability of event : a number from 0 (impossible) to 1 (certain).
- “P of A complement”The probability that does not happen. It always equals .
- “P of A and B”The probability that both happen. Often written with a comma instead: .
- “P of A or B”The probability that at least one happens. Inclusion–exclusion from Chamber 2 gives the formula.
- “P of A given B”Conditional probability: how likely is once you know happened. The bar is read “given”.
- “random variable X”A capital letter is a random variable: a number whose value depends on chance, like the result of a roll.
- “P of big X equals little x”The probability that the random variable takes the particular value . Capital: the random quantity. Lower case: one value it could take.
- “p of x”The distribution of at the value . For discrete it's a pmf, . For continuous it's a density: areas under it are probabilities.
- “p of x comma y”The joint distribution: how likely and are together.
- “p of y given x”The conditional distribution of once is known: .
- “p theta of y given x”A model: the probability that a network with parameters assigns to label for input .
- “sum over y of p of x comma y”Marginalising: add up the joint over every value of and you're left with . People say has been “summed out”.
- “integral of p of x comma y, d y”The same marginalisation when is continuous: the integral is a continuous sum (Chamber 7).
- “X is independent of Y”Independence: knowing one tells you nothing about the other, so the joint factorises: .
- “is drawn from”Between a variable and a distribution, says the variable is a sample from it (“is distributed as”). Not to be confused with .
- “independent and identically distributed as”Every sample comes from the same distribution, and none depends on any other. The standing assumption about datasets.
- “Bernoulli p”A biased coin: the value 1 with probability and 0 otherwise. Dropout's masks are Bernoulli.
- “normal with mean mu and variance sigma squared”The bell curve centred at . The second slot is the variance , not the standard deviation.
- “uniform from a to b”Every value between and equally likely. A common way to initialise weights.
- “the expectation of X”The expected value: the average of , weighting each value by its probability. The long-run mean of many samples.
- “expectation of f of x, x drawn from p”The average of when is drawn from . The subscript names the random variable and its distribution.
- “the variance of X”How spread out is: the expected squared distance from its mean. Its square root is the standard deviation .
- “the covariance of X and Y”Whether two random variables move together (positive), oppositely (negative), or neither (zero).
- “the likelihood, p of D given theta”The likelihood: how probable the whole dataset is under parameters . For i.i.d. data it's a product.
- “the log-likelihood”The log turns the product into a sum (Chamber 5). Maximising it is maximum likelihood; minimising its negative is the usual cross-entropy loss.
- “the K L divergence of p from q”The Kullback–Leibler divergence: how different is from . Never negative, zero only when , and not symmetric. The is a separator, not a norm.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “capital omega, the sample space” | The sample space: the set of every possible outcome of the experiment. | ||
| “A, an event” | An event is a set of outcomes, so a subset of . “The roll is even” is the event . | ||
| “P of A” | The probability of event : a number from 0 (impossible) to 1 (certain). | ||
| “P of A complement” | The probability that does not happen. It always equals . | ||
| “P of A and B” | The probability that both happen. Often written with a comma instead: . | ||
| “P of A or B” | The probability that at least one happens. Inclusion–exclusion from Chamber 2 gives the formula. | ||
| “P of A given B” | Conditional probability: how likely is once you know happened. The bar is read “given”. | ||
| “random variable X” | A capital letter is a random variable: a number whose value depends on chance, like the result of a roll. | ||
| “P of big X equals little x” | The probability that the random variable takes the particular value . Capital: the random quantity. Lower case: one value it could take. | ||
| “p of x” | The distribution of at the value . For discrete it's a pmf, . For continuous it's a density: areas under it are probabilities. | ||
| “p of x comma y” | The joint distribution: how likely and are together. | ||
| “p of y given x” | The conditional distribution of once is known: . | ||
| “p theta of y given x” | A model: the probability that a network with parameters assigns to label for input . | ||
| “sum over y of p of x comma y” | Marginalising: add up the joint over every value of and you're left with . People say has been “summed out”. | ||
| “integral of p of x comma y, d y” | The same marginalisation when is continuous: the integral is a continuous sum (Chamber 7). | ||
| “X is independent of Y” | Independence: knowing one tells you nothing about the other, so the joint factorises: . | ||
| “is drawn from” | Between a variable and a distribution, says the variable is a sample from it (“is distributed as”). Not to be confused with . | ||
| “independent and identically distributed as” | Every sample comes from the same distribution, and none depends on any other. The standing assumption about datasets. | ||
| “Bernoulli p” | A biased coin: the value 1 with probability and 0 otherwise. Dropout's masks are Bernoulli. | ||
| “normal with mean mu and variance sigma squared” | The bell curve centred at . The second slot is the variance , not the standard deviation. | ||
| “uniform from a to b” | Every value between and equally likely. A common way to initialise weights. | ||
| “the expectation of X” | The expected value: the average of , weighting each value by its probability. The long-run mean of many samples. | ||
| “expectation of f of x, x drawn from p” | The average of when is drawn from . The subscript names the random variable and its distribution. | ||
| “the variance of X” | How spread out is: the expected squared distance from its mean. Its square root is the standard deviation . | ||
| “the covariance of X and Y” | Whether two random variables move together (positive), oppositely (negative), or neither (zero). | ||
| “the likelihood, p of D given theta” | The likelihood: how probable the whole dataset is under parameters . For i.i.d. data it's a product. | ||
| “the log-likelihood” | The log turns the product into a sum (Chamber 5). Maximising it is maximum likelihood; minimising its negative is the usual cross-entropy loss. | ||
| “the K L divergence of p from q” | The Kullback–Leibler divergence: how different is from . Never negative, zero only when , and not symmetric. The is a separator, not a norm. |
Mathematics for Machine Learning · Chamber 9
Reading the Equations of a Paper
- “with respect to”Names the variable a derivative or an optimisation is taken over. The Adam paper computes “gradients w.r.t. stochastic objective”.
- “minimise f of x subject to x at least zero”In an optimisation problem, “s.t.” means subject to: it introduces the constraints the answer must satisfy. (In a definition, the same letters mean “such that”, as in Chamber 3.)
- “f of dot”The dot is a placeholder for “whatever argument goes here”, so means the function itself, not a value of it. The same dot turns up in norms, .
- “x one to T”The whole sequence . Colon ranges are everywhere in papers on sequences.
- “x before t”Everything before position : . The notation of language models, which predict each token from the ones before it.
- “plus a constant”Terms that don't depend on the variable of interest, lumped together and ignored because they don't change the argmin.
- “the positive part of z”Shorthand for , the ReLU of Chamber 4 in different clothes. Common in hinge losses.
- “sim-equals, is estimated by”A cousin of , called “sim-equals” after its LaTeX name,
\simeq. The VAE paper uses it for “this sample average stands in for that expectation”. - “Q, the queries”In attention, a matrix with one row per position that is asking: shape .
- “K, the keys”One row per position that can be looked up, compared with every query: shape .
- “V, the values”The content that gets mixed, one row per key: shape .
- “d k, the key dimension”The length of each query and key vector. The Transformer uses per head.
- “g t squared, element by element”In Adam, the square of every entry of the gradient vector (), not a dot product.
- “q phi of z given x, the encoder”In a VAE, the encoder: a distribution over codes for the input , with parameters .
- “p theta of x given z, the decoder”In a VAE, the decoder: how likely the input is to be rebuilt from the code .
- “the ELBO, L of theta and phi at x i”The evidence lower bound for data point : the number a VAE maximises. Parameters before the semicolon, data after (Chamber 4's the other way round).
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “with respect to” | Names the variable a derivative or an optimisation is taken over. The Adam paper computes “gradients w.r.t. stochastic objective”. | ||
| “minimise f of x subject to x at least zero” | In an optimisation problem, “s.t.” means subject to: it introduces the constraints the answer must satisfy. (In a definition, the same letters mean “such that”, as in Chamber 3.) | ||
| “f of dot” | The dot is a placeholder for “whatever argument goes here”, so means the function itself, not a value of it. The same dot turns up in norms, . | ||
| “x one to T” | The whole sequence . Colon ranges are everywhere in papers on sequences. | ||
| “x before t” | Everything before position : . The notation of language models, which predict each token from the ones before it. | ||
| “plus a constant” | Terms that don't depend on the variable of interest, lumped together and ignored because they don't change the argmin. | ||
| “the positive part of z” | Shorthand for , the ReLU of Chamber 4 in different clothes. Common in hinge losses. | ||
| “sim-equals, is estimated by” | A cousin of , called “sim-equals” after its LaTeX name, \simeq. The VAE paper uses it for “this sample average stands in for that expectation”. | ||
| “Q, the queries” | In attention, a matrix with one row per position that is asking: shape . | ||
| “K, the keys” | One row per position that can be looked up, compared with every query: shape . | ||
| “V, the values” | The content that gets mixed, one row per key: shape . | ||
| “d k, the key dimension” | The length of each query and key vector. The Transformer uses per head. | ||
| “g t squared, element by element” | In Adam, the square of every entry of the gradient vector (), not a dot product. | ||
| “q phi of z given x, the encoder” | In a VAE, the encoder: a distribution over codes for the input , with parameters . | ||
| “p theta of x given z, the decoder” | In a VAE, the decoder: how likely the input is to be rebuilt from the code . | ||
| “the ELBO, L of theta and phi at x i” | The evidence lower bound for data point : the number a VAE maximises. Parameters before the semicolon, data after (Chamber 4's the other way round). |
Linear Algebra for Machine Learning · Chamber 1
Vectors: Arrows, Lists and Data
- “R n”Every list of real numbers: the space the vectors live in. is the plane, ordinary space.
- “the column vector v one, v two”A vector written as a column. Its entries are the arrow's coordinates. In running text it's written to save space.
- “vector P Q”The arrow from point to point : “destination minus start”.
- “u plus v”Add entry by entry. As arrows: put the tail of at the tip of (tip to tail).
- “c times v”Scalar multiplication: multiply every entry by the number . Stretches or shrinks the arrow by , and flips it if .
- “minus v”The negative of : the same length, pointing the opposite way. It equals .
- “u minus v”. Drawn from the origin, it's the arrow from the tip of to the tip of .
- “the zero vector”Every entry zero. Adding it changes nothing, and it has no direction.
- “e i”The -th standard basis vector: 1 in position , 0 everywhere else. In machine learning it's called a one-hot vector.
- “the sum of c i times v i”A linear combination: scale each vector by its coefficient , then add the results.
- “x king”A word embedding: the learned vector for one word. Here the subscript names the word, not a position.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “R n” | Every list of real numbers: the space the vectors live in. is the plane, ordinary space. | ||
| “the column vector v one, v two” | A vector written as a column. Its entries are the arrow's coordinates. In running text it's written to save space. | ||
| “vector P Q” | The arrow from point to point : “destination minus start”. | ||
| “u plus v” | Add entry by entry. As arrows: put the tail of at the tip of (tip to tail). | ||
| “c times v” | Scalar multiplication: multiply every entry by the number . Stretches or shrinks the arrow by , and flips it if . | ||
| “minus v” | The negative of : the same length, pointing the opposite way. It equals . | ||
| “u minus v” | . Drawn from the origin, it's the arrow from the tip of to the tip of . | ||
| “the zero vector” | Every entry zero. Adding it changes nothing, and it has no direction. | ||
| “e i” | The -th standard basis vector: 1 in position , 0 everywhere else. In machine learning it's called a one-hot vector. | ||
| “the sum of c i times v i” | A linear combination: scale each vector by its coefficient , then add the results. | ||
| “x king” | A word embedding: the learned vector for one word. Here the subscript names the word, not a position. |
Linear Algebra for Machine Learning · Chamber 2
Dot Products, Lengths and Angles
- “u dot v”The dot product: multiply matching entries and add. The result is a single number.
- “u transpose v”The same dot product, written as a row times a column. The usual form in machine learning papers.
- “the inner product of u and v”Angle-bracket notation for the dot product, common in maths and theory papers.
- “the norm of v”The length of . With no subscript it nearly always means the Euclidean norm .
- “the two-norm of v”Euclidean length: . Also called the norm.
- “the one-norm of v”The sum of the absolute values of the entries: distance along a grid of streets (the taxicab or Manhattan norm).
- “the infinity-norm of v”The largest absolute value of any entry (the max norm).
- “v hat”The unit vector in the direction of . On a vector, a hat often means “normalised” rather than “estimated”.
- “the distance between u and v”The length of the arrow from the tip of to the tip of .
- “cos theta”The cosine of the angle between two vectors, known in machine learning as their cosine similarity. Always between and .
- “u is perpendicular to v”Orthogonal: at right angles, which means .
- “the projection of u onto v”The shadow of on the line through : the point of that line closest to the tip of .
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “u dot v” | The dot product: multiply matching entries and add. The result is a single number. | ||
| “u transpose v” | The same dot product, written as a row times a column. The usual form in machine learning papers. | ||
| “the inner product of u and v” | Angle-bracket notation for the dot product, common in maths and theory papers. | ||
| “the norm of v” | The length of . With no subscript it nearly always means the Euclidean norm . | ||
| “the two-norm of v” | Euclidean length: . Also called the norm. | ||
| “the one-norm of v” | The sum of the absolute values of the entries: distance along a grid of streets (the taxicab or Manhattan norm). | ||
| “the infinity-norm of v” | The largest absolute value of any entry (the max norm). | ||
| “v hat” | The unit vector in the direction of . On a vector, a hat often means “normalised” rather than “estimated”. | ||
| “the distance between u and v” | The length of the arrow from the tip of to the tip of . | ||
| “cos theta” | The cosine of the angle between two vectors, known in machine learning as their cosine similarity. Always between and . | ||
| “u is perpendicular to v” | Orthogonal: at right angles, which means . | ||
| “the projection of u onto v” | The shadow of on the line through : the point of that line closest to the tip of . |
Linear Algebra for Machine Learning · Chamber 3
Span, Basis and Dimension
- “the span of v one to v k”Every linear combination with real coefficients: all the points these vectors can reach.
- “the zero subspace”The set whose only element is the zero vector. The smallest subspace there is, and the span of alone.
- “a dependency relation”A combination that lands on . If one exists with some , the vectors are dependent; if only all-zero coefficients work, they are independent.
- “the determinant of u and v”For two vectors in the plane, : the signed area of the parallelogram they span. Zero exactly when they are dependent. Chamber 5 builds determinants in general.
- “the basis B”An ordered list of vectors that is linearly independent and spans the space. Bases usually get calligraphic letters.
- “the coordinates of x in basis B”The unique coefficients with . Same arrow, different ruler.
- “the dimension of U”The number of vectors in any basis of the subspace . All bases of have the same size.
- “d int, the intrinsic dimension”From Li et al. (2018): the number of directions that actually matter for solving a problem, , where is the dimension of the solution set.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “the span of v one to v k” | Every linear combination with real coefficients: all the points these vectors can reach. | ||
| “the zero subspace” | The set whose only element is the zero vector. The smallest subspace there is, and the span of alone. | ||
| “a dependency relation” | A combination that lands on . If one exists with some , the vectors are dependent; if only all-zero coefficients work, they are independent. | ||
| “the determinant of u and v” | For two vectors in the plane, : the signed area of the parallelogram they span. Zero exactly when they are dependent. Chamber 5 builds determinants in general. | ||
| “the basis B” | An ordered list of vectors that is linearly independent and spans the space. Bases usually get calligraphic letters. | ||
| “the coordinates of x in basis B” | The unique coefficients with . Same arrow, different ruler. | ||
| “the dimension of U” | The number of vectors in any basis of the subspace . All bases of have the same size. | ||
| “d int, the intrinsic dimension” | From Li et al. (2018): the number of directions that actually matter for solving a problem, , where is the dimension of the solution set. |
Linear Algebra for Machine Learning · Chamber 4
Matrices as Transformations
- “T maps R n to R m”A function that takes vectors with entries to vectors with entries. It is linear if it respects sums and scalings.
- “A times x”Apply the matrix to the vector: the combination of 's columns, weighted by the entries of .
- “a j, the j-th column of A”Where the -th standard basis vector lands. The columns of a matrix are the images of the basis vectors.
- “A B, or A after B”The composition: apply first, then . Products are read right to left, like .
- “R theta, rotation by theta”The matrix that rotates the plane anticlockwise by the angle .
- “det A, the determinant of A”The signed factor by which scales areas. Negative means orientation flips (like a mirror); zero means the plane is flattened.
- “the outer product of a and b”A column times a row: the matrix whose entry is . Every product is a sum of these, one per column of .
- “x maps to W x plus b”An affine map: a linear map followed by a shift. It is not linear unless , because it moves the origin to .
- “sigma of W x plus b”A neural-network layer: an affine map, then a nonlinearity (ReLU, tanh, …) applied to each entry separately.
- “x in homogeneous coordinates”The vector with a 1 appended. A matrix acting on it can shift as well as transform, because its last column gets added.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “T maps R n to R m” | A function that takes vectors with entries to vectors with entries. It is linear if it respects sums and scalings. | ||
| “A times x” | Apply the matrix to the vector: the combination of 's columns, weighted by the entries of . | ||
| “a j, the j-th column of A” | Where the -th standard basis vector lands. The columns of a matrix are the images of the basis vectors. | ||
| “A B, or A after B” | The composition: apply first, then . Products are read right to left, like . | ||
| “R theta, rotation by theta” | The matrix that rotates the plane anticlockwise by the angle . | ||
| “det A, the determinant of A” | The signed factor by which scales areas. Negative means orientation flips (like a mirror); zero means the plane is flattened. | ||
| “the outer product of a and b” | A column times a row: the matrix whose entry is . Every product is a sum of these, one per column of . | ||
| “x maps to W x plus b” | An affine map: a linear map followed by a shift. It is not linear unless , because it moves the origin to . | ||
| “sigma of W x plus b” | A neural-network layer: an affine map, then a nonlinearity (ReLU, tanh, …) applied to each entry separately. | ||
| “x in homogeneous coordinates” | The vector with a 1 appended. A matrix acting on it can shift as well as transform, because its last column gets added. |
Linear Algebra for Machine Learning · Chamber 5
Solving Systems: Elimination and Inverses
- “A augmented with b”The augmented matrix: the coefficients of with the right-hand side attached as an extra column. The bar marks where the equals signs were.
- “row i”The -th row of the matrix you're working on. Row operations are written in terms of these.
- “swap rows i and j”Exchange two rows. You need it when a pivot position holds a zero.
- “row i gets c times row i”Scale a row by a non-zero number , usually to make a pivot equal to 1.
- “row i gets row i plus c times row j”Add a multiple of another row. The workhorse of elimination: it creates the zeros below (and above) each pivot, and it never changes the determinant.
- “r r e f of A”The reduced row echelon form of : every pivot is 1, with zeros above and below it. Every matrix has exactly one.
- “A inverse”The matrix that undoes : . Only square matrices can have one, and not all do. It is not the matrix of reciprocals .
- “the n by n identity”Ones on the diagonal, zeros elsewhere: the matrix that changes nothing, . Written just when the size is clear.
- “det A”The determinant of a square matrix: the signed factor by which scales areas (in 2D) or volumes (in 3D and beyond). It is zero exactly when is singular.
- “the determinant of A, written with bars”Another way to write . Careful: in the bars mean absolute value, applied to the number .
- “the Jacobian of f at x”The matrix of partial derivatives , in the notation of the Real NVP paper. Near , behaves like this matrix, so its determinant is 's local volume scale.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “A augmented with b” | The augmented matrix: the coefficients of with the right-hand side attached as an extra column. The bar marks where the equals signs were. | ||
| “row i” | The -th row of the matrix you're working on. Row operations are written in terms of these. | ||
| “swap rows i and j” | Exchange two rows. You need it when a pivot position holds a zero. | ||
| “row i gets c times row i” | Scale a row by a non-zero number , usually to make a pivot equal to 1. | ||
| “row i gets row i plus c times row j” | Add a multiple of another row. The workhorse of elimination: it creates the zeros below (and above) each pivot, and it never changes the determinant. | ||
| “r r e f of A” | The reduced row echelon form of : every pivot is 1, with zeros above and below it. Every matrix has exactly one. | ||
| “A inverse” | The matrix that undoes : . Only square matrices can have one, and not all do. It is not the matrix of reciprocals . | ||
| “the n by n identity” | Ones on the diagonal, zeros elsewhere: the matrix that changes nothing, . Written just when the size is clear. | ||
| “det A” | The determinant of a square matrix: the signed factor by which scales areas (in 2D) or volumes (in 3D and beyond). It is zero exactly when is singular. | ||
| “the determinant of A, written with bars” | Another way to write . Careful: in the bars mean absolute value, applied to the number . | ||
| “the Jacobian of f at x” | The matrix of partial derivatives , in the notation of the Real NVP paper. Near , behaves like this matrix, so its determinant is 's local volume scale. |
Linear Algebra for Machine Learning · Chamber 6
Rank and the Four Subspaces
- “the column space of A”Every output , that is, every combination of the columns of . A subspace of . Also written , or .
- “the null space of A”Every input with : what destroys. A subspace of . Also called the kernel, .
- “the row space of A”Every combination of the rows of (the column space of ). A subspace of .
- “the left null space of A”Every with , equivalently . A subspace of .
- “the rank of A”The number of pivots, which is also the number of independent columns and the number of independent rows. Some books write .
- “the dimension of V”The number of vectors in any basis of the subspace (Chamber 3). The dimension of the null space is sometimes called the nullity.
- “u v transpose”The outer product of and : the matrix with entries . It has rank 1 when and are non-zero.
- “r is much less than the smaller of d and k”LoRA's condition on the rank of its update: far smaller than either side of the weight matrix.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “the column space of A” | Every output , that is, every combination of the columns of . A subspace of . Also written , or . | ||
| “the null space of A” | Every input with : what destroys. A subspace of . Also called the kernel, . | ||
| “the row space of A” | Every combination of the rows of (the column space of ). A subspace of . | ||
| “the left null space of A” | Every with , equivalently . A subspace of . | ||
| “the rank of A” | The number of pivots, which is also the number of independent columns and the number of independent rows. Some books write . | ||
| “the dimension of V” | The number of vectors in any basis of the subspace (Chamber 3). The dimension of the null space is sometimes called the nullity. | ||
| “u v transpose” | The outer product of and : the matrix with entries . It has rank 1 when and are non-zero. | ||
| “r is much less than the smaller of d and k” | LoRA's condition on the rank of its update: far smaller than either side of the weight matrix. |
Linear Algebra for Machine Learning · Chamber 7
Orthogonality and Least Squares
- “u is perpendicular to v”The vectors are orthogonal: their dot product is zero, . Also read “u is orthogonal to v”.
- “V perp”The orthogonal complement of a subspace : every vector that is perpendicular to all of . It is a subspace too.
- “q i transpose q j equals delta i j”The vectors are orthonormal: each has length 1 (when , ) and every pair is perpendicular (when , ). is the Kronecker delta.
- “Q transpose Q equals I”The columns of are orthonormal. When is square it is called an orthogonal matrix, and .
- “the projection of b onto a”The point on the line through that is closest to : the shadow of on that line.
- “P equals A, times A transpose A inverse, times A transpose”The projection matrix onto the column space of (whose columns are independent): is the closest point to in .
- “P squared equals P”Projecting twice changes nothing. Matrices with this property are called idempotent.
- “x hat”The least-squares solution of : the best compromise when no exact solution exists. As always, the hat marks an estimate.
- “e equals b minus A x hat”The error (or residual) vector: the part of the best fit can't reach. Statistics usually calls it .
- “A transpose A x hat equals A transpose b”The normal equations. They say the error is perpendicular (“normal”) to every column of .
- “the minimum over x of the squared length of b minus A x”The least-squares problem: choose to make the sum of squared errors as small as possible.
- “v k equals a k minus the sum over j less than k of q j transpose a k, times q j”One Gram–Schmidt step: strip from its projections onto the earlier directions, then normalise, .
- “A equals Q R”The QR factorisation: has orthonormal columns (from Gram–Schmidt) and is upper triangular.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “u is perpendicular to v” | The vectors are orthogonal: their dot product is zero, . Also read “u is orthogonal to v”. | ||
| “V perp” | The orthogonal complement of a subspace : every vector that is perpendicular to all of . It is a subspace too. | ||
| “q i transpose q j equals delta i j” | The vectors are orthonormal: each has length 1 (when , ) and every pair is perpendicular (when , ). is the Kronecker delta. | ||
| “Q transpose Q equals I” | The columns of are orthonormal. When is square it is called an orthogonal matrix, and . | ||
| “the projection of b onto a” | The point on the line through that is closest to : the shadow of on that line. | ||
| “P equals A, times A transpose A inverse, times A transpose” | The projection matrix onto the column space of (whose columns are independent): is the closest point to in . | ||
| “P squared equals P” | Projecting twice changes nothing. Matrices with this property are called idempotent. | ||
| “x hat” | The least-squares solution of : the best compromise when no exact solution exists. As always, the hat marks an estimate. | ||
| “e equals b minus A x hat” | The error (or residual) vector: the part of the best fit can't reach. Statistics usually calls it . | ||
| “A transpose A x hat equals A transpose b” | The normal equations. They say the error is perpendicular (“normal”) to every column of . | ||
| “the minimum over x of the squared length of b minus A x” | The least-squares problem: choose to make the sum of squared errors as small as possible. | ||
| “v k equals a k minus the sum over j less than k of q j transpose a k, times q j” | One Gram–Schmidt step: strip from its projections onto the earlier directions, then normalise, . | ||
| “A equals Q R” | The QR factorisation: has orthonormal columns (from Gram–Schmidt) and is upper triangular. |
Linear Algebra for Machine Learning · Chamber 8
Eigenvectors and Eigenvalues
- “A v equals lambda v”The eigenvalue equation: only stretches , by the factor , and never turns it off its line. A non-zero that satisfies it is an eigenvector, and is its eigenvalue.
- “lambda”An eigenvalue: the stretch factor. stretches, shrinks, a negative flips, and flattens the vector to .
- “det of A minus lambda I equals zero”The characteristic equation. Its solutions are exactly the eigenvalues of .
- “p of lambda”The characteristic polynomial , of degree for an matrix. For matrices it is .
- “trace of A”The trace: the sum of the diagonal entries. It always equals the sum of the eigenvalues.
- “the Rayleigh quotient of x”Exactly when is an eigenvector, and a good estimate of it when is close to one. Power iteration uses it to read off the eigenvalue.
- “capital lambda”The diagonal matrix of eigenvalues, .
- “A equals V capital lambda V inverse”Diagonalisation. The columns of are eigenvectors of . Reading right to left: change to eigen-coordinates (), stretch each coordinate (), change back ().
- “A to the k equals V capital lambda to the k V inverse”Powers of a diagonalisable matrix: the eigenvectors stay put and only the eigenvalues are raised to the -th power.
- “x k plus one equals A x k over the norm of A x k”Power iteration: multiply by and rescale, over and over. The direction converges to the eigenvector whose eigenvalue is largest in absolute value.
- “lambda one”Usually the dominant eigenvalue, the one largest in absolute value, when eigenvalues are listed by size. It controls the long-run growth of .
- “phi”The golden ratio : the dominant eigenvalue of the Fibonacci matrix.
- “P pi equals pi”(bold pi) is a stationary distribution of a Markov chain with transition matrix : an eigenvector with eigenvalue 1 whose entries are probabilities.
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “A v equals lambda v” | The eigenvalue equation: only stretches , by the factor , and never turns it off its line. A non-zero that satisfies it is an eigenvector, and is its eigenvalue. | ||
| “lambda” | An eigenvalue: the stretch factor. stretches, shrinks, a negative flips, and flattens the vector to . | ||
| “det of A minus lambda I equals zero” | The characteristic equation. Its solutions are exactly the eigenvalues of . | ||
| “p of lambda” | The characteristic polynomial , of degree for an matrix. For matrices it is . | ||
| “trace of A” | The trace: the sum of the diagonal entries. It always equals the sum of the eigenvalues. | ||
| “the Rayleigh quotient of x” | Exactly when is an eigenvector, and a good estimate of it when is close to one. Power iteration uses it to read off the eigenvalue. | ||
| “capital lambda” | The diagonal matrix of eigenvalues, . | ||
| “A equals V capital lambda V inverse” | Diagonalisation. The columns of are eigenvectors of . Reading right to left: change to eigen-coordinates (), stretch each coordinate (), change back (). | ||
| “A to the k equals V capital lambda to the k V inverse” | Powers of a diagonalisable matrix: the eigenvectors stay put and only the eigenvalues are raised to the -th power. | ||
| “x k plus one equals A x k over the norm of A x k” | Power iteration: multiply by and rescale, over and over. The direction converges to the eigenvector whose eigenvalue is largest in absolute value. | ||
| “lambda one” | Usually the dominant eigenvalue, the one largest in absolute value, when eigenvalues are listed by size. It controls the long-run growth of . | ||
| “phi” | The golden ratio : the dominant eigenvalue of the Fibonacci matrix. | ||
| “P pi equals pi” | (bold pi) is a stationary distribution of a Markov chain with transition matrix : an eigenvector with eigenvalue 1 whose entries are probabilities. |
Linear Algebra for Machine Learning · Chamber 9
SVD and PCA: The Shape of Data
- “A equals U sigma V transpose”The singular value decomposition: rotate with , stretch with , rotate with . Every real matrix has one.
- “sigma i”The -th singular value: how much stretches along its -th direction. Never negative, and sorted from largest to smallest.
- “capital sigma, the matrix”The matrix with on its diagonal and zeros everywhere else. In this chamber it is neither a sum nor a covariance.
- “u i, a left singular vector”Column of : a unit vector in the output space , the direction where the -th stretch lands.
- “v i, a right singular vector”Column of : a unit vector in the input space . It is an eigenvector of with eigenvalue .
- “A sub k”The truncated SVD: keep the first layers and drop the rest. It has rank , and it is the best rank- approximation of .
- “the Frobenius norm of A”The length of unrolled into one long vector: the square root of the sum of all squared entries. It equals .
- “the spectral norm of A”The biggest stretch applies to any unit vector. It equals the largest singular value.
- “x bar, the mean vector”The average data point. PCA subtracts it from every point first.
- “X centred”The data matrix (one point per row) with the mean subtracted from every row.
- “C, the covariance matrix”The matrix of covariances between features, with the variances on its diagonal. Symmetric, and its eigenvalues are never negative.
- “lambda i”The -th eigenvalue of : the variance of the data along the -th principal direction.
- “the explained variance ratio”The fraction of the total variance that component captures.
- “z i, the scores”The low-dimensional code for data point : its coordinates along the top principal directions.
- “S equals Q lambda Q transpose”The spectral theorem: a symmetric matrix has orthonormal eigenvectors (the columns of ) and real eigenvalues (the diagonal of ).
| Symbol | Say it | Meaning | LaTeX |
|---|---|---|---|
| “A equals U sigma V transpose” | The singular value decomposition: rotate with , stretch with , rotate with . Every real matrix has one. | ||
| “sigma i” | The -th singular value: how much stretches along its -th direction. Never negative, and sorted from largest to smallest. | ||
| “capital sigma, the matrix” | The matrix with on its diagonal and zeros everywhere else. In this chamber it is neither a sum nor a covariance. | ||
| “u i, a left singular vector” | Column of : a unit vector in the output space , the direction where the -th stretch lands. | ||
| “v i, a right singular vector” | Column of : a unit vector in the input space . It is an eigenvector of with eigenvalue . | ||
| “A sub k” | The truncated SVD: keep the first layers and drop the rest. It has rank , and it is the best rank- approximation of . | ||
| “the Frobenius norm of A” | The length of unrolled into one long vector: the square root of the sum of all squared entries. It equals . | ||
| “the spectral norm of A” | The biggest stretch applies to any unit vector. It equals the largest singular value. | ||
| “x bar, the mean vector” | The average data point. PCA subtracts it from every point first. | ||
| “X centred” | The data matrix (one point per row) with the mean subtracted from every row. | ||
| “C, the covariance matrix” | The matrix of covariances between features, with the variances on its diagonal. Symmetric, and its eigenvalues are never negative. | ||
| “lambda i” | The -th eigenvalue of : the variance of the data along the -th principal direction. | ||
| “the explained variance ratio” | The fraction of the total variance that component captures. | ||
| “z i, the scores” | The low-dimensional code for data point : its coordinates along the top principal directions. | ||
| “S equals Q lambda Q transpose” | The spectral theorem: a symmetric matrix has orthonormal eigenvectors (the columns of ) and real eigenvalues (the diagonal of ). |