Sets and their characteristic functions, Part 1

In my introductory pure maths module (FPM), one of the things we look at is the connection between sets and their characteristic functions, and how set operations affect the characteristic functions.

Here it is probably best to assume that you are currently working only with subsets of some "universal set", which we call \(X\). Then, for \(E \subseteq X\), we denote by \(E^c\) the complement of \(E\) in \(X\), so that

\(E^c=X\setminus E = \{x \in X: x \notin E\,\}\,.\)

The characteristic function of \(E\) (also called the indicator function of \(E\)), \(\chi_E\) (or \(1_A\), or variants of this), is then defined as follows. For \(x \in X\),

\(\chi_E(x) = 1_E(x) =\left\{\begin{array}{ll}1 & \text{if } x \in E\,,\\0 & \mbox{if } x \in X \setminus E\,.\end{array}\right.\)

(In case you are wondering, \(\chi\) is the Greek letter chi.)

If \(X=\mathbb{R}\) and \(E\) is a relatively easy set to work with such as the interval \([1,3]\), then (Exercise!) you can easily sketch the graph of \(y=\chi_E(x)\). For this particular example, the graph follows the \(x\)-axis most of the time, but jumps to follow a segment of the horizontal line \(y=1\) in the range \(1 \leq x \leq 3\).

For more complicated sets such as \(E=\mathbb{Q}\) we can't really sketch the graph properly, but traditionally we just draw dotted lines along the whole of both the \(x\)-axis and the horizontal line \(y=1\).

In the following, we no longer assume that \(X=\mathbb{R}\) (though if you want to work in that special case you can).

One useful thing is that we have a one to one correspondence (or a bijection) between subsets of \(X\) and their characteristic functions: for subsets \(A\) and \(B\) of \(X\), we have

\(A = B \Leftrightarrow \chi_A = \chi_B\,.\)

Here (as usual when discussing equality of functions), we say that the functions \(\chi_A\) and \(\chi_B\) are equal if (and only if), for all \(x \in X\), we have \(\chi_A(x)=\chi_B(x)\).

Why might this be helpful? Well, checking equality of sets can be a little tricky to do directly. But it may be relatively easy to add, subtract and multiply functions which take integer values, and see whether they are equal. We'll see an example of this in a later post when we check that the set operation of symmetric difference is associative.

Let's finish this first part with some connections between set operations and arithmetic of characteristic functions, which you can check as an exercise.

  • The characteristic function of the empty set, \(\chi_\emptyset\), is just the constant function \(0\).
  • The characteristic function of our universal set \(X\), \(\chi_X\), is just the constant function \(1\).
  • Let \(E \subseteq X\). Then there is an easy formula for the characteristic function \(\chi_{E^c}\) of the complement of \(E\). We just have

                             \(\chi_{E^c} = 1 - \chi_E\,\),

    i.e., for all \(x \in X\), we have \(\chi_{E^c} (x) = 1 - \chi_E(x)\).
  • Let \(A\) and \(B\) be subsets of \(X\). Then

                             \(\chi_{A\cap B} = \chi_A\, \chi_B\,\),

    i.e., for all \(x \in X\), we have \(\chi_{A\cap B}(x) = \chi_A(x) \chi_B(x)\).

Extension exercise: Can you find a fairly easy formula for the characteristic function \(\chi_{A \cup B}\) of the set \(A \cup B\)?
Warning: \(\chi_A + \chi_B\) isn't quite right.

Comments

Popular posts from this blog

Sums and integration against counting measure: Part I

Discussion of the proof that the uniform norm really is a norm

Revisiting liminf and limsup