In mathematics, the Dirichlet function is the indicator function <math>\mathbf{1}_\Q</math> of the set of rational numbers <math>\Q</math> over the set of real numbers <math>\R</math>, i.e. <math>\mathbf{1}_\Q(x) = 1</math> for a real number if is a rational number and <math>\mathbf{1}_\Q(x) = 0</math> if is not a rational number (i.e. is an irrational number).

<math display="block">\mathbf 1_\Q(x) = \begin{cases}

1 & x \in \Q \\

0 & x \notin \Q

\end{cases}</math>

It is named after the mathematician Peter Gustav Lejeune Dirichlet. It is an example of a pathological function which provides counterexamples to many situations.

Topological properties

Periodicity

For any real number and any positive rational number , <math>\mathbf{1}_\Q(x + T) = \mathbf{1}_\Q(x)</math>. The Dirichlet function is therefore an example of a real periodic function which is not constant but whose set of periods, the set of rational numbers, is a dense subset of <math>\R</math>.

Integration properties

See also

  • Thomae's function, a variation that is discontinuous only at the rational numbers.

References