Vectors and matrices

span⁡{v1,…,vk}\operatorname{span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} Span

Every vector you can make as a weighted sum of the given vectors.

In ML papers

span⁡{v1,…,vk}\operatorname{span}\{\mathbf{v}_1, \ldots, \mathbf{v}_k\} is the set of all linear combinations c1v1+⋯+ckvkc_1 \mathbf{v}_1 + \cdots + c_k \mathbf{v}_k for any numbers cic_i. Two vectors that point in different directions span a plane; one vector spans a line.

Papers use it to talk about subspaces: the column space of WW is the span of its columns, and its dimension is the Rank of WW. An attention output, a weighted sum of value vectors, always lies in the span of those values.

How to type it

LaTeXShows
\operatorname{span}\{\mathbf{v}_1, \mathbf{v}_2\}span⁡{v1,v2}\operatorname{span}\{\mathbf{v}_1, \mathbf{v}_2\}
\operatorname{Span}(S)Span⁡(S)\operatorname{Span}(S)

A worked example

span⁡{(1,0),(0,1)}=R2,span⁡{(1,2)}={(c,2c)}\operatorname{span}\{(1, 0), (0, 1)\} = \mathbb{R}^2, \quad \operatorname{span}\{(1, 2)\} = \{(c, 2c)\}

Two independent vectors fill the plane; one vector gives only the line through it.

Related

rank⁡(W)=r\operatorname{rank}(W) = rRank∑i=1Nxi\sum_{i=1}^{N} x_iSummationx∈Rd\mathbf{x} \in \mathbb{R}^{d}Bold lowercase (vector)D={(xi,yi)}i=1N\mathcal{D} = \{(\mathbf{x}_i, y_i)\}_{i=1}^{N}Set braces

Decode this example →