Functions and operators

∑i=1Nxi\sum_{i=1}^{N} x_i Summation

Add up the expression for every value of the index, from the bottom limit to the top.

In ML papers

∑i=1Nxi\sum_{i=1}^{N} x_i means x1+x2+⋯+xNx_1 + x_2 + \dots + x_N: the index ii runs from the value below the sign to the value above it. Sometimes the range is a set, ∑x∈D\sum_{x \in \mathcal{D}}, or left implicit, ∑j\sum_j (over every valid jj). Losses average a sum over examples, 1N∑i=1Nℓi\frac{1}{N}\sum_{i=1}^N \ell_i; softmax's denominator sums over classes.

How to type it

LaTeXShows
\sum_{i=1}^{N}∑i=1N\sum_{i=1}^{N}

A worked example

∑i=13i2=1+4+9=14\sum_{i=1}^{3} i^2 = 1 + 4 + 9 = 14

Each term substitutes the next value of ii.

Common confusions

Equations that use it

Related

∏i=1Np(xi)\prod_{i=1}^{N} p(x_i)Productxi,  Wq,  pθ,  dmodelx_i,\; W_q,\; p_\theta,\; d_{\text{model}}Subscript (index or label)ab\frac{a}{b}Fraction∫p(x∣z) p(z) dz\int p(x \mid z)\, p(z)\, dzIntegral

Decode this example →