# Proving a set is dense.

cragar

## Homework Statement

Prove the set $A= \{ \frac{p^2}{q^2}: p<q , p,q \in \mathbb{N} \}$
is dense on the interval [0,1]

## The Attempt at a Solution

ok so if I have 2 arbitrary reals a and b on the interval [0,1] and a<b

I could easily pick p such that $\frac{1}{p^2}<b-a$
and I can do this by the Archimedean principle. But now I need to pick a natural number
that puts me in between a and b. And this natural number need to have a natural number
when square rooted and be less than p^2 . I guess I am not so worried about being able to pick
a number whose square puts me in between a and b . because I could just pick p to be larger which would allow more options for q . but I am not sure how to make q<p.

Joffan
You could consider √a and √b and then pick p/q accordingly.

Staff Emeritus
Gold Member
I guess I am not so worried about being able to pick
a number whose square puts me in between a and b . because I could just pick p to be larger which would allow more options for q . but I am not sure how to make q<p.
Er, isn't q automatically less than p?

P.S. In my opinion, you should worry about the stuff you're not worried about. You have an idea and it's probably right, but it's worth being suspicious about. And since you're being asked this as a homework problem, you definitely should write a proof to show that it works.

cragar
Er, isn't q automatically less than p?

.

If I pick p large enough so that it is smaller than the distance between my 2 reals.
then I haft to add $\frac{1}{p^2}$ to itself q times to get me inside
the 2 reals, without skipping over it or stopping before and making sure that q is a natural
number and that q<p if I pick p too large I might need q>p to make sure the number of steps puts me inside a and b. So it is not automatically given. Its a condition I have to meet.

SteveL27
You might find it very helpful to try this for a concrete example. Just pick a familiar irrational in the unit interval, like x = sqrt(2) - 1 = .4142132...

We want to see if we can approximate x to any desired degree of precision with rationals of the form p2/q2.

So take a random $\epsilon$ ... take $\epsilon$ = 1/100. What do we know? We know that the rationals are dense in the reals, so we can find a rational within $\epsilon$ of x.

What rational is that? Well, one obvious possibility is r = .41 = 41/100. You can see that |x - r| = .0042132 ... < 1/100 = $\epsilon$. And the denominator's even a square.

41's not a square, but it's surrounded by squares, 36 and 49. Unfortunately, |36/100 - 49/100| is way bigger than our $\epsilon$; so we have to try to force the distance between consecutive squares to get smaller.

How about if we try r = 41/100 = 4100/10,000. The denominator's still a square, and the squares that bracket 4100 might give us a small enough interval. It actually turns out that they do not. The maximum possible interval between consecutive squares over 104 is still too big.

But we can prove that if we keep multiplying numerator and denominator by 102, the "maximum consecutive squares interval" is eventually small enough so that you can force it to be as close as you like to 41/100; which is within $\epsilon$ = 1/100 of our irrational x.

Why do I keep multiplying numerator and denominator by 100? Because the sequence of denominators is then 102, 104, 106, ... and each of those denominators is a square. So then I just analyze the sequence of square numerators for each denominator 102n; and I see that the maximum possible difference between consecutive squared rationals goes to zero. Of course you have to prove that.

You can make this whole proof go through, but for what it's worth I had to work at it. I had to carefully compute the width of the maximum interval between consecutive squares with denominator 10^2n.

So there's two ideas for you.

One, work the problem with a very specific example.

And two, there's an outline of an idea that I was able to get to work. But it's a long proof, and I had to to a lot of work to convince myself I had it nailed down.

But even if you don't use this particular proof outline (and again, I make no claims that it's elegant or insightful; just that I was able to make it work) I do recommend working this problem with an explicit, concrete example like x = sqrt(2) - 1. I find working with concrete examples helps a lot.

Last edited:
SteveL27

## Homework Statement

Prove the set $A= \{ \frac{p^2}{q^2}: p<q , p,q \in \mathbb{N} \}$
is dense on the interval [0,1]

## The Attempt at a Solution

ok so if I have 2 arbitrary reals a and b on the interval [0,1] and a<b

I could easily pick p such that $\frac{1}{p^2}<b-a$
and I can do this by the Archimedean principle.

BTW I notice that we're using two different meanings of "dense." You are trying to show that between any two elements of the "square over square" rationals (let's call them SOSR), there's another one between them.

What they're asking you to show is that the SOSR are dense in the unit interval; that is, that the closure of SOSR is the unit interval. Equivalently, any real in the unit interval can be approximated to arbitrary precision by some member of SOSR.

I'm pretty sure those two defs are equivalent; but typically when they say dense on an interval they mean the definition I'm using. Does it need to be proved that these two meanings of dense are equivalent? Or is that well-known or considered obvious?

For example, in R2, the set of points with rational coordinates are dense in the plane. But there's no order relationship on the rational points so you have to define density as the closure of the rational points being the entire plane. The two notions of "dense" correspond in the reals, but i think you have to prove that unless they already did that in class.

Last edited:
Staff Emeritus
then I haft to add $\frac{1}{p^2}$ to itself q times to get me inside
But $q^2 / p^2 < b$, right?