In mathematics, an indicator function or a characteristic function is a function defined on a set X that indicates membership of an element in a subset A of X, having the value 1 for all elements of A and the value 0 for all elements of X not in A. It is usually denoted by a symbol 1 or I, sometimes in boldface or blackboard boldface, with a subscript describing the set.
The indicator function of a subset A of a set X is a function
defined as
The Iverson bracket allows the equivalent notation, , to be used instead of .
The function is sometimes denoted , , KA or even just . (The Greek letter appears because it is the initial letter of the Greek word χαρακτήρ, which is the ultimate origin of the word characteristic.)