# How to show the set of rational numbers in $[0,1]$ is not convex. [closed]

The set of rational numbers in $$[0,1]$$ is used as the counterexample that shows not every midpoint convex set is convex. To see the fact notice that the set of rational numbers in $$[0,1]$$ is midpoint convex since for any pair of rational numbers $$x,y$$ in $$[0,1]$$ $$\frac{x+y}{2}$$ is a rational number in $$[0,1]$$.

Now the question is how to show the set of rational numbers in $$[0,1]$$ is not convex.

• @herb steinberg: can you please write this as an answer so that I can approve it. It would be awesome to add an example. Jun 26, 2021 at 21:14
• @amWhy: thank you for your comment and giving feedback to members. I appreciate your time. I edited the title and tried to modify the question statement. Hope my modifications has made the posted question better. Jun 27, 2021 at 0:42
• Thanks for your edit to the title. I think it helps improve your post. Take care! Jun 27, 2021 at 0:44

Use weights $$z$$ and $$1-z$$ with $$0< z < 1$$ and $$z$$ irrational.
$$za+(1-z)b$$ for $$z=\frac{1}{\sqrt{2}}, a=\frac{1}{\sqrt{2}}, b=\frac{1}{2}\left ( 1-\frac{1}{\sqrt{2}} \right).$$