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

Let $F$ defined by $F(x)=\begin{cases} x & \text{if } x \in \mathbb{Q}, \\ 1-x & \text{if } x \in \mathbb{R} \setminus \mathbb{Q}.\end{cases}$

How to prove this function to be non-monotonic and bijective in any subinterval among domain $(0,1)$ and range $(0,1)$?

share|cite|improve this question
up vote 1 down vote accepted

Here are some extended hints.

Since $f(1/4)=1/4$ and $f(1/2)=(1/2)$, the function cannot be decreasing. Now look at two irrational numbers in $(0,1)$, say $\pi/5$ and $\pi/4$; what are $f(\pi/5)$ and $f(\pi/6)$? Can the function $f$ be monotonically increasing on $(0,1)$?

To show that $f$ is a bijection, you must show that it’s both injective (one-to-one) and surjective (onto).

To see that $f$ is injective, ask whether it’s possible to have two different numbers $x,y\in(0,1)$ with $f(x)=f(y)$. Do it in three cases.

  1. If $x,y\in\Bbb Q$, and $x\ne y$, can $f(x)=f(y)$?
  2. If $x,y\in\Bbb R\setminus\Bbb Q$, and $x\ne y$, can $f(x)=f(y)$?
  3. If $x\in\Bbb Q$ and $y\in\Bbb R\setminus\Bbb Q$, can $f(x)=f(y)$?

To see that $x$ is surjective, show that no matter what $y\in(0,1)$ you choose, there is an $x\in(0,1)$ such that $f(x)=y$. Here again it makes sense to look at cases.

  1. What should $x$ be if $y\in\Bbb Q$?
  2. What should $x$ be if $y\in\Bbb R\setminus\Bbb Q$?

Added: These ideas are easily modified to show that $f$ cannot be monotonic on any subinterval of its domain or range and that its restriction to any subinterval of its domain or preimage of any subinterval of its range must be a bijection. For the non-monotonicity, use the fact that any non-trivial interval of real numbers contains both rational and irrational numbers, instead of using specific ones as I did above. Injectivity of $f$ on a subinterval follows immediately from injectivity of $f$ on all of $(0,1)$.

share|cite|improve this answer
To show that $F$ is a bijection... one can also consider $F\circ F$. – Did May 20 '12 at 14:10
Thanks.Sorry for my mistake for missing an essential requirement. I have already fixed. It is requested to be discussed not in domain(0,1) but in any interval among (0,1). Your explanation about bijection helps a lot. I further wonder solution to non-monotonic provence under adjusted requirement. In my view, i treat dense property for real number to be a key – Francis King May 20 '12 at 16:55
@Francis: The denseness in $\Bbb R$ of both the rationals and the irrationals is crucial, but I agree that denseness is the key idea for showing the non-monotonicity in all subintervals. – Brian M. Scott May 20 '12 at 22:23
@Brian M.Scott: My train of solution :denseness prove that no matter how narrow the subinterval is,it contains infinite irrational and rational number. so the value of function turned out to be occupied by 0 and 1 alternately.I wonder whether the train work out warranted – Francis King May 21 '12 at 8:22
@Francis: No, you don’t get function values of $0$ and $1$, because $f(x)$ is never $0$ or $1$. Let $(a,b)$ be any subinterval. There are $p,q,x,y\in(a,b)$ such that $p,q\in\Bbb Q$, $x,y\in\Bbb R\setminus\Bbb Q$, and $p<x<y<q$. Then $f(p)=p<q=f(q)$, and $f(x)=1-x>1-y=f(y)$. Thus, $f$ rises from $f(p)$ to $f(q)$, so it’s not decreasing on $(a,b)$, and falls from $f(x)$ to $f(y)$, so it’s not increasing on $(a,b)$. Therefore it’s not monotonic on $(a,b)$. – Brian M. Scott May 21 '12 at 8:34

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.