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

Given a subset $A$ of $\mathbb{R}^{n}$, a point $x \in \mathbb{R}^{n}$ is said to be in the boundary of A if and only if for every open rectangle $B\subseteq\mathbb{R}^{n}$ with $x\in B$, $B$ contains both a point of $A$ and a point of $\mathbb{R}^{n}\setminus A$.

My question is from Spivak's Calculus on Manifolds: Construct a set $A \subseteq [0,1]\times [0,1]$ such that $A$ contains at most one point on each horizontal and vertical line but has boundary equal to $[0,1]\times[0,1]$.

share|cite|improve this question
Thanks for fixing the code, M Turgeon – anonymous1234 Aug 8 '12 at 14:53
up vote 2 down vote accepted

Since $\mathbb Q^2$ and the set of primes are both countably infinite we can write $$\mathbb Q^2 = \{ (x_p,y_p) : p \text{ prime} \}$$ where $p \mapsto (x_p,y_p)$ is a bijection. Now let $$A := \{(x_p + \sqrt{p}/2^p, y_p + \sqrt{p}/2^{p}) : p \text { prime} \} \cap [0,1]^2.$$ To show that $A$ contains at most one point on every vertical or horizontal line it suffices to show that the maps $p \mapsto x_p + \sqrt{p}/2^p$ and $p \mapsto y_p + \sqrt{p}/2^p$ are injective. Suppose $x_p + \sqrt{p}/2^p = x_q + \sqrt{q}/2^q$ for primes $p$ and $q$. Then $\sqrt{p}$ and $\sqrt{q}$ are linearly dependent over $\mathbb Q$ which is only possible if $p = q$.

Since $A$ contains at most one point on every vertical or horizontal line we already know that every open set in $[0,1]^2$ contains some points outside of $A$. Therefore, it remains to show that $A$ is dense in $[0,1]^2$ (or, equivalently, in $(0,1)^2$). If $(x,y)$ is any point in $(0,1)^2$ then, since $\mathbb Q^2 \cap (0,1)^2$ is dense in $(0,1)^2$, there is a subsequence $(p_k)$ of the primes s.t. $(x_{p_k},y_{p_k})$ is a sequence in $(0,1)^2$ which approaches $(x,y)$. But then also $(x_{p_k} + \sqrt{p_k}/2^{p_k},y_{p_k} + \sqrt{p_k}/2^{p_k}) \to (x,y)$ as $k \to \infty$. For large $k$ this is a sequence in $A$, thus $A$ is dense in $(0,1)^2$.

share|cite|improve this answer
Wow, very nice! – anonymous1234 Aug 8 '12 at 17:29
(I think I had very little hope of coming up with this argument, however.) Thanks again. – anonymous1234 Aug 8 '12 at 17: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.