TITLE: Smallest angle among two lines in $n \times n$ grid
QUESTION [5 upvotes]: Given an $n \times n$ grid, what is the minimum angle between any two distinct lines, each going through some grid point $p$ and at least one other grid point?
My guess is the minimum is attained by the line through $(0,0), (n,1)$ and the line through $(0,0), (n,0)$ but how can I show that this is the optimal line pair?

REPLY [4 votes]: I think the smallest angle is between lines $(0,0)-(n-1, n)$ and $(0,0) - (n-2,n-1)$.  For these two directional vectors we have
$$
\det \begin{pmatrix}
n-1 & n-2 \\
n & n-1
\end{pmatrix} = 1
$$
and so for the angle $\alpha$ we have
$$
\sin(\alpha) = \frac{1}{||(n-1, n)|| \cdot ||(n-2, n-1)||} < \frac{1}{2(n-1)^2}. 
$$
Among all the vectors in the grid, only the following are longer than $(n-2, n-1)$:
$$
(n-3,n), (n, n-3), (n-2, n), (n, n-2), (n-1, n), (n, n-1), (n-1, n-1), (n,n)
$$
The pair given above has the smallest (positive) angle in this set.