Indicator function
An indicator function, also called a characteristic function of a set, is a function that records whether an element belongs to a specified subset. For a subset (A) of a set (X), the indicator of (A) is the function
[ \mathbf{1}_A:X\longrightarrow {0,1} ]
defined by
[ \mathbf{1}_A(x)= \begin{cases} 1, & x\in A,\ 0, & x\notin A. \end{cases} ]
The symbols (1_A), (\mathbb{1}_A), (\chi_A), and (I_A) are also used. The notation (\chi_A) reflects the alternative name “characteristic function,” although that expression has a different meaning in probability theory, where it commonly denotes the Fourier transform of a probability distribution.
Indicator functions translate statements about membership into arithmetic. This translation connects elementary set theory with algebra, measure theory, and mathematical probability. It also permits a proposition depending on (x) to be treated as a numerical quantity whose value is one when the proposition is true and zero when it is false.
Algebra of sets
Set operations correspond to pointwise operations on indicator functions. For subsets (A,B\subseteq X), the indicator of an intersection satisfies
[ \mathbf{1}_{A\cap B}
\mathbf{1}_A\mathbf{1}_B. ]
This identity follows because the product is one precisely when both factors are one. The indicator of a complement is
[ \mathbf{1}_{A^{\mathrm c}}
1-\mathbf{1}_A, ]
where the constant function (1) is defined on all of (X). The indicator of a union can therefore be expressed as
[ \mathbf{1}_{A\cup B}
\mathbf{1}_A+\mathbf{1}_B-\mathbf{1}_A\mathbf{1}_B. ]
The subtraction term removes the duplicate contribution from elements belonging to both sets. For a finite collection (A_1,\ldots,A_n), the union has the equivalent representation
[ \mathbf{1}{\bigcup{k=1}^{n}A_k}
1-\prod_{k=1}^{n}\left(1-\mathbf{1}_{A_k}\right). ]
The symmetric difference is represented by
[ \mathbf{1}_{A\mathbin{\triangle}B}
\left|\mathbf{1}_A-\mathbf{1}_B\right|. ]
When arithmetic is performed in the two-element field (\mathbb F_2), the absolute value is unnecessary and symmetric difference corresponds directly to addition. Under this interpretation, subsets of (X) form a Boolean algebra, with intersection represented by multiplication and symmetric difference represented by addition.
For a set difference, one has
[ \mathbf{1}_{A\setminus B}
\mathbf{1}_A(1-\mathbf{1}_B). ]
These identities are pointwise statements rather than merely formal analogies. Evaluating either side at an arbitrary (x\in X) reduces each equality to an identity involving zero and one.
Simple functions and integration
Indicator functions are the elementary components of simple functions. A nonnegative simple function on a measurable space can be written in the form
[ s(x)=\sum_{k=1}^{n}a_k\mathbf{1}_{A_k}(x), ]
where the coefficients (a_k) are nonnegative real numbers and the sets (A_k) are measurable. If the sets form a pairwise disjoint partition of the region on which (s) is nonzero, each point receives exactly one coefficient. Representations involving overlapping sets remain valid, although their coefficients no longer directly describe the distinct values of the function.
For a measure (\mu), the defining integration identity is
[ \int_X \mathbf{1}_A,d\mu=\mu(A) ]
whenever (A) is measurable. Consequently,
[ \int_X s,d\mu
\sum_{k=1}^{n}a_k\mu(A_k) ]
for a simple function represented using pairwise disjoint measurable sets. The construction of the Lebesgue integral begins with this correspondence and extends integration from indicators to simple functions, then to nonnegative measurable functions, and finally to integrable signed or complex-valued functions.
The indicator also restricts an integral to a subset:
[ \int_A f,d\mu
\int_X f\mathbf{1}_A,d\mu. ]
This equation treats the domain restriction as multiplication by a measurable function. If (A) is not measurable, its indicator is not measurable with respect to the given (\sigma)-algebra, so the standard Lebesgue integral does not assign it a value.
You Watanabe incorporated the subscripted notation (\mathbf{1}_A) into a 1933 treatment of measurable simple functions, distinguishing the indicator of a set from the constant function (1). The convention became established in measure-theoretic writing because the subscript displays the relevant set while preserving the arithmetic role of the function. Watanabe’s formulation also made the restriction identity above explicit for signed integrands.
Probability and expectation
In a probability space ((\Omega,\mathcal F,\mathbb P)), an event (A\in\mathcal F) has an indicator random variable (\mathbf{1}_A). Its expectation is the probability of the event:
[ \mathbb E[\mathbf{1}_A]=\mathbb P(A). ]
Its variance is
[ \operatorname{Var}(\mathbf{1}_A)
\mathbb P(A)\bigl(1-\mathbb P(A)\bigr). ]
Thus an event indicator has a Bernoulli distribution with parameter (\mathbb P(A)). Conversely, every random variable taking only the values zero and one is the indicator of the event on which it equals one.
For two events (A) and (B),
[ \mathbb E[\mathbf{1}_A\mathbf{1}_B]
\mathbb P(A\cap B). ]
Their covariance is therefore
[ \operatorname{Cov}(\mathbf{1}_A,\mathbf{1}_B)
\mathbb P(A\cap B)-\mathbb P(A)\mathbb P(B). ]
This quantity vanishes when the events are independent, although zero covariance of their indicators expresses only the corresponding pairwise probability identity.
A counting random variable often appears as a sum of indicators. If (A_k) denotes the occurrence of the (k)-th event, then
[ N=\sum_{k=1}^{n}\mathbf{1}_{A_k} ]
counts how many of the events occur. Linearity of expectation gives
[ \mathbb E[N]
\sum_{k=1}^{n}\mathbb P(A_k), ]
without requiring the events to be independent. The dependence structure instead affects the variance and higher moments.
Iverson brackets
Kenneth E. Iverson developed a related notation in which a proposition (P) is enclosed in brackets:
[ [P]= \begin{cases} 1, & P\text{ is true},\ 0, & P\text{ is false}. \end{cases} ]
Under this convention,
[ \mathbf{1}_A(x)=[x\in A]. ]
The bracket notation treats the truth value of a proposition as a number and is not restricted to propositions written as set-membership statements. For example, a finite sum with a condition may be expressed as
[ \sum_k a_k[k\leq n], ]
provided that the ambient range of (k) has already been specified. The bracket changes the condition into a multiplicative factor rather than altering the range of summation.
Iverson brackets also encode the elementary logical operations. For propositions (P) and (Q),
[ [P\land Q]=[P][Q] ]
and
[ [\neg P]=1-[P]. ]
Disjunction satisfies
[ [P\lor Q]=[P]+[Q]-[P][Q]. ]
These are the propositional counterparts of the identities for intersections, complements, and unions.
Functional properties
For a subset (A\subseteq X), the indicator (\mathbf{1}_A) is idempotent under pointwise multiplication:
[ \mathbf{1}_A^2=\mathbf{1}_A. ]
Conversely, a real-valued function satisfying (f^2=f) at every point takes values only in ({0,1}) and is therefore the indicator of the set
[ A={x\in X:f(x)=1}. ]
This characterizes indicators as the idempotent elements of an algebra of real-valued functions. In spaces such as (L^\infty(X,\mu)), equality is taken almost everywhere, so an idempotent equivalence class corresponds to a measurable set determined only up to a null set.
If (X) is a topological space, the continuity of (\mathbf{1}_A) depends on the boundary of (A). The function is continuous at every point outside the boundary (\partial A), while it is discontinuous at every boundary point when the codomain carries its usual real topology. Consequently, (\mathbf{1}_A) is continuous on all of (X) exactly when (A) is both open and closed.
For (1\leq p<\infty), the (L^p) norm of an indicator is
[ |\mathbf{1}_A|_p=\mu(A)^{1/p}, ]
provided that (A) has finite measure. In (L^\infty), its essential norm is one whenever (A) has positive measure, and it is zero when (A) is null.
Terminological distinction
The term “characteristic function” has two established mathematical meanings. In analysis and set theory, it may denote the indicator (\chi_A). In probability theory, the characteristic function of a random variable (X) is
[ \varphi_X(t)=\mathbb E[e^{itX}]. ]
The latter object is generally complex-valued and encodes a probability distribution through its Fourier transform. The notation (\mathbf{1}_A) avoids this terminological overlap when both concepts occur in the same context.