Distance from lattice point to line

coordinate systemsgeometry

What is the smallest $d> 0$ such that for any line in the plane not parallel to the $x$– or $y$-axis, the distance of some lattice point to the line does not exceed $d$?

If the line has slope $1$ and passes through point $(1/2,0)$, it has distance at least $\frac{1}{2\sqrt{2}}$ from any lattice point. This might also be the minimum $d$. There's of course an explicit formula for the distance from a line to any point, but here we have infinitely many points, which can generate infinitely many distances, for example if the slope is irrational.

Best Answer

The minimum $d$ is $\frac{1}{2\sqrt2}$, in the case you showed. The way to prove it is relatively easy. Choose four neighboring lattice points $(x_0,y_0)$, $(x_0+1,y_0)$, $(x_0,y_0+1)$, $(x_0+1,y_0+1)$ such as the line $y=ax+b$ goes in between. The distance from such a lattice point to the line can be written in terms of Pythagoras' theorem. We know the $x$ and $y$ components in the triangles formed by the lattice points, and the line. Along $x$ you have either $\{x\}$ or $\{1-x\}$ and along $y$ you have either $\{ax+b\}$ or $1-\{ax+b\}$ . Here the $\{\}$ notation means the fractional part.

We can write the areas of one of these triangles as either $0.5\{x\}\{ax+b\}$ or $0.5d\sqrt{\{x\}^2+\{y\}^2}$. From here $$d=\frac{\{x\}\{ax+b\}}{\sqrt{\{x\}^2+\{y\}^2}}$$ and similar combinations, with $\{x\}$ replaced with $1-\{x\}$ and/or $\{ax+b\}$ replaced with $1-\{ax+b\}$

Since we want to find the maximum distance for any line, it means that the $x$ and $y$ component are independent. The maximum value is reached when $\{x\}=1/2$ and $\{ax+b\}=1/2$. The minimum distance is then $$d=\frac{\frac{1}{2}\frac12}{\sqrt{\left(\frac{1}{2}\right)^2+\left(\frac{1}{2}\right)^2}}=\frac{1}{2\sqrt2}$$

Related Question