Discord

2Foundational Skills 2.3Mathematics Basics

2.3.1 Terms and Symbols Used in AI

Read the mathematical notation used throughout AI, from datasets and functions to vectors, probability, calculus and optimisation.

Mathematical notation lets us describe data, models and operations precisely. This page is a reference for the symbols used throughout the guide. You do not need to memorise everything at once; return here whenever unfamiliar notation appears.

Letter styles and decorations

The style of a letter often tells you what kind of object it represents.

Notation Meaning
xx Usually a scalar, meaning one numerical value.
x\mathbf{x} Usually a vector, meaning an ordered list of values.
XX Usually a matrix or a collection of data.
X\mathcal{X} Usually a set or a space of possible values.
θ\theta Commonly a parameter or a collection of model parameters.
i,j,ki,j,k Commonly indices used to identify positions or items.
m,n,d,pm,n,d,p Commonly sizes, counts or dimensions.
x^\hat{x} An estimated or predicted value of xx.
xˉ\bar{x} The average of a collection of values named xx.
x~\tilde{x} A transformed, adjusted or approximate version of xx.
x∗x^* An optimal, selected or otherwise distinguished value of xx.
x′x' A modified or alternative version of xx.
x(i)x^{(i)} The ii-th observation or item.
xix_i The ii-th component of xx.
xijx_{ij} The entry at row ii and column jj.
x2x^2 xx raised to the power 22.
X⊤X^\top The transpose of XX.
X−1X^{-1} The inverse of XX, when it exists.

Common AI and data notation

These conventions appear frequently in machine learning, although an author may choose different letters.

Notation Meaning
XX The input data or feature matrix.
x\mathbf{x} One input example or feature vector.
xjx_j The jj-th feature of an input.
x(i)\mathbf{x}^{(i)} The ii-th input example.
xj(i)x_j^{(i)} The jj-th feature of the ii-th example.
y\mathbf{y} A collection of target or output values.
y(i)y^{(i)} The target associated with the ii-th example.
y^\hat{y} A predicted output.
y^\hat{\mathbf{y}} A collection of predicted outputs.
D\mathcal{D} A dataset.
nn or mm The number of examples, depending on the convention being used.
dd or pp The number of features or dimensions.
kk or cc The number of classes or groups.
w\mathbf{w} A vector of weights.
bb A bias or intercept.
θ\theta The parameters of a model.
ff A function or model.
fθf_\theta A function or model controlled by parameters θ\theta.
L\mathcal{L} A loss or objective function.
λ\lambda A coefficient or weighting value whose exact meaning depends on context.

Number systems and special values

Notation Meaning
N\mathbb{N} The set of natural numbers.
Z\mathbb{Z} The set of integers.
Q\mathbb{Q} The set of rational numbers.
R\mathbb{R} The set of real numbers.
C\mathbb{C} The set of complex numbers.
Rd\mathbb{R}^d The set of real-valued vectors with dd components.
Rm×n\mathbb{R}^{m\times n} The set of real-valued matrices with mm rows and nn columns.
00 The number zero.
0\mathbf{0} A vector or matrix containing only zeros.
11 The number one.
1\mathbf{1} A vector or matrix containing only ones.
∞\infty Infinity or an unbounded quantity.
π\pi The mathematical constant pi.
ee The base of the natural logarithm.

Some sources include 00 in N\mathbb{N} and others begin at 11, so the intended definition should be stated when it matters.

Equality, comparison and approximation

Notation Meaning
a=ba=b aa is equal to bb.
a≠ba\neq b aa is not equal to bb.
a≈ba\approx b aa is approximately equal to bb.
a≡ba\equiv b aa and bb are identical, equivalent or equal by definition, depending on context.
a:=ba:=b aa is defined to be bb.
a∝ba\propto b aa is proportional to bb.
a<ba<b aa is less than bb.
a>ba>b aa is greater than bb.
a≤ba\leq b aa is less than or equal to bb.
a≥ba\geq b aa is greater than or equal to bb.
a≪ba\ll b aa is much smaller than bb.
a≫ba\gg b aa is much larger than bb.

Basic arithmetic

Notation Meaning
a+ba+b The sum of aa and bb.
a−ba-b The difference between aa and bb.
abab, a⋅ba\cdot b or a×ba\times b The product of aa and bb.
ab\frac{a}{b} aa divided by bb.
aba^b aa raised to the power bb.
x\sqrt{x} The square root of xx.
xn\sqrt[n]{x} The nn-th root of xx.
∣x∣\lvert x\rvert The absolute value of the number xx.
a mod ba\bmod b The remainder after dividing aa by bb.
⌊x⌋\lfloor x\rfloor xx rounded down to the nearest integer.
⌈x⌉\lceil x\rceil xx rounded up to the nearest integer.
±\pm Plus or minus.
1x\frac{1}{x} The reciprocal of xx.

Sets and intervals

Notation Meaning
AA A set.
{a,b,c}\{a,b,c\} A set containing the listed elements.
{x:P(x)}\{x:P(x)\} The set of values xx for which condition P(x)P(x) is true.
x∈Ax\in A xx belongs to set AA.
x∉Ax\notin A xx does not belong to set AA.
A⊆BA\subseteq B Every element of AA also belongs to BB.
A⊂BA\subset B AA is a proper subset of BB.
A⊇BA\supseteq B AA contains every element of BB.
A∪BA\cup B The union of AA and BB.
A∩BA\cap B The intersection of AA and BB.
A∖BA\setminus B The elements in AA that are not in BB.
AcA^c The complement of AA.
∅\varnothing The empty set.
∣A∣\lvert A\rvert The number of elements in set AA.
A×BA\times B The Cartesian product of AA and BB.
[a,b][a,b] The interval from aa to bb containing both endpoints.
(a,b)(a,b) The interval from aa to bb excluding both endpoints.
[a,b)[a,b) The interval containing aa but excluding bb.
(a,b](a,b] The interval excluding aa but containing bb.

Logic

Notation Meaning
¬P\neg P Statement PP is false.
P∧QP\land Q Both PP and QQ are true.
P∨QP\lor Q At least one of PP or QQ is true.
P⇒QP\Rightarrow Q PP implies QQ.
P⇔QP\Leftrightarrow Q PP and QQ are logically equivalent.
∀x\forall x For every value of xx.
∃x\exists x There exists at least one value of xx.
∄x\nexists x No such value of xx exists.
1[P]\mathbb{1}[P] The indicator that equals 11 when PP is true and 00 otherwise.

Functions and mappings

Notation Meaning
f(x)f(x) The output of function ff for input xx.
f:A→Bf:A\rightarrow B Function ff maps values from set AA to set BB.
x↦f(x)x\mapsto f(x) Input xx is mapped to output f(x)f(x).
f∘gf\circ g The composition that applies gg and then applies ff.
f−1f^{-1} The inverse of function ff, when it exists.
dom⁡(f)\operatorname{dom}(f) The domain of ff, containing its allowed inputs.
range⁡(f)\operatorname{range}(f) The range of ff, containing the outputs it produces.
log⁡(x)\log(x) A logarithm whose base depends on context.
ln⁡(x)\ln(x) The natural logarithm of xx.
log⁡b(x)\log_b(x) The logarithm of xx to base bb.
exp⁡(x)\exp(x) The exponential function exe^x.

The notation f−1f^{-1} means an inverse function, while x−1x^{-1} usually means the reciprocal of a number or the inverse of a matrix.

Indices, sequences and collections

Notation Meaning
xix_i The item at index ii.
xi:jx_{i:j} A range or slice of items from index ii to index jj, with endpoint rules depending on context.
(x1,…,xn)(x_1,\ldots,x_n) An ordered sequence of nn values.
{xi}i=1n\{x_i\}_{i=1}^{n} A collection indexed from 11 through nn.
i=1,…,ni=1,\ldots,n Index ii takes the integer values from 11 through nn.
AijA_{ij} The entry in row ii and column jj of matrix AA.
Ai:A_{i:} The ii-th row of AA.
A:jA_{:j} The jj-th column of AA.
∣x∣\lvert\mathbf{x}\rvert The number of items in a sequence when used in that context.
…\ldots Values have been omitted because the pattern is understood.

Sums, products and reductions

Notation Meaning
∑i=1nxi\sum_{i=1}^{n}x_i The sum of the values x1x_1 through xnx_n.
∏i=1nxi\prod_{i=1}^{n}x_i The product of the values x1x_1 through xnx_n.
min⁡(x1,…,xn)\min(x_1,\ldots,x_n) The smallest of the listed values.
max⁡(x1,…,xn)\max(x_1,\ldots,x_n) The largest of the listed values.
min⁡x∈Sf(x)\min_{x\in S}f(x) The smallest value produced by f(x)f(x) over SS.
max⁡x∈Sf(x)\max_{x\in S}f(x) The largest value produced by f(x)f(x) over SS.
arg⁡min⁡x∈Sf(x)\arg\min_{x\in S}f(x) The value or values of xx at which f(x)f(x) is smallest.
arg⁡max⁡x∈Sf(x)\arg\max_{x\in S}f(x) The value or values of xx at which f(x)f(x) is largest.
mean⁡(x)\operatorname{mean}(x) The arithmetic average of the values in xx.

Vectors, matrices and tensors

Notation Meaning
x\mathbf{x} A vector.
XX A matrix.
T\mathcal{T} A tensor, when that convention is used.
x∈Rd\mathbf{x}\in\mathbb{R}^d x\mathbf{x} is a real-valued vector with dd components.
X∈Rm×nX\in\mathbb{R}^{m\times n} XX is a real-valued matrix with mm rows and nn columns.
X⊤X^\top The transpose of XX.
X−1X^{-1} The inverse of XX, when it exists.
X+X^+ The pseudoinverse of XX.
II An identity matrix.
0\mathbf{0} A vector or matrix containing only zeros.
1\mathbf{1} A vector or matrix containing only ones.
ABAB The matrix product of AA and BB.
A⊙BA\odot B The elementwise product of AA and BB.
x⊤y\mathbf{x}^\top\mathbf{y} The dot product of vectors x\mathbf{x} and y\mathbf{y}.
∣x∣|\mathbf{x}| A norm measuring the size of vector x\mathbf{x}.
∣x∣1|\mathbf{x}|_1 The sum of the absolute values of the components of x\mathbf{x}.
∣x∣2|\mathbf{x}|_2 The Euclidean length of x\mathbf{x}.
∣X∣F|X|_F The Frobenius norm of matrix XX.
det⁡(X)\det(X) The determinant of square matrix XX.
tr⁡(X)\operatorname{tr}(X) The sum of the diagonal entries of square matrix XX.
rank⁡(X)\operatorname{rank}(X) The number of linearly independent rows or columns of XX.
Xi,:X_{i,:} The ii-th row of XX.
X:,jX_{:,j} The jj-th column of XX.
shape⁡(X)\operatorname{shape}(X) The dimensions of XX.

Calculus notation

This section introduces the symbols for recognition. The Calculus module explains the ideas behind them.

Notation Meaning
dydx\frac{dy}{dx} The derivative of yy with respect to xx.
f′(x)f'(x) The derivative of ff at xx.
∂f∂x\frac{\partial f}{\partial x} The partial derivative of ff with respect to xx.
∇f\nabla f The gradient of ff.
∇xf\nabla_{\mathbf{x}}f The gradient of ff with respect to vector x\mathbf{x}.
∫f(x) dx\int f(x)\,dx The indefinite integral of f(x)f(x).
∫abf(x) dx\int_a^b f(x)\,dx The definite integral of f(x)f(x) from aa to bb.
lim⁡x→af(x)\lim_{x\to a}f(x) The limit of f(x)f(x) as xx approaches aa.
Δx\Delta x A finite change in xx.

Probability notation

Notation Meaning
XX A random variable when used in a probability context.
xx A possible observed value of random variable XX.
P(A)P(A) The probability of event AA.
P(X=x)P(X=x) The probability that XX takes the value xx.
P(A∣B)P(A\mid B) The probability of AA given that BB has occurred.
P(A,B)P(A,B) The joint probability of AA and BB.
p(x)p(x) A probability mass or probability density value associated with xx.
p(x∣y)p(x\mid y) A conditional probability mass or density.
X∼PX\sim P Random variable XX follows distribution PP.
X⊥YX\perp Y Random variables XX and YY are independent.
E[X]\mathbb{E}[X] The expected value of XX.
Var⁡(X)\operatorname{Var}(X) The variance of XX.
Cov⁡(X,Y)\operatorname{Cov}(X,Y) The covariance of XX and YY.
Corr⁡(X,Y)\operatorname{Corr}(X,Y) The correlation between XX and YY.

Statistics and estimation notation

Notation Meaning
xˉ\bar{x} The sample mean.
μ\mu Commonly a population mean.
σ\sigma Commonly a population standard deviation.
σ2\sigma^2 Commonly a population variance.
ss Commonly a sample standard deviation.
s2s^2 Commonly a sample variance.
nn The number of observations.
θ^\hat{\theta} An estimate of parameter θ\theta.
x~\tilde{x} A transformed, adjusted or approximate version of xx.

Optimisation notation

Notation Meaning
f(x)f(x) A function being evaluated or optimised.
L(θ)\mathcal{L}(\theta) A loss or objective that depends on parameters θ\theta.
θ∗\theta^* An optimal value of θ\theta.
min⁡θL(θ)\min_\theta\mathcal{L}(\theta) The smallest loss obtainable by varying θ\theta.
arg⁡min⁡θL(θ)\arg\min_\theta\mathcal{L}(\theta) The parameter value or values that produce the smallest loss.
max⁡θf(θ)\max_\theta f(\theta) The largest value obtainable by varying θ\theta.
arg⁡max⁡θf(θ)\arg\max_\theta f(\theta) The parameter value or values that produce the largest value.
η\eta Commonly a step size or learning rate.
θt\theta_t The value of θ\theta at step tt.

Common mathematical and AI terms

Term Meaning
Scalar A single numerical value.
Variable A symbol whose value may change or be unknown.
Constant A value treated as fixed in the current context.
Coefficient A value that multiplies another quantity.
Parameter A value that controls a model or function.
Estimate A value calculated as an approximation of an unknown quantity.
Prediction An output produced by a model for given input data.
Feature An input property or measurement used by a model.
Target The value a supervised model is intended to predict.
Label A target value, especially a category in classification.
Observation One recorded item or example in a dataset.
Sample One observation or a collection drawn from a larger population, depending on context.
Dimension The number of components or independent directions in an object or space.
Shape The sizes of an array along each of its axes.
Index A value used to identify a position or item.
Axis A direction along which the entries of an array are arranged.
Vector An ordered one-dimensional collection of values.
Matrix A rectangular two-dimensional arrangement of values.
Tensor A multidimensional array of values.
Function A rule that assigns an output to each allowed input.
Input A value supplied to a function or model.
Output A value produced by a function or model.
Domain The set of inputs for which a function is defined.
Range The set of outputs a function actually produces.
Constraint A condition that an allowed value or solution must satisfy.
Objective A quantity that an optimisation process tries to minimise or maximise.
Loss A numerical measure of how wrong a prediction or model is.
Norm A function that measures the size or length of a vector or matrix.
Distance A measure of how far apart two objects are.
Distribution A description of how probability is assigned across possible values.
Event A set of possible outcomes in a probability setting.
Random variable A variable whose value is determined by a random outcome.
Expected value The probability-weighted average value of a random variable.
Variance A measure of how widely values vary around their mean.
Gradient A vector containing the partial derivatives of a scalar-valued function.
Derivative A measure of how a quantity changes as another quantity changes.

You are not expected to memorise this reference before continuing. Learn the notation as it appears, and return to this page whenever a symbol is unfamiliar.

Finished this module? Mark it done.

Comments

Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.

Loading comments