Sparse vector (source code)

= Sparse vector
{title2=$|\operatorname{supp}x|\le s$}

A vector is s-sparse if it has at most $s$ nonzero coordinates. For $x\in\mathbb R^N$, its best s-term $\ell^1$ approximation error is $\sigma_s(x)=\min_{z\text{ s-sparse}}\|x-z\|_1$, equal to the sum of the absolute values of the coordinates outside the largest $s$.