# Indicator function

An **indicator function** (also called a **characteristic function** of a set) is a function defined on a set X that reports membership in a subset A of X: it takes the value 1 on every element of A and the value 0 on every element of X outside A<sup>[1](https://users.math.msu.edu/users/banelson/files/lebesgue_integral.pdf)</sup>. The same object appears under two names and several notations, and it serves as the building block of measure theory, the bridge between counting and probability, and a proof device in combinatorics.

| Key fact | Detail |
|---|---|
| Definition | For A ⊆ X, the indicator χ_A(x) = 1 if x ∈ A and 0 otherwise<sup>[1](https://users.math.msu.edu/users/banelson/files/lebesgue_integral.pdf)</sup> |
| Notation | χ_A (χ from Greek χαρακτήρ), 1_A, or I_A; sometimes written with the Iverson bracket<sup>[2](https://encyclopediaofmath.org/wiki/Indicator_function)</sup><sup> • </sup><sup>[3](https://mathworld.wolfram.com/CharacteristicFunction.html)</sup> |
| Set algebra | χ_{E∩F} = χ_E χ_F, χ_{E^c} = 1 − χ_E, and 1_{E∨F} = 1_E + 1_F − 1_{E∧F}<sup>[4](https://terrytao.wordpress.com/2015/09/29/275a-notes-0-foundations-of-probability-theory/comment-page-1/)</sup> |
| Correspondence | The map A ↦ 1_A is a bijection from the power set of X onto the functions X → {0,1}<sup>[5](https://www.sciencedirect.com/topics/mathematics/indicator-function)</sup> |
| Expectation | For an event A, the indicator random variable satisfies E[1_A] = P(A)<sup>[6](https://www2.hawaii.edu/~berneyk/ics311/Notes/Topic-05A.html)</sup> |
| Role in integration | Simple functions, finite linear combinations of indicators, are the building blocks of the Lebesgue integral<sup>[1](https://users.math.msu.edu/users/banelson/files/lebesgue_integral.pdf)</sup> |
| Terminology caution | In probability, "characteristic function" means the Fourier transform of a distribution, an unrelated object<sup>[7](https://sites.math.duke.edu/~rtd/PTE/PTE5_011119.pdf)</sup> |

## Definition and notation

For a subset A of a larger set X, the indicator function is the function χ_A : X → ℝ defined by χ_A(x) = 1 if x ∈ A and χ_A(x) = 0 otherwise<sup>[1](https://users.math.msu.edu/users/banelson/files/lebesgue_integral.pdf)</sup>. The Encyclopedia of Mathematics lists the alternative symbols 1_E and ξ_E alongside χ_E, and notes that χ is the initial letter of the Greek word χαρακτήρ, the origin of the word "characteristic"<sup>[2](https://encyclopediaofmath.org/wiki/Indicator_function)</sup>. Wolfram MathWorld adds that characteristic functions are sometimes denoted with the Iverson bracket, a notation that turns a true-or-false condition directly into a 1 or 0<sup>[3](https://mathworld.wolfram.com/CharacteristicFunction.html)</sup>.

The definition is a perfect correspondence in both directions: every function on X taking only the values 0 and 1 is the indicator of some set, namely the set where it equals 1, and the map that assigns to each subset A its indicator 1_A is a bijection from the power set of X onto the set of all functions from X into {0,1}<sup>[2](https://encyclopediaofmath.org/wiki/Indicator_function)</sup><sup> • </sup><sup>[5](https://www.sciencedirect.com/topics/mathematics/indicator-function)</sup>. This lets set operations be replaced by equivalent arithmetic operations on functions<sup>[5](https://www.sciencedirect.com/topics/mathematics/indicator-function)</sup>.

## Algebra of indicators

Boolean operations on events correspond to arithmetic manipulations on their indicators<sup>[4](https://terrytao.wordpress.com/2015/09/29/275a-notes-0-foundations-of-probability-theory/comment-page-1/)</sup>. For events E and F:

- \( 1_{E \wedge F} = 1_E \cdot 1_F \), and the product of n indicators is the indicator of the n-fold intersection<sup>[4](https://terrytao.wordpress.com/2015/09/29/275a-notes-0-foundations-of-probability-theory/comment-page-1/)</sup><sup> • </sup><sup>[8](https://people.math.sc.edu/laszlo/indicator1.pdf)</sup>.
- \( 1_{\overline{E}} = 1 - 1_E \)<sup>[4](https://terrytao.wordpress.com/2015/09/29/275a-notes-0-foundations-of-probability-theory/comment-page-1/)</sup>.
- \( 1_{E \vee F} = 1_E + 1_F - 1_{E \wedge F} \), the inclusion-exclusion identity; if E and F are disjoint this reduces to \( 1_{E \vee F} = 1_E + 1_F \)<sup>[4](https://terrytao.wordpress.com/2015/09/29/275a-notes-0-foundations-of-probability-theory/comment-page-1/)</sup>.
- \( E \subseteq F \) if and only if \( 1_E \leq 1_F \)<sup>[4](https://terrytao.wordpress.com/2015/09/29/275a-notes-0-foundations-of-probability-theory/comment-page-1/)</sup>.

The LibreTexts probability text records the same identities in the language of indicator variables, adding \( \bs{1}_{A \cap B} = \min\{\bs{1}_A, \bs{1}_B\} \) and \( \bs{1}_{A \cup B} = \max\{\bs{1}_A, \bs{1}_B\} \)<sup>[9](https://stats.libretexts.org/Bookshelves/Probability_Theory/Probability_Mathematical_Statistics_and_Stochastic_Processes_%28Siegrist%29/02%3A_Probability_Spaces/2.02%3A_Events_and_Random_Variables)</sup>.

**Inclusion-exclusion.** These identities give a short proof of the inclusion-exclusion formula. Expanding the product \( (1 - \chi_1)(1 - \chi_2) \cdots (1 - \chi_n) \) and converting products of indicators to indicators of intersections yields an identity of functions for the complement of a union; summing over the universe U, where \( \sum_{x \in U} \chi_A(x) = |A| \), produces the usual counting formula for \( |A_1 \cup A_2 \cup \cdots \cup A_n| \) with alternating sums of intersection cardinalities<sup>[8](https://people.math.sc.edu/laszlo/indicator1.pdf)</sup>. The same notes derive Charles Jordan's formula for the number of elements belonging to exactly q of the sets from a corresponding indicator identity<sup>[8](https://people.math.sc.edu/laszlo/indicator1.pdf)</sup>.

## Role in measure theory and integration

Simple functions are the Lebesgue-integral analog of the step functions that underlie the [Riemann integral](https://www.edgepedia.org/riemann-integral). A function φ : ℝ → ℝ is a simple function if it is a finite linear combination of characteristic functions, \( \varphi = \sum_{i=1}^{n} a_i \chi_{S_i} \)<sup>[1](https://users.math.msu.edu/users/banelson/files/lebesgue_integral.pdf)</sup>. The coefficients and sets in such a representation need not be unique, but if the coefficients are required to be distinct and the sets are taken as \( S_i = \varphi^{-1}(a_i) \), the decomposition is unique and the sets are disjoint; this is the standard representation<sup>[1](https://users.math.msu.edu/users/banelson/files/lebesgue_integral.pdf)</sup>.

Measurability of an indicator reduces to measurability of its set: χ_S is Lebesgue (respectively Borel) measurable if and only if S belongs to the Lebesgue (respectively Borel) σ-algebra<sup>[1](https://users.math.msu.edu/users/banelson/files/lebesgue_integral.pdf)</sup>. In a general measure space, A is measurable if and only if χ_A is measurable<sup>[10](https://citeseerx.ist.psu.edu/document?doi=923f077aea09184e9cef5d60d06630a55db98966&repid=rep1&type=pdf)</sup>.

The integral of an indicator is the measure of its set. For a simple function in standard representation, the Lebesgue integral is \( \int \varphi \, dm = \sum_{i=1}^{n} a_i \, m(S_i) \), so for an indicator it is \( m(S) \)<sup>[1](https://users.math.msu.edu/users/banelson/files/lebesgue_integral.pdf)</sup>. Every nonnegative measurable function can be approximated pointwise by an increasing sequence of simple functions, which is how the Lebesgue integral is extended from simple functions to general measurable functions<sup>[10](https://citeseerx.ist.psu.edu/document?doi=923f077aea09184e9cef5d60d06630a55db98966&repid=rep1&type=pdf)</sup>.

The indicator of the rationals in [0, 1] illustrates the power of the theory. The function χ_{Q∩[0,1]} is not Riemann integrable, but since the rationals have [Lebesgue measure](https://www.edgepedia.org/lebesgue-measure) zero, its Lebesgue integral is \( m(\mathbb{Q} \cap [0,1]) = 0 \)<sup>[1](https://users.math.msu.edu/users/banelson/files/lebesgue_integral.pdf)</sup>.

## Indicator random variables

In probability, the indicator function of an event A is called the indicator variable of A; its value tells whether A occurred, 1 if it did and 0 if it did not<sup>[9](https://stats.libretexts.org/Bookshelves/Probability_Theory/Probability_Mathematical_Statistics_and_Stochastic_Processes_%28Siegrist%29/02%3A_Probability_Spaces/2.02%3A_Events_and_Random_Variables)</sup>. Any [random variable](https://www.edgepedia.org/random-variable) taking only the values 0 and 1 is the indicator variable of the event {X = 1}<sup>[9](https://stats.libretexts.org/Bookshelves/Probability_Theory/Probability_Mathematical_Statistics_and_Stochastic_Processes_%28Siegrist%29/02%3A_Probability_Spaces/2.02%3A_Events_and_Random_Variables)</sup>.

The central fact is that the expectation of an indicator is the probability of its event: for \( X_A = I\{A\} \), \( E[X_A] = 1 \cdot P\{A\} + 0 \cdot P\{\lnot A\} = P\{A\} \)<sup>[6](https://www2.hawaii.edu/~berneyk/ics311/Notes/Topic-05A.html)</sup>. Combined with linearity of expectation, this turns a hard counting problem into a sum of easy probability questions. The method works even when the indicator variables are dependent: the expected value of a sum of indicators equals the sum of their expected values regardless of dependence<sup>[11](https://web.stanford.edu/class/archive/cs/cs109/cs109.1256/lectures/20_conditional_expectation.pdf)</sup>.

**Worked applications.** The expected number of heads in n fair coin flips is computed by writing the count as \( X = \sum_{i=1}^{n} X_i \) with \( X_i = I\{\text{the } i\text{th flip is heads}\} \); each \( E[X_i] = 1/2 \), so \( E[X] = n/2 \) without enumerating the binomial distribution<sup>[6](https://www2.hawaii.edu/~berneyk/ics311/Notes/Topic-05A.html)</sup>. In the hiring problem, where candidates arrive in random order and candidate i is hired exactly when better than all predecessors, \( P\{\text{candidate } i \text{ is best so far}\} = 1/i \), so the expected number of hires is the harmonic number \( \sum_{i=1}^{n} 1/i \) and the expected hiring cost is \( O(c_h \ln n) \), against a worst case of \( O(c_h n) \)<sup>[6](https://www2.hawaii.edu/~berneyk/ics311/Notes/Topic-05A.html)</sup>. For the expected number of inversions in a random permutation, the indicator for a pair (i, j) with i < j has \( P\{A[i] > A[j]\} = 1/2 \), and summing over all pairs gives the expectation without examining whole permutations<sup>[6](https://www2.hawaii.edu/~berneyk/ics311/Notes/Topic-05A.html)</sup>. The same technique computes expected numbers of successful outcomes, hash collisions, or instruction counts<sup>[11](https://web.stanford.edu/class/archive/cs/cs109/cs109.1256/lectures/20_conditional_expectation.pdf)</sup>, and nearly every counting argument in randomized algorithm analysis is a sum of indicators<sup>[12](https://www.kevos.com/engineering/random-variables)</sup>.

## Terminology and related uses

The word "characteristic" carries two unrelated meanings. Analysts call 1_A the characteristic function of A, but in probability that term is reserved for the [Fourier transform](https://www.edgepedia.org/fourier-transform) of a distribution, \( \varphi(t) = \int e^{itx} P(x)\,dx \), which is why probability texts such as Durrett's avoid the name for indicators<sup>[7](https://sites.math.duke.edu/~rtd/PTE/PTE5_011119.pdf)</sup><sup> • </sup><sup>[3](https://mathworld.wolfram.com/CharacteristicFunction.html)</sup>.

A different convention appears in convex analysis, where the indicator function of a set C, denoted ι_C, takes the value 0 on C and +∞ outside it; it is used to encode constraints in optimization<sup>[13](https://www.ci2ma.udec.cl/pdf/pre-publicaciones2/2026/pp26-06.pdf)</sup>. Sums of indicator variables also appear in concentration inequalities: Chernoff-type bounds are known for the tail probabilities of random variables expressible as sums of indicators that are independent or negatively related<sup>[14](https://arxiv.org/abs/1609.00533)</sup>.

## References

1. [Brent Nelson, The Lebesgue Integral, lecture notes, Michigan State University](https://users.math.msu.edu/users/banelson/files/lebesgue_integral.pdf)
2. [Characteristic function of a set, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Indicator_function)
3. [Characteristic Function, Wolfram MathWorld](https://mathworld.wolfram.com/CharacteristicFunction.html)
4. [Terry Tao, 275A, Notes 0: Foundations of probability theory](https://terrytao.wordpress.com/2015/09/29/275a-notes-0-foundations-of-probability-theory/comment-page-1/)
5. [Indicator Function, ScienceDirect Topics](https://www.sciencedirect.com/topics/mathematics/indicator-function)
6. [ICS 311 #5A: Probabilistic Analysis, University of Hawaii](https://www2.hawaii.edu/~berneyk/ics311/Notes/Topic-05A.html)
7. [Rick Durrett, Probability: Theory and Examples, Chapter 1](https://sites.math.duke.edu/~rtd/PTE/PTE5_011119.pdf)
8. [Notes on Inclusion-Exclusion and Indicator Functions, University of South Carolina](https://people.math.sc.edu/laszlo/indicator1.pdf)
9. [Events and Random Variables, Statistics LibreTexts (Siegrist)](https://stats.libretexts.org/Bookshelves/Probability_Theory/Probability_Mathematical_Statistics_and_Stochastic_Processes_%28Siegrist%29/02%3A_Probability_Spaces/2.02%3A_Events_and_Random_Variables)
10. [Lebesgue integral theory, CiteSeerX](https://citeseerx.ist.psu.edu/document?doi=923f077aea09184e9cef5d60d06630a55db98966&repid=rep1&type=pdf)
11. [CS109 Lecture 20: Conditional Expectation, Stanford University](https://web.stanford.edu/class/archive/cs/cs109/cs109.1256/lectures/20_conditional_expectation.pdf)
12. [Random Variables, KEVOS](https://www.kevos.com/engineering/random-variables)
13. [Universidad de Concepción preprint pp26-06, CI²MA](https://www.ci2ma.udec.cl/pdf/pre-publicaciones2/2026/pp26-06.pdf)
14. [Large deviation inequalities for sums of indicator variables, arXiv:1609.00533](https://arxiv.org/abs/1609.00533)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Logic and discrete mathematics › Formal logic and foundations › Set theory › Elementary set theory*

*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
