Indicator function
In mathematics, an indicator function or a characteristic function of a subset of a set is a function that maps elements of the subset to one, and all other elements to zero. That is, if A is a subset of some set X, then the indicator function of A is the function defined by if and otherwise. Other common notations are 𝟙A and
The indicator function of A is the Iverson bracket of the property of belonging to A; that is,
For example, the Dirichlet function is the indicator function of the rational numbers as a subset of the real numbers.