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
In mathematics, a Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they a ...
of a
set
Set, The Set, SET or SETS may refer to:
Science, technology, and mathematics Mathematics
*Set (mathematics), a collection of elements
*Category of sets, the category whose objects and morphisms are sets and total functions, respectively
Electro ...
is a
function
Function or functionality may refer to:
Computing
* Function key, a type of key on computer keyboards
* Function model, a structured representation of processes in a system
* Function object or functor or functionoid, a concept of object-orie ...
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
In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that generalises the Kronecker delta, which is the Iverson bracket of the statement . It maps any statement to a function of the free variables in that statement. ...
of the property of belonging to ; that is,
For example, the
Dirichlet function
In mathematics, the Dirichlet function is the indicator function \mathbf_\Q of the set of rational numbers \Q, i.e. \mathbf_\Q(x) = 1 if is a rational number and \mathbf_\Q(x) = 0 if is not a rational number (i.e. is an irrational number).
\mathb ...
is the indicator function of the
rational number
In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (for example,
The set of all ...
s as a subset of the
real number
In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s.
Definition
Given an arbitrary set , the indicator function of a subset of is the function
defined by
The
Iverson bracket
In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that generalises the Kronecker delta, which is the Iverson bracket of the statement . It maps any statement to a function of the free variables in that statement. ...
provides the equivalent notation
Notation and terminology
The notation
\chi_A is also used to denote the
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts:
* The indicator function of a subset, that is the function
\mathbf_A\colon X \to \,
which for a given subset ''A'' of ''X'', has value 1 at points ...
in
convex analysis
Convex analysis is the branch of mathematics devoted to the study of properties of convex functions and convex sets, often with applications in convex optimization, convex minimization, a subdomain of optimization (mathematics), optimization theor ...
, which is defined as if using the
reciprocal
Reciprocal may refer to:
In mathematics
* Multiplicative inverse, in mathematics, the number 1/''x'', which multiplied by ''x'' gives the product 1, also known as a ''reciprocal''
* Reciprocal polynomial, a polynomial obtained from another pol ...
of the standard definition of the indicator function.
A related concept in
statistics
Statistics (from German language, German: ', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a s ...
is that of a
dummy variable. (This must not be confused with "dummy variables" as that term is usually used in mathematics, also called a
bound variable
In mathematics, and in other disciplines involving formal languages, including mathematical logic and computer science, a variable may be said to be either free or bound. Some older books use the terms real variable and apparent variable for f ...
.)
The term "
characteristic function In mathematics, the term "characteristic function" can refer to any of several distinct concepts:
* The indicator function of a subset, that is the function
\mathbf_A\colon X \to \,
which for a given subset ''A'' of ''X'', has value 1 at points ...
" has an unrelated meaning in
classic probability theory. For this reason,
traditional probabilists use the term indicator function for the function defined here almost exclusively, while mathematicians in other fields are more likely to use the term ''characteristic function'' to describe the function that indicates membership in a set.
In
fuzzy logic
Fuzzy logic is a form of many-valued logic in which the truth value of variables may be any real number between 0 and 1. It is employed to handle the concept of partial truth, where the truth value may range between completely true and completely ...
and
modern many-valued logic, predicates are the
characteristic functions In mathematics, the term "characteristic function" can refer to any of several distinct concepts:
* The indicator function of a subset, that is the function
\mathbf_A\colon X \to \,
which for a given subset ''A'' of ''X'', has value 1 at points o ...
of a
probability distribution
In probability theory and statistics, a probability distribution is a Function (mathematics), function that gives the probabilities of occurrence of possible events for an Experiment (probability theory), experiment. It is a mathematical descri ...
. That is, the strict true/false valuation of the predicate is replaced by a quantity interpreted as the degree of truth.
Basic properties
The ''indicator'' or ''characteristic''
function
Function or functionality may refer to:
Computing
* Function key, a type of key on computer keyboards
* Function model, a structured representation of processes in a system
* Function object or functor or functionoid, a concept of object-orie ...
of a subset of some set
maps
A map is a symbolic depiction of interrelationships, commonly spatial, between things within a space. A map may be annotated with text and graphics. Like any graphic, a map may be fixed to paper or other durable media, or may be displayed on ...
elements of to the
codomain
In mathematics, a codomain, counter-domain, or set of destination of a function is a set into which all of the output of the function is constrained to fall. It is the set in the notation . The term '' range'' is sometimes ambiguously used to ...
\.
This mapping is
surjective
In mathematics, a surjective function (also known as surjection, or onto function ) is a function such that, for every element of the function's codomain, there exists one element in the function's domain such that . In other words, for a f ...
only when is a non-empty
proper subset
In mathematics, a set ''A'' is a subset of a set ''B'' if all elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they are unequal, then ''A'' is a proper subset ...
of . If
A = X, then
\mathbf_A \equiv 1. By a similar argument, if
A = \emptyset then
\mathbf_A \equiv 0.
If
A and
B are two subsets of
X, then
\begin
\mathbf_(x) ~&=~ \min\bigl\ ~~=~ \mathbf_A(x) \cdot\mathbf_B(x), \\
\mathbf_(x) ~&=~ \max\bigl\ ~=~ \mathbf_A(x) + \mathbf_B(x) - \mathbf_A(x) \cdot \mathbf_B(x)\,,
\end
and the indicator function of the
complement
Complement may refer to:
The arts
* Complement (music), an interval that, when added to another, spans an octave
** Aggregate complementation, the separation of pitch-class collections into complementary sets
* Complementary color, in the visu ...
of
A i.e.
A^\complement is:
\mathbf_ = 1 - \mathbf_A.
More generally, suppose
A_1, \dotsc, A_n is a collection of subsets of . For any
x \in X:
\prod_ \left(\ 1 - \mathbf_\!\left( x \right)\ \right)
is a product of s and s. This product has the value at precisely those
x \in X that belong to none of the sets
A_k and is 0 otherwise. That is
\prod_ ( 1 - \mathbf_) = \mathbf_ = 1 - \mathbf_.
Expanding the product on the left hand side,
\mathbf_= 1 - \sum_ (-1)^ \mathbf_ = \sum_ (-1)^ \mathbf_
where
, F, is the
cardinality
The thumb is the first digit of the hand, next to the index finger. When a person is standing in the medical anatomical position (where the palm is facing to the front), the thumb is the outermost digit. The Medical Latin English noun for thum ...
of . 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
Combinatorics is an area of mathematics primarily concerned with counting, both as a means and as an end to obtaining results, and certain properties of finite structures. It is closely related to many other areas of mathematics and has many ...
. The notation is used in other places as well, for instance in
probability theory
Probability theory or probability calculus is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expre ...
: if is a
probability space
In probability theory, a probability space or a probability triple (\Omega, \mathcal, P) is a mathematical construct that provides a formal model of a random process or "experiment". For example, one can define a probability space which models ...
with probability measure
\mathbb and is a
measurable set
In mathematics, the concept of a measure is a generalization and formalization of geometrical measures (length, area, volume) and other common notions, such as magnitude, mass, and probability of events. These seemingly distinct concepts hav ...
, then
\mathbf_A becomes a
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a Mathematics, mathematical formalization of a quantity or object which depends on randomness, random events. The term 'random variable' in its mathema ...
whose
expected value
In probability theory, the expected value (also called expectation, expectancy, expectation operator, mathematical expectation, mean, expectation value, or first Moment (mathematics), moment) is a generalization of the weighted average. Informa ...
is equal to the probability of :
\operatorname\mathbb_X\left\\ =\ \int_ \mathbf_A( x )\ \operatorname(x) = \int_ \operatorname(x) = \operatorname\mathbb(A).
This identity is used in a simple proof of
Markov's inequality
In probability theory, Markov's inequality gives an upper bound on the probability that a non-negative random variable is greater than or equal to some positive Constant (mathematics), constant. Markov's inequality is tight in the sense that for e ...
.
In many cases, such as
order theory
Order theory is a branch of mathematics that investigates the intuitive notion of order using binary relations. It provides a formal framework for describing statements such as "this is less than that" or "this precedes that". This article intr ...
, the inverse of the indicator function may be defined. This is commonly called the
generalized Möbius function
In order theory, a field of mathematics, an incidence algebra is an associative algebra, defined for every locally finite partially ordered set
and commutative ring with unity. Subalgebras called reduced incidence algebras give a natural construc ...
, as a generalization of the inverse of the indicator function in elementary
number theory
Number theory is a branch of pure mathematics devoted primarily to the study of the integers and arithmetic functions. Number theorists study prime numbers as well as the properties of mathematical objects constructed from integers (for example ...
, the
Möbius function
The Möbius function \mu(n) is a multiplicative function in number theory introduced by the German mathematician August Ferdinand Möbius (also transliterated ''Moebius'') in 1832. It is ubiquitous in elementary and analytic number theory and m ...
. (See paragraph below about the use of the inverse in classical recursion theory.)
Mean, variance and covariance
Given a
probability space
In probability theory, a probability space or a probability triple (\Omega, \mathcal, P) is a mathematical construct that provides a formal model of a random process or "experiment". For example, one can define a probability space which models ...
\textstyle (\Omega, \mathcal F, \operatorname) with
A \in \mathcal F, the indicator random variable
\mathbf_A \colon \Omega \rightarrow \mathbb is defined by
\mathbf_A (\omega) = 1 if
\omega \in A, otherwise
\mathbf_A (\omega) = 0.
;
Mean
A mean is a quantity representing the "center" of a collection of numbers and is intermediate to the extreme values of the set of numbers. There are several kinds of means (or "measures of central tendency") in mathematics, especially in statist ...
:
\ \operatorname\mathbb(\mathbf_A (\omega)) = \operatorname\mathbb(A)\ (also called "Fundamental Bridge").
;
Variance
In probability theory and statistics, variance is the expected value of the squared deviation from the mean of a random variable. The standard deviation (SD) is obtained as the square root of the variance. Variance is a measure of dispersion ...
:
\ \operatorname(\mathbf_A (\omega)) = \operatorname\mathbb(A)(1 - \operatorname\mathbb(A)).
;
Covariance
In probability theory and statistics, covariance is a measure of the joint variability of two random variables.
The sign of the covariance, therefore, shows the tendency in the linear relationship between the variables. If greater values of one ...
:
\ \operatorname(\mathbf_A (\omega), \mathbf_B (\omega)) = \operatorname\mathbb(A \cap B) - \operatorname\mathbb(A) \operatorname\mathbb(B).
Characteristic function in recursion theory, Gödel's and Kleene's representing function
Kurt Gödel
Kurt Friedrich Gödel ( ; ; April 28, 1906 – January 14, 1978) was a logician, mathematician, and philosopher. Considered along with Aristotle and Gottlob Frege to be one of the most significant logicians in history, Gödel profoundly ...
described the ''representing function'' in his 1934 paper "On undecidable propositions of formal mathematical systems" (the symbol "" indicates logical inversion, i.e. "NOT"):
Kleene
Stephen Cole Kleene ( ; January 5, 1909 – January 25, 1994) was an American mathematician. One of the students of Alonzo Church, Kleene, along with Rózsa Péter, Alan Turing, Emil Post, and others, is best known as a founder of the branch of ...
offers up the same definition in the context of the
primitive recursive function
In computability theory, a primitive recursive function is, roughly speaking, a function that can be computed by a computer program whose loops are all "for" loops (that is, an upper bound of the number of iterations of every loop is fixed befor ...
s as a function of a predicate takes on values if the predicate is true and if the predicate is false.
For example, because the product of characteristic functions
\phi_1 * \phi_2 * \cdots * \phi_n = 0 whenever any one of the functions equals , it plays the role of logical OR: IF
\phi_1 = 0\ OR
\ \phi_2 = 0 OR ... OR
\phi_n = 0 THEN their product is . What appears to the modern reader as the representing function's logical inversion, i.e. the representing function is when the function is "true" or satisfied", plays a useful role in Kleene's definition of the logical functions OR, AND, and IMPLY,
[ the bounded-][ and unbounded-][ mu operators and the CASE function.][
]
Characteristic function in fuzzy set theory
In classical mathematics, characteristic functions of sets only take values (members) or (non-members). In ''fuzzy set theory
Fuzzy or Fuzzies may refer to:
Music
* Fuzzy (band), a 1990s Boston indie pop band
* Fuzzy (composer), Danish composer Jens Vilhelm Pedersen (born 1939)
* ''Fuzzy'' (album), 1993 debut album of American rock band Grant Lee Buffalo
* "Fuzzy", a ...
'', characteristic functions are generalized to take value in the real unit interval , or more generally, in some algebra
Algebra is a branch of mathematics that deals with abstract systems, known as algebraic structures, and the manipulation of expressions within those systems. It is a generalization of arithmetic that introduces variables and algebraic ope ...
or structure
A structure is an arrangement and organization of interrelated elements in a material object or system, or the object or system so organized. Material structures include man-made objects such as buildings and machines and natural objects such as ...
(usually required to be at least a poset
In mathematics, especially order theory, a partial order on a Set (mathematics), set is an arrangement such that, for certain pairs of elements, one precedes the other. The word ''partial'' is used to indicate that not every pair of elements need ...
or lattice
Lattice may refer to:
Arts and design
* Latticework, an ornamental criss-crossed framework, an arrangement of crossing laths or other thin strips of material
* Lattice (music), an organized grid model of pitch ratios
* Lattice (pastry), an or ...
). Such generalized characteristic functions are more usually called membership function
In mathematics, 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 o ...
s, and the corresponding "sets" are called ''fuzzy'' sets. Fuzzy sets model the gradual change in the membership degree seen in many real-world predicate
Predicate or predication may refer to:
* Predicate (grammar), in linguistics
* Predication (philosophy)
* several closely related uses in mathematics and formal logic:
**Predicate (mathematical logic)
**Propositional function
**Finitary relation, o ...
s like "tall", "warm", etc.
Smoothness
In general, the indicator function of a set is not smooth; it is continuous if and only if its support
Support may refer to:
Arts, entertainment, and media
* Supporting character
* Support (art), a solid surface upon which a painting is executed
Business and finance
* Support (technical analysis)
* Child support
* Customer support
* Income Su ...
is a connected component. In the algebraic geometry
Algebraic geometry is a branch of mathematics which uses abstract algebraic techniques, mainly from commutative algebra, to solve geometry, geometrical problems. Classically, it studies zero of a function, zeros of multivariate polynomials; th ...
of finite fields
In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subt ...
, however, every affine variety
In algebraic geometry, an affine variety or affine algebraic variety is a certain kind of algebraic variety that can be described as a subset of an affine space.
More formally, an affine algebraic set is the set of the common zeros over an algeb ...
admits a ( Zariski) continuous indicator function. Given a finite set
In mathematics, particularly set theory, a finite set is a set that has a finite number of elements. Informally, a finite set is a set which one could in principle count and finish counting. For example,
is a finite set with five elements. Th ...
of functions f_\alpha \in \mathbb_q\left x_1, \ldots, x_n\right/math> let V = \bigl\ be their vanishing locus. Then, the function \mathbb(x) = \prod\left(\ 1 - f_\alpha(x)^\right) acts as an indicator function for V. If x \in V then \mathbb(x) = 1, otherwise, for some f_\alpha, we have f_\alpha(x) \neq 0 which implies that f_\alpha(x)^ = 1, hence \mathbb(x) = 0.
Although indicator functions are not smooth, they admit weak derivative
In mathematics, a weak derivative is a generalization of the concept of the derivative of a function (''strong derivative'') for functions not assumed differentiable, but only integrable, i.e., to lie in the L''p'' space L^1( ,b.
The method o ...
s. For example, consider Heaviside step function
The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function named after Oliver Heaviside, the value of which is zero for negative arguments and one for positive arguments. Differen ...
H(x) \equiv \operatorname\mathbb\!\bigl(x > 0\bigr) The distributional derivative
Distributions, also known as Schwartz distributions are a kind of generalized function in mathematical analysis. Distributions make it possible to derivative, differentiate functions whose derivatives do not exist in the classical sense. In par ...
of the Heaviside step function is equal to the Dirac delta function
In mathematical analysis, the Dirac delta function (or distribution), also known as the unit impulse, is a generalized function on the real numbers, whose value is zero everywhere except at zero, and whose integral over the entire real line ...
, i.e. \frac= \delta(x)
and similarly the distributional derivative of G(x) := \operatorname\mathbb\!\bigl(x < 0\bigr) is \frac = -\delta(x).
Thus the derivative of the Heaviside step function can be seen as the ''inward normal derivative'' at the ''boundary'' of the domain given by the positive half-line. In higher dimensions, the derivative naturally generalises to the inward normal derivative, while the Heaviside step function naturally generalises to the indicator function of some domain . The surface of will be denoted by . Proceeding, it can be derived that the inward normal derivative
In multivariable calculus, the directional derivative measures the rate at which a function changes in a particular direction at a given point.
The directional derivative of a multivariable differentiable (scalar) function along a given vector ...
of the indicator gives rise to a ''surface delta function
In potential theory (a branch of mathematics), the Laplacian of the indicator is obtained by letting the Laplace operator work on the indicator function of some domain (mathematics), domain ''D''. It is a generalisation of the derivative (mathema ...
'', which can be indicated by \delta_S(\mathbf):
\delta_S(\mathbf) = -\mathbf_x \cdot \nabla_x \operatorname\mathbb\!\bigl(\ \mathbf\in D\ \bigr)\
where is the outward normal
Normal(s) or The Normal(s) may refer to:
Film and television
* ''Normal'' (2003 film), starring Jessica Lange and Tom Wilkinson
* ''Normal'' (2007 film), starring Carrie-Anne Moss, Kevin Zegers, Callum Keith Rennie, and Andrew Airlie
* ''Norma ...
of the surface . This 'surface delta function' has the following property:
-\int_f(\mathbf)\,\mathbf_x\cdot\nabla_x \operatorname\mathbb\!\bigl(\ \mathbf\in D\ \bigr) \; \operatorname^\mathbf = \oint_\,f(\mathbf) \; \operatorname^\mathbf.
By setting the function equal to one, it follows that the inward normal derivative of the indicator integrates to the numerical value of the surface area
The surface area (symbol ''A'') of a solid object is a measure of the total area that the surface of the object occupies. The mathematical definition of surface area in the presence of curved surfaces is considerably more involved than the d ...
.
See also
* Dirac measure
In mathematics, a Dirac measure assigns a size to a set based solely on whether it contains a fixed element ''x'' or not. It is one way of formalizing the idea of the Dirac delta function, an important tool in physics and other technical fields.
...
* Laplacian of the indicator
In potential theory (a branch of mathematics), the Laplacian of the indicator is obtained by letting the Laplace operator work on the indicator function of some domain ''D''. It is a generalisation of the derivative (or "prime function") of the ...
* Dirac delta
In mathematical analysis, the Dirac delta function (or distribution), also known as the unit impulse, is a generalized function on the real numbers, whose value is zero everywhere except at zero, and whose integral over the entire real line ...
* Extension (predicate logic)
The extension of a predicatea truth-valued functionis the set of tuples of values that, used as arguments, satisfy the predicate. Such a set of tuples is a relation.
Examples
For example, the statement "''d2'' follows the weekday ''d1''" can ...
* Free variables and bound variables
In mathematics, and in other disciplines involving formal languages, including mathematical logic and computer science, a variable may be said to be either free or bound. Some older books use the terms real variable and apparent variable for f ...
* Heaviside step function
The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function named after Oliver Heaviside, the value of which is zero for negative arguments and one for positive arguments. Differen ...
* Identity function
Graph of the identity function on the real numbers
In mathematics, an identity function, also called an identity relation, identity map or identity transformation, is a function that always returns the value that was used as its argument, unc ...
* Iverson bracket
In mathematics, the Iverson bracket, named after Kenneth E. Iverson, is a notation that generalises the Kronecker delta, which is the Iverson bracket of the statement . It maps any statement to a function of the free variables in that statement. ...
* Kronecker delta
In mathematics, the Kronecker delta (named after Leopold Kronecker) is a function of two variables, usually just non-negative integers. The function is 1 if the variables are equal, and 0 otherwise:
\delta_ = \begin
0 &\text i \neq j, \\
1 &\ ...
, a function that can be viewed as an indicator for the identity relation
In mathematics, a homogeneous relation (also called endorelation) on a set ''X'' is a binary relation between ''X'' and itself, i.e. it is a subset of the Cartesian product . This is commonly phrased as "a relation on ''X''" or "a (binary) relation ...
* Macaulay brackets
Macaulay brackets are a notation used to describe the ramp function
:\ = \begin 0, & x < 0 \\ x, & x \ge 0. \end
A popular alternative transcription uses angle brackets, ''viz.'' \langle x \rangle.Multiset
In mathematics, a multiset (or bag, or mset) is a modification of the concept of a set that, unlike a set, allows for multiple instances for each of its elements. The number of instances given for each element is called the ''multiplicity'' of ...
* Membership function
In mathematics, 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 o ...
* Simple function
In the mathematical field of real analysis, a simple function is a real (or complex)-valued function over a subset of the real line, similar to a step function. Simple functions are sufficiently "nice" that using them makes mathematical reas ...
* Dummy variable (statistics)
In regression analysis, a dummy variable (also known as indicator variable or just dummy) is one that takes a binary value (0 or 1) to indicate the absence or presence of some categorical effect that may be expected to shift the outcome. For e ...
* Statistical classification
When classification is performed by a computer, statistical methods are normally used to develop the algorithm.
Often, the individual observations are analyzed into a set of quantifiable properties, known variously as explanatory variables or ''f ...
* Zero-one loss function
In mathematical optimization and decision theory, a loss function or cost function (sometimes also called an error function) is a function that maps an event or values of one or more variables onto a real number intuitively representing some "cost ...
*Subobject classifier In mathematics, especially in category theory, a subobject classifier is a special object Ω of a category such that, intuitively, the subobjects of any object ''X'' in the category correspond to the morphisms from ''X'' to Ω. In typical examples, ...
, a related concept from topos theory
In mathematics, a topos (, ; plural topoi or , or toposes) is a category that behaves like the category of sheaves of sets on a topological space (or more generally, on a site). Topoi behave much like the category of sets and possess a notion ...
.
Notes
References
Sources
*
*
*
*
*
*
*
{{refend
Measure theory
Integral calculus
Real analysis
Mathematical logic
Basic concepts in set theory
Probability theory
Types of functions