# $ax+by$ dense on real line

What are the values of $x,y\in\mathbb{R}$ such that $\{ax+by\mid a,b\in\mathbb{Z}\}$ is dense in $\mathbb{R}$?

If $x,y$ are rational, the set cannot be dense because it only contains fractions whose denominator divides the LCM of the denominators of $x$ and $y$.

Is the set dense whenever at least one of $x,y$ is irrational?

If $x=0$ or $y=0$, then the set is not dense either. And if both $x$ and $y$ are not $0$, but $\frac yx\in\mathbb Q$, then, again, the set is not dens.
On the other hand, if both $x$ and $y$ are not $0$, and $\frac yx\notin\mathbb Q$, then, yes, the set is dense. In fact, this is the same thing as asserting that if $\alpha$ is irrational, then $\{m-n\alpha\,|\,m,n\in\mathbb{Z}\}$ is dense. It is clearly a subgroup of $(\mathbb{R},+)$. So, all that it is needed is that it doesn't have a least positive element. Suppose otherwise. The there is a natural $N$ such that$$(\forall m,n\in\mathbb{Z}):|m-\alpha n|\geqslant\frac1N.\tag1$$By Dirichlet's approximation theorem, there are $m,n\in\mathbb Z$ such that $\left|\alpha-\frac mn\right|<\frac1{Nn}$, and this means that $\left|m-n\alpha\right|<\frac1N$, contradicting $(1)$.
It is dense whenever $\frac xy$ is irrational. Your argument for $x,y$ rational is correct and applies as well to $x=a\sqrt 2, y=b\sqrt 2$ with $a,b$ rational.