Cardinality of a vector

The cardinality of a vector x in mathbf{R}^n is the number of non-zero elements in it. It is sometimes called the l_0-norm of x, although the cardinality function is not a norm.

The cardinality is denoted mbox{bf Card}(x), or |x|_0.

For example, the vector

  x = (1,-2,0,0,4, -5)

has cardinality mbox{bf Card}(x) = 4.

The cardinality function is useful in many problems, however it is difficult to optimize. In cardinality minimization problems, the l_1-norm is often used as a surrogate.