What does it mean for rational numbers to be "dense in the reals?"

Solution 1:

It means that between any two reals there is a rational number. The integers, for example, are not dense in the reals because one can find two reals with no integers between them.

That definition works well when the set is linearly ordered, but one may also say that the set of rational points, i.e. points with rational coordinates, in the plane is dense in the plane. Then it must be defined differently: it means that every open set in the plane intersects the set of all rational points. No matter how small you make an open disk in the plane, it cannot avoid containing some rational points; so the set of all rational points is dense in the plane. In the case of the line, saying that every open interval contains some rationals amounts to the same thing as saying that between any two reals there is some rational number between them.

Solution 2:

It means that you can well-approximate any real number using a rational number. By well-approximate I mean that you can find a fraction arbitrarily close to any real number.

To make this precise, for any real number $x$ and any 'arbitrary closeness' $\varepsilon>0$, there exists a fraction $\displaystyle q=m/n\in\mathbb{Q}$ such that

$$\left|x-\frac{m}{n}\right|<\varepsilon.$$

Another example of density is that the set of polynomials is dense in the set of continuous functions on a closed interval. That is given any continuous function $f:[a,b]\rightarrow \mathbb{R}$ and 'arbitrary closeness', there is a polynomial $$p(x)=a_0+a_1x+a_2x^2+\cdots+a_nx^n$$ such that $\|f-p\|<\varepsilon$. This '$\|\cdot\|$' is the distance between $f$ and $p$ and is given as $$\|f-p\|=\sup_{x\in [a,b]}|f(x)-p(x)|\underset{[a,b]\text{ is compact }}{=}\max_{x\in [a,b]}|f(x)-p(x)|.$$