Characteristic function

In set theory, the characteristic function or indicator function of a subset A of a set X is the function, often denoted χA or IA, from X to the set {0,1} which takes the value 1 on elements of A and 0 otherwise.