# Indicator function

In the mathematical subfield of set theory, the **indicator function**, or **characteristic function**, is a function defined on a set *X* which is used to indicate membership of an element in a subset *A* of *X*.

**Remark**. The term "characteristic function" has an unrelated meaning in probability theory; see characteristic function.

The indicator function of a subset *A* of a set *X* is a function

defined as

The indicator function of *A* is sometimes denoted

- or or even

(The Greek letter χ because it is the initial letter of the Greek etymon of the word *characteristic*.)

The Iverson bracket allows the notation .

**Warning**. The notation may signify the identity function.

## Basic properties

The mapping which associates a subset *A* of *X* to its indicator function 1_{A} is injective; its range is the set of functions *f*:*X* →{0,1}.

If *A* and *B* are two subsets of *X*, then

and

More generally, suppose *A*_{1}, ..., *A*_{n} is a collection of subsets of *X*. For any
*x* ∈ *X*,

is clearly a product of 0s and 1s. This product has the value 1 at
precisely those *x* ∈ *X* which belong to none of the sets *A*_{k} and
is 0 otherwise. That is

Expanding the product on the left hand side,

where |*F*| is the cardinality of *F*. This is one form of the principle of inclusion-exclusion.

As suggested by the previous example, the indicator function is a useful notational device in combinatorics. The notation is used in other places as well, for instance in probability theory: if *X* is a probability space with probability measure *P* and *A* is a measurable set, then *1 _{A}* becomes a random variable whose expected value is equal to the probability of

*A*:

This identity is used in a simple proof of Markov's inequality.

## References

- Folland, G.B.;
*Real Analysis: Modern Techniques and Their Applications*, 2nd ed, John Wiley & Sons, Inc., 1999.

## See also

*This article incorporates material from Characteristic function on PlanetMath, which is licensed under the GFDL.*

de:Charakteristische Funktion (Mathematik) it:Funzione indicatrice zh:指示函数