In
mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, an indicator function or a characteristic function of a
subset
In mathematics, Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are ...
of a
set is a
function that maps elements of the subset to one, and all other elements to zero. That is, if is a subset of some set , one has
if
and
otherwise, where
is a common notation for the indicator function. Other common notations are
and
The indicator function of is the
Iverson bracket
In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that generalises the Kronecker delta, which is the Iverson bracket of the statement . It maps any statement to a function of the free variables in that statement. ...
of the property of belonging to ; that is,
:
For example, the
Dirichlet function is the indicator function of the
rational numbers as a subset of the
real numbers.
Definition
The indicator function of a subset of a set is a function
defined as
The
Iverson bracket
In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that generalises the Kronecker delta, which is the Iverson bracket of the statement . It maps any statement to a function of the free variables in that statement. ...
provides the equivalent notation,