In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, 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 is a subset of some set , then the indicator function of is the function
defined by
if
and
otherwise. Other common notations are and
The indicator function of is the
Iverson bracket 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
Given an arbitrary set , the indicator function of a subset of is the function
defined by
The
Iverson bracket provides the equivalent notation