Definition. The indicator function of a subset [00LM]

The indicator function or characteristic function of S\subseteq A is defined to be the predicate \chi _S\colon A\to {\mathopen {}\left [2\right ]\mathclose {}} defined piecewise below:

\chi _S{\mathopen {}\left (a\right )\mathclose {}} = \begin {cases} 1 & \text {if } a \in S\\ 0 & \text {if } a \not \in S \end {cases}