# Does this function have countably or uncountably many discontinuities?

I have sort of a silly question, since I feel confused.

Let $f(x) = \begin{cases} 1, & x\in \mathbb{Q}\\ 0, & x\in \mathbb{R} \setminus \mathbb{Q} \end{cases}$

Intuitively, this function has a discontinuity at every rational number, and this set is countable. On the other hand, I could also say that it has a discontinuity at every irrational number, and this set is uncountable.

Which one of those statements is true?

• Here is another function that often appears in exercises: Let $f(x)=0$ when $x$ is irrational. And when $x=p/q$ where $p,q$ are co-prime integers then $f(x)=1/|q|.$ Then $f$ is discontinuous at every non-zero rational ,but continuous at $0$ and at every irrational. – DanielWainfleet Jun 16 '17 at 18:14

• Thus the set of discontinuities is the whole $\mathbb{R}$? – Angie Jun 16 '17 at 8:07
• Yes - it is not continuous at any point in $\mathbb{R}$, as I indicated. – SvanN Jun 16 '17 at 8:08