In mathematics, the Dirichlet function is the indicator function 1Q or of the set of rational numbers Q, i.e. 1Q(x) = 1 if x is a rational number and 1Q(x) = 0 if x is not a rational number (i.e. an irrational number). It is named after the mathematician Peter Gustav Lejeune Dirichlet. It is an example of pathological function which provides counterexamples to many situations.