Maths for ML / Notation

xi, xij, x(i)x_i,\ x_{ij},\ x^{(i)}

subscripts & superscript indices

Linear algebraBeginner

Say it “x sub i / x i j / x superscript i”

xᵢ is the i-th entry of a vector; x_{ij} is row i, column j of a matrix; x⁽ⁱ⁾ (in parentheses) usually means the i-th training example — not a power.

Example

x2(3)\mathbf{x}^{(3)}_2

Feature 2 of training example 3.

In code

X[3, 2]
X[3, 2]

Where you’ll see it in ML

Reading index soup in loss functions and layer equations.

Don’t confuse it with

Lessons that use it

← All 94 symbols