Show that $f(x) = 0$ for all $x \in \mathbb{R}$ 
$f: \mathbb{R} \to \mathbb{R}$ is continuous with $f(x)=0$ for all $x \in \mathbb{Q}$. Show that $f(x) = 0$ for all $x \in \mathbb{R}$.

Can anyone please point me in the right direction as to how I can go about answering this question?

Assume that
$$ \exists q \in \mathbb{R} \setminus \mathbb{Q} : f(q) \not = 0$$
Now by trichotomy we have either $f(q) > 0$ or $f(q) < 0$. If we consider the first case, by continuity of $f$ we have
$$ \exists \delta > 0 : f(x) > 0 : x \in (q - \delta, q + \delta)$$
(Proving this is a very useful exercise in itself). Can you see what the contradiction is now in the above statement? Remember the hypothesis.   
