Characteristic Function
In set theory, the characteristic function (also called the indicator function) of a subset A of a set X is defined as: $$ \chi_A : X \rightarrow \{ 0, 1 \} $$ where $$ \begin{cases} \chi_A(x) = 1 \:\: \text{if} \:\: x \in A \\ \chi_A(x) = 0 \:\: \text{if} \:\: x \notin A \end{cases} $$
A Practical Example
Suppose the set X is given by:
$$ X = \{ 1, 2, 3, 4, 5, 6, 7 \} $$
and the subset A is defined as:
$$ A = \{ 4, 5, 6 \} $$
The characteristic function $$ \chi_A $$ is then:
$$ \chi_A(1) = 0 \\ \chi_A(2) = 0 \\ \chi_A(3) = 0 \\ \chi_A(4) = 1 \\ \chi_A(5) = 1 \\ \chi_A(6) = 1 \\ \chi_A(7) = 0 $$
This is the characteristic function of the subset A.

Thus, the preimage of 1 under $$ \chi_A $$ identifies the elements of A:
$$ \chi_A^{-1}(1) = \{ 4, 5, 6 \} $$
In other words, for any set X, if we let $$ 2 = \{ 0, 1 \} $$, there exists a one-to-one correspondence between the power set $$ \mathcal{P}(X) $$ and the set $$ 2^X $$ of all functions from X to {0, 1}.
And so on.
