Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can we draw this function? $f\colon\mathbb{R}\to\mathbb{R}$, given by $$f(x) = \left\{\begin{array}{ll} 1 &\mbox{if $x\in\mathbb{Q}$;}\\ 0 &\mbox{if $x\notin\mathbb{Q}$.} \end{array}\right.$$

share|cite|improve this question
Depends what you mean by "draw"; Plank's constant would get in the way if you try to accurately picture it; the rationals and the irrationals are both dense on the line, so any drawing in which a point in the graph has any area (no matter how small) would simply "look" like two horizontal lines, one at height $0$ and one at height $1$. – Arturo Magidin Apr 15 '11 at 20:22
@Arturo @Ross Millikan: Actually, I find the idea of defining what it means for a function to be "drawable" to be kind of interesting. I'd submit that a good definition would be that you could low-pass filter the function and write the result as a piecewise smooth function. – Colin K Apr 15 '11 at 20:38
If you want to draw dotted where and how? so your observation doesnt give any further information, just discontuity of function. and an interesting drawing-curve must give more information than that. – Mopzer Moreena Apr 15 '11 at 22:22
I know that it's discontinuous – Mopzer Moreena Apr 15 '11 at 22:25
@Mopzer: Is your first comment addressed at Ross's answer? If so you should comment on his answer, not your question. If it's addressed at me, I don't understand the comment. – Arturo Magidin Apr 16 '11 at 1:46

It depends upon what you mean by "draw". You could draw a dotted line along $y=0$ and another along $y=1$ with the dots meaning that the function is not continuous and so some of the points you (seem to) have covered are not part of the function. If by draw you mean a continuous curve in the plane, no you cannot, because the function is not continuous.

share|cite|improve this answer
I would draw the line at 0 a bit thicker because it contains so much more points... ;-) – Fabian Apr 15 '11 at 20:28
@Fabian: for a human that's might be right, all that depends on limit of our eyes and density of both rationals and irrationals in real set. – Mopzer Moreena Apr 18 '11 at 20:20
@Arturo: Sorry. I'm a new user, I didnt know how to specify interested person, I didnt have any idea indeed. I asked Ross – Mopzer Moreena Apr 18 '11 at 20:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.