I want to know why the following function has uncountably many discontinuities:
$$f(x)=\left\{\begin{array} & x^2 & x \not \in \mathbb{Q} \\ 0 & \text{otherwise} \end{array}\right .$$
Now I know that this is only continuous at $0$ and how to show it. You may well say 'well that is why it has uncountably many discontinuities', and you would be right so I suppose my real question is what is wrong with my intuition.
My intuition wants me to think:
It is the function $x^2$ with discontinuities at each rational. There are countably many rationals. So there are countably many discontinuities.
Whats confuses me even more is that this train of thought actually works if we replace $\mathbb{Q}$ with another countable set. For example take $\mathbb{N}$ instead of $\mathbb{Q}$ in the definition of $f$.
So I think I have finally got to my really real question.
Why can I not swap out $\mathbb{Q}$ for $\mathbb{N}$ without drastically changing the number of discontinuities. Both 'chop up' $x^2$ the same 'number' of times as $|\mathbb{N}|=|\mathbb{Q}|$ but in one case $x^2$ is chopped up uncountably more times.
This function is actually discontinuous everywhere except at $0$. You already know that this function is discontinuous at all non zero rationals. Now let $x$ be any irrational.
Then "near" $x$ there are many rationals, and so $f(r)=0$ which is "away" from $f(x)=x^2$. I tried to give the intuitive picture, as I am sure that you know how to fill in the gaps.